access violation using wxTreeCtrl
Harry
"harry dot news at armadillo dot fr" at a.mx.sunsite.dk
Fri Feb 29 03:33:09 PST 2008
Hi
In MSW version 2.8.7, using wxTreeCtrl, I get an abort using wxTreeCtrl:
Unhandled exception in treectrl.exe (COMCTL32.DLL): 0xC0000005:
Access Violation.
To duplicate the abort in the sample treectrl, do the following in file
treetest.cpp :
In function MyFrame::CreateTreeWithDefStyle change the first line to
long style = wxTR_DEFAULT_STYLE | wxTR_MULTIPLE | wxTR_HIDE_ROOT |
In function MyTreeCtrl::AddTestItemsToTree comment out the line
SetItemFont(rootId, *wxITALIC_FONT);
Now compile, run, open "Folder child 1", click on the first child, then
exit (via menu or the close button) to get this abort.
Is there anything wrong with using both wxTR_MULTIPLE and wxTR_HIDE_ROOT ?
The stack dump at the moment of the abort is:
[snip]
USER32! 76559924()
wxWindow::MSWDefWindowProc(0x00001101, 0x00000000, 0xffff0000) line 2181
+ 39 bytes
wxTreeCtrl::MSWDefWindowProc(0x00001101, 0x00000000, 0xffff0000) line 2495
wxWindow::MSWWindowProc(0x00001101, 0x00000000, 0xffff0000) line 3378 +
34 bytes
wxTreeCtrl::MSWWindowProc(0x00001101, 0x00000000, 0xffff0000) line 2457
+ 23 bytes
wxWndProc(0x004d0e00, 0x00001101, 0x00000000, 0xffff0000) line 2559 + 28
bytes
USER32! 76571a10()
[snip]
USER32! 7655d93c()
wxTreeCtrl::DeleteAllItems() line 1667 + 29 bytes
wxTreeCtrl::~wxTreeCtrl() line 812
MyTreeCtrl::~MyTreeCtrl() line 68 + 31 bytes
MyTreeCtrl::`scalar deleting destructor'(0x00000001) + 22 bytes
wxWindowBase::DestroyChildren() line 439 + 33 bytes
wxWindow::~wxWindow() line 547
wxPanel::~wxPanel() line 133 + 8 bytes
wxPanel::`scalar deleting destructor'(0x00000001) + 22 bytes
wxWindowBase::DestroyChildren() line 439 + 33 bytes
wxWindow::~wxWindow() line 547
wxTopLevelWindowBase::~wxTopLevelWindowBase() line 75 + 33 bytes
wxTopLevelWindowMSW::~wxTopLevelWindowMSW() line 645 + 15 bytes
wxTopLevelWindow::~wxTopLevelWindow() + 22 bytes
wxFrameBase::~wxFrameBase() line 79 + 29 bytes
wxFrame::~wxFrame() line 214 + 15 bytes
MyFrame::~MyFrame() line 300 + 15 bytes
MyFrame::`scalar deleting destructor'(0x00000001) + 22 bytes
wxAppBase::DeletePendingObjects() line 423 + 33 bytes
wxAppBase::ProcessIdle() line 458
wxEventLoopManual::Run() line 99 + 80 bytes
More information about the wx-users
mailing list