Bugs: Browse | Submit New | Admin

[#7146] Setting item image in TreeCtrl crashes on OS X

Date:
2006-12-07 12:03
Priority:
4
Submitted By:
Alex Fenton (brokentoy)
Assigned To:
Alex Fenton (brokentoy)
Category:
Incorrect behavior
State:
Open
Summary:
Setting item image in TreeCtrl crashes on OS X

Detailed description
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*) ()

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-02-07 13:00
Sender: Alex Fenton

Appears to be a bug in wxWidgets creating Bitmaps from XPM Icons
inside imagelist. Postponed
Date: 2006-12-26 11:10
Sender: Alex Fenton

This crash only occurs if the ImageList was populated with Wx::Icons
via the add method.

If the images added to the list are Wx::Bitmaps, everything works
fine on OS X. So can be worked around by not using Icon.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
resolution_idAccepted2008-02-07 13:00brokentoy
resolution_idNone2006-12-26 11:10brokentoy
assigned_toqualitycode2006-12-09 15:49brokentoy