Opened 12 years ago

Closed 9 years ago

#10340 closed defect (fixed)

wxGenericListCtrl crashes on mac

Reported by: roe Owned by: csomor
Priority: normal Milestone:
Component: old wxOSX/Carbon port Version: 2.8.9
Keywords: wxListCtrl generic mac crash Cc:
Blocked By: Blocking:
Patch: no

Description

Hi, I've run into a crash (SIG_SEGV due NULL pointer) when I create a wxListCtrl with following code:

new wxListCtrl( this , ID_REMOTE_FILE_LIST, wxDefaultPosition, wxSize(175, 100), wxLC_ICON|wxLC_SINGLE_SEL|wxALWAYS_SHOW_SB|wxVSCROLL );

stacktrace:
#0 0x0031e4ac in wxGenericListCtrl::DoClientToScreen at event.h:513
#1 0x00317e38 in wxWindow::MacHasScrollBarCorner at event.h:513
#2 0x003184b5 in wxWindow::MacRepositionScrollBars at event.h:513
#3 0x003186b3 in wxWindow::MacCreateScrollBars at event.h:513
#4 0x0031a9ef in wxWindow::Create at event.h:513
#5 0x002bde2d in wxControl::Create at IMSControls.h:284
#6 0x00324b71 in wxGenericListCtrl::Create at event.h:513
#7 0x002daa18 in wxListCtrl::Create at IMSControls.h:284
#8 0x000941da in wxListCtrl::wxListCtrl at listctrl.h:47
#9 0x001048dc in wxListCtrl::wxListCtrl at listctrl.h:48

I figured out, that in the DoClientToScreen method the main window of the generic list control is accessed which would be allocated later in the wxGenericListCtrl::Create method.
I also found out, that if I omit the wxVSCROLL style it works, so it's not that big of problem.
The code i mentioned above worked perfectly in 2.8.3.

Change History (2)

comment:1 Changed 12 years ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

comment:2 Changed 9 years ago by vadz

  • Keywords wxListCtrl added; wxlistctrl removed
  • Resolution set to fixed
  • Status changed from accepted to closed

I think this was fixed by r65831.

Note: See TracTickets for help on using tickets.