User forums => Using Code::Blocks => Topic started by: alexchen on February 04, 2015, 08:29:57 pm
Title: Code blocks crash on CentOS 7
Post by: alexchen on February 04, 2015, 08:29:57 pm
Hi, I am using Code Blocks on Centos 7. I get the build from Jens Lody's respository from Copr and it worked fine in UI mode. But when I run it in command line mode in a script that invokes Code Blocks several times for difference projects, it crashes with the following error. Can someone shed some light on what the problem could be?
Title: Re: Code blocks crash on CentOS 7
Post by: oBFusCATed on February 04, 2015, 09:06:06 pm
Have you observed if this crash happens randomly or it happens for a particular project? Can you share the project? Or make a minimal sample that can be used to reproduce the problem?
Title: Re: Code blocks crash on CentOS 7
Post by: alexchen on February 05, 2015, 01:23:35 am
Although it does not always happen, it is pretty consistent on a certain project when it happens. Unfortunately I cannot make a simple case of the complex build environment. When I have time to narrow it down, I will post more information. Just thought someone may have a clue by looking at the stack dump.
Title: Re: Code blocks crash on CentOS 7
Post by: oBFusCATed on February 05, 2015, 09:20:11 am
Can you install the debug info packages and then try to use a debugger to show us a bit better start traces?
Title: Re: Code blocks crash on CentOS 7
Post by: alexchen on February 05, 2015, 06:43:02 pm
Where to get the debuginfo package? What's its name? This is the CodeBlocks I have: ============= $ yum info codeblocks Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirror.web-ster.com * epel: mirror.hmc.edu * epel-source: mirror.hmc.edu * extras: mirror.pac-12.org * updates: pubmirrors.dal.corespace.com Installed Packages Name : codeblocks Arch : x86_64 Version : 13.12.svn.10091 Release : 1.el7 Size : 12 M Repo : installed From repo : jenslody-codeblocks Summary : OpenSource Cross Platform Free C++ IDE URL : http://www.codeblocks.org/ License : GPLv3+ Description : Code::Blocks is the open-source, cross-platform Integrated Development Environment (IDE). : : It is based on a self-developed plugin framework allowing unlimited extensibility. Most of its functionality is already provided by plugins. : : Plugins included in the base package are: : * Compiler frontend to many free compilers : * Debugger frontend for GDB (and CDB for windows platforms) : * Source formatter (based on AStyle) : * Wizard to create new C++ classes : * Code-completion / symbols-browser (work in progress) : * Default MIME handler : * Wizard to create new Code::Blocks plugins : * To-do list : * Extensible wizard based on scripts : * Autosave (saves your work in the unfortunate case of a crash) =========== What should I do to get the debug information you need? The crash only happens in batch mode where a master shell script calls individual script of each project that invoked CB command line. It works fine if I run build script of each project. There is no way to attach a debugger for this since it is called by shell.
Title: Re: Code blocks crash on CentOS 7
Post by: oBFusCATed on February 05, 2015, 09:30:11 pm
http://jenslody.de/fedora/el7/x86_64/ Obviously you need codeblocks-debuginfo package installed...
Title: Re: Code blocks crash on CentOS 7
Post by: Jenna on February 05, 2015, 09:54:46 pm
Code
yum install codeblocks-debuginfo
as root should work.
Title: Re: Code blocks crash on CentOS 7
Post by: alexchen on February 05, 2015, 10:36:24 pm
Do I need to set up any specially flags in the command line? What should I expect to get when it crashes, or where should I look for debug information?
Title: Re: Code blocks crash on CentOS 7
Post by: oBFusCATed on February 05, 2015, 11:09:40 pm
Start codeblocks under gdb... when it crashes execute the bt command...
Title: Re: Code blocks crash on CentOS 7
Post by: alexchen on February 06, 2015, 12:21:33 am
That's the problem I mentioned. This problem happens within a shell script. It works like this: a script build_linux.sh is executed. It contains commands to go to different projects' folder and run another script that passes the build configuration (debug/release), and workspace file to run CB in batch mode.
build_linux.sh looks like this: for cfg in Debug Release do for proj in A B C D do cd $proj /usr/bin/codeblocks /ni /ns --debug-info --build --target=$cfg A.workspace done done
It fails in project C for instance, but if I run the same command in project C manually, it works. Are you suggesting that I put gdb in front of codeblocks in the script?
Title: Re: Code blocks crash on CentOS 7
Post by: oBFusCATed on February 06, 2015, 01:38:58 am
Yes, why not. You can use gdb -args to pass all arguments. Probably you can use a gdb script to start the execution automatically.