Almost every time when I launch codeblocks, it show me a "Debug report" (A debug report has been generated in the directory "/tmp/codeblocks_dbgrpt-...."). And can not start codeblocks.
If run in a terminal, the last words is
... Added compiler "GNU GCC Compiler" ClassBrowser::UpdateClassBrowserView(): No active project available. ClassBrowser::OnThreadEvent(): Updating class browser... ClassBrowser::OnThreadEvent(): Class browser updated. <- the dialog box show up at this time, then I click OK. -> Aborted
See attachment for the dialog box screenshot, terminal messages and the codeblocks.xml file.
I tried revision 9780 (last changed date: 2014-05-26), and stable version 13.12. Both do not work.
But seems version 10.10 works just fine.
does the crash also happen if you keep c::b in focus?
try to disable the splash screen: http://wiki.codeblocks.org/index.php?title=Code::Blocks_command_line_arguments
with this command
$ codeblocks --no-splash-screen
Sometimes good, sometimes show me "Debug report".
with this command
$ codeblocks --no-splash-screen --debug-log
Currently no "Debug report" or Segmentation fault observed.
with this command
$ codeblocks --debug-log
Sometimes still tell me "Debug report". Seems relate to the focus... because if I click somewhere else during the startup, it will increase the probability of show me "Debug report".
with this command
$ codeblocks --safe-mode
Also, currently no "Debug report" or Segmentation fault observed. But of course, I need the plugins....
And interestly, if I input a wrong parameter, c::b will almost crash for sure, like
$ codeblocks --no-splash-screen --debug-log --asdf
it will tell me Segmentation fault.
I can confirm the crash if you start c::b and remove the focus on startup. I have tried to debug the error, but was not successful. You can avoid this crash if you ceep c::b in the focus on startup (c::b has to be fully loaded before you remove the focus) The crash with the wrong parameter is new. Hopefully a main developer will read this, and fix it, but also you can provide a patch ;)
I have no experience on such a big project...
Well, I tried a bit (use src/CodeBlocks-unix.cbp). But I just can not reproduce the crashes mentioned above (everything work fine) :-(
I found that the wrong-parameter-cause-crash-bug is related to the "Library finder" plugin. Once I disable it, no more crash (Segmentation fault).
For the "Debug report" bug. If I disable the "Compiler" plugin, then "Debug report" won't occur anymore. But of corse we need this plugin...
Hope these help.
I'll see what is going on here. It seems that debian based distros are more affected by this problem.
I've posted a patch here: http://forums.codeblocks.org/index.php/topic,19078.msg130579/topicseen.html
Can you tell me if it fixes the problem or it doesn't as is the case with BlueHazzard?
Last edit: Teodor Petrov 2014-06-18
Do you mean the patch (for src/src/splashscreen.cpp) in Reply #8 ?
It doesn't work, nothing changed...
Yes. Unfortunately I don't have an debian install to test it and try to fix it.
It is related to the splashscreen... so someone interested could try to fix it.
The patch I've attached fixes the problem on my gentoo amd64.
Can you show me a crash dump (gdb backtrace) when using the patch and when you're not using it?
I'm not quite familiar with gdb (I use c::b usually :-)
See attachment. Is this what you want?
I also tried Debian testing (Jessie) and Arch Linux (last update around Apr.) in vitural machine. I can reproduce this bug there too.
Basically, just keep clicking around the splash, the bug will occur with some probability(sometimes high sometimes low).
Yes, it is something like this, but can I ask you to install the debuginfo packages for wxGTK and codeblocks and try again?
For codeblocks please use --enable-debug for the configure script.
Also make sure that you use --prefix and install cb in non-standard location. make uninstall is not the most reliable tool for uninstallying software.
Last edit: Teodor Petrov 2014-06-22
OK, here it is.
Am I need to install the debuginfo packages for gtk and glib ?
The wxgtk package I installed is
https://packages.debian.org/wheezy/libwxgtk2.8-0
Still not revealing, unfortunately.
Can you do a valgrind run for both versions?
valgrind --log-file=/tmp/somefile.txt --track-origins=yes ./codeblocks <some regular="" args="" here="">
like this?
I have done a bisection search (of revisions), and find that this problem is introduced in rev 9420 (r9419 work, r9420 crash).
And, in the current newest version(r9852), I can't even enter c::b (with --no-splash-screen --debug-log will also crash). only --safe-mode will work.
Someone try this patch, but make sure you disable MouseSap plugin (which probably needs to be removed from linux builds or modified)
This should fix the crash and at least on my Ubuntu 14.04 allows middle click paste to work correctly (I was able to select then middle click paste between Gedit and C::B in both directions).
In my patch, I guess I should have retained the call to wxTextBuffer::Translate. Will update when I get time.
eddiexiao: Alpha has committed a fix for this bug, so can you try the latest trunk version and tell us if the bug is fixed there?
Tried version 10123, wx2.8.12 and --with-contrib-plugins=all, in Debian Wheezy(7.8) 64bit.
No crash, looks fine. Thx!
Ok, closing it, if it shows up again don't hesitate to re-open it.