On Wed, 8 Jun 2022 09:08:26 -0700 (PDT)
gunter.ko...@gmail.com wrote:
g> A complicated question (sorry for that) as I don't own a mac myself: In the
g> following line 77 in my SvgBitmap.cpp I want to generate a bitmap of the
g> size width x height that has 32 bit per pixel and a resolution that fits
g> the screen:
g>
g> wxBitmap::operator=(wxBitmap(wxSize(width, height), 32,
g> m_window->GetContentScaleFactor()));
g>
g> Instead that line is reported to to result in:
g>
g> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
g> 0 libsystem_kernel.dylib 0x7ff81acf900e __pthread_kill + 10
g> 1 libsystem_pthread.dylib 0x7ff81ad2f1ff pthread_kill + 263
g> 2 libsystem_c.dylib 0x7ff81ac7ad24 abort + 123
g> 3 libwx_baseu-3.1.7.0.0.dylib 0x1113617ab
g> wxFatalSignalHandler(int) + 33
g> 4 libsystem_platform.dylib 0x7ff81ad44dfd _sigtramp + 29
g> 5 CoreFoundation 0x7ff81adc2ea8
g> _CFBundleCopyFindResources + 2654
g> 6 wxmaxima 0x1100819d9
g> SvgBitmap::SetSize(int, int) + 105 (SvgBitmap.cpp:77)
g>
g> Does this mean that my program has trashed the stack or done something else
g> that inevitably has to cause a crash sooner or later - or did I fail to
g> understand how to create a wxBitmap on macOs?
Creating bitmaps under Mac works in the same way as anywhere else and is
not supposed to crash, of course. If the crash really happens at this line,
the most likely reason is that m_window is null or otherwise invalid.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/