When a TreeCtrl is redrawn and items have images set (using ImageList), it causes a crash on OS X. The same code works
correctly on Linux.
Looks like the underlying wxBitmap is broken or has got GC'd somewhere...
The (snipped) backtrace is:
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x915f9f3c in GetGWorldPixMap ()
(gdb) whe
#0 0x915f9f3c in GetGWorldPixMap ()
#1 0x032bdc64 in wxDC::DoDrawBitmap(wxBitmap const&, int, int, bool) ()
#2 0x0333db0c in wxImageList::Draw(int, wxDC&, int, int, int, bool) ()
#3 0x03388668 in wxGenericTreeCtrl::PaintItem(wxGenericTreeItem*, wxDC&) ()
#4 0x033889b8 in wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem*, wxDC&, int, int&) ()
#5 0x03388d20 in wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem*, wxDC&, int, int&) ()
#6 0x03389138 in wxGenericTreeCtrl::OnPaint(wxPaintEvent&) ()
#7 0x0325eaf8 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
#8 0x0325e27c in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
#9 0x0325eca4 in wxEvtHandler::ProcessEvent(wxEvent&) ()
#10 0x0325ecd0 in wxEvtHandler::ProcessEvent(wxEvent&) ()
#11 0x03324ab8 in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) ()
#12 0x03290578 in wxWindow::MacDoRedraw(void*, long) ()
#13 0x0328aabc in wxMacWindowControlEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#14 0x0328b3a0 in wxMacWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#15 0x9805ce50 in DispatchEventToHandlers ()
#16 0x9805d0c4 in SendEventToEventTargetInternal ()
#17 0x98061544 in SendEventToEventTargetWithOptions ()
#18 0x98068ba8 in SendControlDefDraw(HIView*, short, OpaqueGrafPtr*, OpaqueRgnHandle*, CGContext*) ()
#19 0x98062cf8 in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
|