Author Topic: Random exit crash on Linux  (Read 14664 times)

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Random exit crash on Linux
« on: August 07, 2011, 05:35:21 pm »
Hi, All, I followed the crash of several days, but have not been able to solve.
This is random crash when exit CB.

step 1. Open a console project, and put the code in main.cpp
Code
#include <iostream>

using namespace std;

void test()
{
    // pos 1
}

int main()
{
    // pos 2
    return 0;
}

step 2. Move the focus between pos1 and pos2, random repeated several times.
step 3. Keep the project is opened, then close CB.
stop 4. Repeat step 1-3 five times or so, will crash again.

Need help!
By the way, this crash can  been catch only Linux.
And maybe related the long random crashes.

Call stack:
Quote
#0 0x7ffff490fc07   malloc_consolidate(av=0x7ffff4c271c0) (malloc.c:5161)
#1 0x7ffff4910528   _int_free(av=0x7ffff4c271c0, p=0x1cc6240) (malloc.c:5034)
#2 0x7ffff49148e3   *__GI___libc_free(mem=<optimized out>) (malloc.c:3738)
#3 0x7ffff5ac66aa   wxStringData::Unlock(this=0x1d116a0) (/usr/include/wx-2.8/wx/string.h:243)
#4 0x7ffff5ac6784   wxStringBase::~wxStringBase(this=0x7ffff60d1800, __in_chrg=<optimized out>) (/usr/include/wx-2.8/wx/string.h:396)
#5 0x7ffff5ac6864   wxString::~wxString(this=0x7ffff60d1800, __in_chrg=<optimized out>) (/usr/include/wx-2.8/wx/string.h:660)
#6 0x7ffff48d1d3d   __cxa_finalize(d=0x7ffff60ca980) (cxa_finalize.c:56)
#7 0x7ffff5ac63c6   __do_global_dtors_aux() (./libcodeblocks.so:??)
#8 (   0x0000000000000000 in ??() (??:??)
« Last Edit: August 07, 2011, 05:39:40 pm by Loaden »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Random exit crash on Linux
« Reply #1 on: August 09, 2011, 10:08:42 am »
Any devs watching about this problem?
Any comments are welcome!
 :D

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Random exit crash on Linux
« Reply #2 on: August 09, 2011, 10:10:57 am »
By the way, some times, we need repeat 10 times or more, to catch the crashes.
Just need some patient.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Random exit crash on Linux
« Reply #3 on: August 09, 2011, 10:21:37 am »
I see it from time to time, but at the moment it does not happen (at least not in debug mode).

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Random exit crash on Linux
« Reply #4 on: August 09, 2011, 10:45:26 am »
I see it from time to time, but at the moment it does not happen (at least not in debug mode).
Thanks for watching.
In here, It happened in debug or normal mode. You can use Code::Blocks project to test it.
Maybe you CPU is too fastest... :lol:

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Random exit crash on Linux
« Reply #5 on: August 09, 2011, 12:42:58 pm »
test the latest trunk version.
three times.
no crash here.
windows XP.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Random exit crash on Linux
« Reply #6 on: August 13, 2011, 10:13:00 am »
See post #0 :
Quote
By the way, this crash can  been catch only Linux.
I will try today and give feedback.
Kernel Extremist - PedroM power ©