User forums > Help
crash when use wxsmith
icequan233:
Hi, guys. I found position where my steps in wxSmith, so I set breakpoints and trace it. Finally, I got the crash point,
in codeblocks SDK, the editormanager.cpp and the cbauibook.cpp, I attach the call stack. And there is some debug
information.
--- Code: ---At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1441
Continuing...
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:184
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:295
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:299
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:300
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:301
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:193
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:200
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:186
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:202
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:203
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:668
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1451
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1452
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1460
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1479
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1480
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:690
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:184
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:668
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:698
At D:\code\codeblocks_sf\src\sdk\cbauibook.cpp:526
Program received signal SIGSEGV, Segmentation fault.
In wxPGProperty::GetY2(int) const () (D:\code\codeblocks_sf\src\devel30\wxmsw30u_gcc_custom.dll)
Debugger finished with status 0
--- End code ---
I have some quesition. First, in editormanager.cpp:698, when running to this statement, cb was crushing.
m_pNotebook->DeletePage(index), I noticed that the m_pNotebook was initialized to nullptr and NEW in constructor, I think which is no problem. Then I step into cbauibook.cpp, just derived form wxAuiNotebook,
I also think there is no problem at this statement. I don't think it is the wx'problem, because I can delete the
page of code editor normally, and if I don't change the style, it is also deleted. So, in my opinion, the most probably reasons is m_pNotebook was released forward in constructor when called out of obeject. I means that
the NEW operation is useless, beacause the resource of constructor was released, so actually we don't allocate resource for m_pNotebook, and the adress is nullptr, so will crash here. just my guess, can anyone helps debug or
see whether it ie right.
oBFusCATed:
icequan233: Can you open the call stack window (debug -> debugging windwos -> callstack) and post the full call stack at the time of the crash?
icequan233:
--- Quote from: oBFusCATed on April 21, 2017, 10:34:02 am ---icequan233: Can you open the call stack window (debug -> debugging windwos -> callstack) and post the full call stack at the time of the crash?
--- End quote ---
Sorry for the picture, the forums limits size, I crop the call stack.
oBFusCATed:
This is not the crash site as far as I can tell, isn't it?
Please remove all breakpoints and let it crash.
Then go to the call stack window, right click in the window and click on the copy to clipboard menu item.
Then paste the callstack in a code or quote tags.
Jenna:
The crash happens because of an illegal pointer in propgrid.cpp (GetY2) in the for-loop.
getParent returns 0xfeeefee.
I can reproduce it with wx2.8 and wx3.
It either tries to access an already deleted or an incorrect initialized pointer, looking at the address, the first is more likely.
It might be an(other) optimization bug of gcc.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version