User forums > Using Code::Blocks

Crash when open project

(1/2) > >>

David Perfors:
When I try to open a project (I want to open codeblock-unix.cbp) codeblocks crashes. when looking with the debugger (although I don't have no idea how it works  :roll: ) I see a lots of new threads, and then the following message:

--- Code: ---Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 3290)]
0x4023dea7 in wxGenericTreeCtrl::Collapse ()
   from /usr/local/lib/libwx_gtk2-2.4.so

--- End code ---

I want to solve this (probably little) bug, but I don't know how to start. please give some hints...

ps.
I use the cvs version, and want to open the same version of codeblocks. as you can see I use wx-2.4.2 (with patch :P) I am using VectorLinux SOHO 5.

rickg22:
Mispunt: What's the backtrace output?

Anyway this tree control business is driving me nuts. I'm *almost sure* there's a null pointer in here somewhere and that's why the tree looks invisible. But how? when? why? :(

David Perfors:
I hope I have the right trace (in gdb after the crash I called backtrace, right?)

--- Code: ---#0  0x4023dea7 in wxGenericTreeCtrl::Collapse () from /usr/local/lib/libwx_gtk2-2.4.so
#1  0x40593e20 in ?? ()
#2  0x082e19d8 in ?? ()
#3  0xbfffe268 in ?? ()
#4  0x082f9e58 in ?? ()
#5  0x404b0054 in ?? () from /usr/local/lib/libwx_gtk2-2.4.so
#6  0x404cf248 in vtable for wxObject () from /usr/local/lib/libwx_gtk2-2.4.so
#7  0x404b0054 in ?? () from /usr/local/lib/libwx_gtk2-2.4.so
#8  0xbfffe288 in ?? ()
#9  0x41246cf0 in ClassBrowser::Update () from /home/mispunt/bin/codeblocks/share/CodeBlocks/plugins/libcodecompletion.so
#10 0x41246cf0 in ClassBrowser::Update () from /home/mispunt/bin/codeblocks/share/CodeBlocks/plugins/libcodecompletion.so
#11 0x41246c48 in ClassBrowser::SetParser () from /home/mispunt/bin/codeblocks/share/CodeBlocks/plugins/libcodecompletion.so
#12 0x4124cd7c in NativeParser::SetClassBrowserProject () from /home/mispunt/bin/codeblocks/share/CodeBlocks/plugins/libcodecompletion.so
#13 0x4124a53d in CodeCompletion::OnProjectActivated () from /home/mispunt/bin/codeblocks/share/CodeBlocks/plugins/libcodecompletion.so
#14 0x402e2dc6 in wxEvtHandler::SearchEventTable () from /usr/local/lib/libwx_gtk2-2.4.so
#15 0x402e2bcc in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2-2.4.so
#16 0x402e2c04 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2-2.4.so
#17 0x402e2c04 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2-2.4.so
#18 0x402e2c04 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2-2.4.so
#19 0x402e2c04 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2-2.4.so
#20 0x402e2c04 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2-2.4.so
#21 0x405a7932 in ?? ()
#22 0x082d1518 in ?? ()
#23 0xbfffe4b0 in ?? ()
#24 0x00000000 in ?? ()
#25 0x405631ed in ?? ()
#26 0xbfffe500 in ?? ()
#27 0x00000010 in ?? ()
#28 0xbfffe488 in ?? ()
#29 0x082d1518 in ?? ()
#30 0x00000007 in ?? ()
#31 0x01225290 in ?? ()
#32 0xbfffe518 in ?? ()
#33 0x405b31a5 in ?? ()
#34 0x08225290 in ?? ()
#35 0xbfffe4b0 in ?? ()
#36 0x00000001 in ?? ()
#37 0x402d8080 in wxBaseArrayPtrVoid::Grow () from /usr/local/lib/libwx_gtk2-2.4.so
Previous frame inner to this frame (corrupt stack?)

--- End code ---

rickg22:
Okay, thanks for the info!

The "?? ()"'s belong to the parserthreads trying to parse the project. The reason for the multiple ??()'s in the same backtrace are  because the events get called recursively. This is normal (altho "not correct" and IMO it should be changed, yes I know, I'm a purist, grrrr).

Anyway, I assume that the currently active tab is the class browser, right?

The key point here is ClassBrowser::Update(). Something inside that method is allowing null references (hint for debugging: The topmost recognizeable function is the one causing the trouble). And due to the recursive event handling problem^H^H^H^H^H^H^H issue, it's possible that Update() doesn't check for null pointers somewhere. This needs more investigation, and possibly, a couple of sanity_check()'s around. Still I wonder why this only happens with wx2.6... maybe a new event? (ponders)

Anyway try disabling the codecompletion plugin and see what other crashes you can backtrace.

Thanks for your help! :)

David Perfors:
Thanks for the explanation rick :)


--- Quote from: rickg22 ---Anyway, I assume that the currently active tab is the class browser, right?

--- End quote ---

if the name of the class browser is "Project", then I am in the class browser, else I am not.


--- Quote from: rickg22 ---Anyway try disabling the codecompletion
--- End quote ---
That worked :)


--- Quote from: rickg22 ---Thanks for your help! :)
--- End quote ---
Thanks for your help! :lol:

Navigation

[0] Message Index

[#] Next page

Go to full version