Author Topic: Code blocks crash on CentOS 7  (Read 4316 times)

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Code blocks crash on CentOS 7
« 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?

*** Error in `/usr/bin/codeblocks': corrupted double-linked list: 0x00000000038de2c0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c8d9)[0x7f660a8438d9]
/lib64/libc.so.6(+0x7d087)[0x7f660a844087]
/lib64/libcodeblocks.so.0(_ZN11ProjectFileD1Ev+0x275)[0x7f660fc6f8b5]
/lib64/libcodeblocks.so.0(_ZN9cbProject13CloseAllFilesEb+0x165)[0x7f660fbb5805]
/lib64/libcodeblocks.so.0(_ZN14ProjectManager12CloseProjectEP9cbProjectbb+0x1b2)[0x7f660fc8b7c2]
/lib64/libcodeblocks.so.0(_ZN14ProjectManager16CloseAllProjectsEb+0x46)[0x7f660fc8b9f6]
/lib64/libcodeblocks.so.0(_ZN14ProjectManager14CloseWorkspaceEv+0x4d)[0x7f660fc8badd]
/usr/bin/codeblocks[0x4a6a80]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent+0x56)[0x7f660dd7c646]
/lib64/libwx_baseu-2.8.so.0(_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler+0x6b)[0x7f660dd7c6eb]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0xc7)[0x7f660dd7ca57]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x50)[0x7f660dd7c9e0]
/lib64/libwx_gtk2u_core-2.8.so.0(_ZN12wxWindowBase5CloseEb+0x5c)[0x7f660e70bf6c]
/usr/bin/codeblocks[0x446fd1]
/lib64/libwx_baseu-2.8.so.0(_Z7wxEntryRiPPw+0x4c)[0x7f660dd2921c]
/usr/bin/codeblocks[0x435d92]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f660a7e8af5]
/usr/bin/codeblocks[0x44240d]
======= Memory map: ========
00400000-0053d000 r-xp 00000000 fd:01 136220591                          /usr/bin/codeblocks
0073d000-0074e000 r--p 0013d000 fd:01 136220591                          /usr/bin/codeblocks
0074e000-00754000 rw-p 0014e000 fd:01 136220591                          /usr/bin/codeblocks
00754000-0075c000 rw-p 00000000 00:00 0
00b51000-03ce6000 rw-p 00000000 00:00 0                                  [heap]
7f65e5f81000-7f65e5f82000 ---p 00000000 00:00 0
7f65e5f82000-7f65e6782000 rw-p 00000000 00:00 0
7f65e6782000-7f65e7c92000 r--p 00000000 fd:01 2183945                    /usr/share/icons/hicolor/icon-theme.cache
7f65e7c92000-7f65ec000000 r--p 00000000 fd:01 71927586                   /usr/share/icons/gnome/icon-theme.cache
7f65ec000000-7f65ec022000 rw-p 00000000 00:00 0
7f65ec022000-7f65f0000000 ---p 00000000 00:00 0
7f65f0000000-7f65f0022000 rw-p 00000000 00:00 0
7f65f0022000-7f65f4000000 ---p 00000000 00:00 0
7f65f4000000-7f65f4021000 rw-p 00000000 00:00 0
7f65f4021000-7f65f8000000 ---p 00000000 00:00 0
7f65f8540000-7f65f8541000 ---p 00000000 00:00 0
7f65f8541000-7f65f8d41000 rw-p 00000000 00:00 0
7f65f8d41000-7f65f8d8e000 r--p 00000000 fd:01 135868321                  /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf
7f65f8d8e000-7f65f8e0e000 rw-s 00000000 00:04 2883597                    /SYSV00000000 (deleted)
7f65f8e0e000-7f65f8ebe000 r--p 00000000 fd:01 135868341                  /usr/share/fonts/dejavu/DejaVuSans.ttf
7f65f8ebe000-7f65f8f77000 r-xp 00000000 fd:01 8963                       /usr/lib64/codeblocks/plugins/libcompiler.so
7f65f8f77000-7f65f9177000 ---p 000b9000 fd:01 8963                       /usr/lib64/codeblocks/plugins/libcompiler.so
7f65f9177000-7f65f917d000 r--p 000b9000 fd:01 8963                       /usr/lib64/codeblocks/plugins/libcompiler.so
7f65f917d000-7f65f917f000 rw-p 000bf000 fd:01 8963                       /usr/lib64/codeblocks/plugins/libcompiler.so
7f65f917f000-7f65f9182000 rw-p 00000000 00:00 0
7f65f9182000-7f65f91e2000 rw-s 00000000 00:04 2785292                    /SYSV00000000 (deleted)
7f65f91e2000-7f65f91e8000 r-xp 00000000 fd:01 136489090                  /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f65f91e8000-7f65f93e7000 ---p 00006000 fd:01 136489090                  /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f65f93e7000-7f65f93e8000 r--p 00005000 fd:01 136489090                  /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f65f93e8000-7f65f93e9000 rw-p 00006000 fd:01 136489090                  /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f65f93e9000-7f65f93ea000 ---p 00000000 00:00 0
7f65f93ea000-7f65f9bea000 rw-p 00000000 00:00 0                          [stack:57273]
7f65f9bea000-7f65f9beb000 ---p 00000000 00:00 0
7f65f9beb000-7f65fa3eb000 rw-p 00000000 00:00 0
7f65fa3eb000-7f65fa3ec000 ---p 00000000 00:00 0
7f65fa3ec000-7f65fabec000 rw-p 00000000 00:00 0                          [stack:57271]
7f65fabec000-7f65fad4a000 r-xp 00000000 fd:01 201398658                  /usr/lib64/libxml2.so.2.9.1
7f65fad4a000-7f65faf49000 ---p 0015e000 fd:01 201398658                  /usr/lib64/libxml2.so.2.9.1
7f65faf49000-7f65faf51000 r--p 0015d000 fd:01 201398658                  /usr/lib64/libxml2.so.2.9.1
7f65faf51000-7f65faf53000 rw-p 00165000 fd:01 201398658                  /usr/lib64/libxml2.so.2.9.1
7f65faf53000-7f65faf55000 rw-p 00000000 00:00 0
7f65faf55000-7f65faf57000 r-xp 00000000 fd:01 201398629                  /usr/lib64/libutil-2.17.so
7f65faf57000-7f65fb156000 ---p 00002000 fd:01 201398629                  /usr/lib64/libutil-2.17.so
7f65fb156000-7f65fb157000 r--p 00001000 fd:01 201398629                  /usr/lib64/libutil-2.17.so
7f65fb157000-7f65fb158000 rw-p 00002000 fd:01 201398629                  /usr/lib64/libutil-2.17.so
7f65fb158000-7f65fb17f000 r-xp 00000000 fd:01 201515288                  /usr/lib64/libbluray.so.1.2.0
7f65fb17f000-7f65fb37f000 ---p 00027000 fd:01 201515288                  /usr/lib64/libbluray.so.1.2.0
7f65fb37f000-7f65fb380000 r--p 00027000 fd:01 201515288                  /usr/lib64/libbluray.so.1.2.0
7f65fb380000-7f65fb381000 rw-p 00028000 fd:01 201515288                  /usr/lib64/libbluray.so.1.2.0
7f65fb381000-7f65fb3b7000 r-xp 00000000 fd:01 205328783                  /usr/lib64/libgvfscommon.so.0.0.0
7f65fb3b7000-7f65fb5b7000 ---p 00036000 fd:01 205328783                  /usr/lib64/libgvfscommon.so.0.0.0/home/Project/Sandbox/Linux/CodeBlocks_Build.sh: line 7: 57269 Aborted                 (core dumped) /usr/bin/codeblocks /ni /ns --$BUILD_TYPE --target=$TARGET ${WORKSPACE}.workspace >> "$LOG_FILE" 2>&1


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks crash on CentOS 7
« Reply #1 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Code blocks crash on CentOS 7
« Reply #2 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks crash on CentOS 7
« Reply #3 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Code blocks crash on CentOS 7
« Reply #4 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks crash on CentOS 7
« Reply #5 on: February 05, 2015, 09:30:11 pm »
http://jenslody.de/fedora/el7/x86_64/
Obviously you need codeblocks-debuginfo package installed...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code blocks crash on CentOS 7
« Reply #6 on: February 05, 2015, 09:54:46 pm »
Code
yum install codeblocks-debuginfo
as root should work.

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Code blocks crash on CentOS 7
« Reply #7 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks crash on CentOS 7
« Reply #8 on: February 05, 2015, 11:09:40 pm »
Start codeblocks under gdb... when it crashes execute the bt command...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Code blocks crash on CentOS 7
« Reply #9 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks crash on CentOS 7
« Reply #10 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]