Author Topic: LINUX: Tools Run Crash and Company...  (Read 38353 times)

moloh

  • Guest
LINUX: Tools Run Crash and Company...
« on: May 13, 2006, 11:36:50 am »
I found a bad behaviour under Linux, i want to use cmake Makefile generator from Tools menu, made an entry
(Name:cmake, Executable:cmake, Parameters:${PROJECT_DIR}, Working Directory:${PROJECT_DIR}/.cmake) to configure out-of-the source build and try to run it. Result? crash. Under gdb i get onlt this as backtrace:
Code
#0  0xb76f10b2 in wxTimer::~wxTimer () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#1  0xb6ed3c27 in g_main_context_wakeup () from /usr/lib/libglib-2.0.so.0
#2  0xb7a6643b in __pthread_alt_unlock () from /lib/libpthread.so.0
Te get more info i tried to run codeblocks under valgrind, here i present results, i also found other bug in TinyXML usage. Location:
Code
File: configmanager.cpp
Line: 103-105
Problem: Pass non-NULL terminated string to TinyXML Parse function
Result: Invalid Read after allocated block, but this don't cause any trouble (no crash).
Now to importand part of valgrind error log:
These warning show before actually Tools is executed in console but after "click":
Code
==20299== Warning: invalid file descriptor 1014 in syscall close()
==20299== Warning: invalid file descriptor 1015 in syscall close()
==20299== Warning: invalid file descriptor 1016 in syscall close()
==20299==    Use --log-fd=<number> to select an alternative log fd.
==20299== Warning: invalid file descriptor 1017 in syscall close()
==20299== Warning: invalid file descriptor 1018 in syscall close()
==20299== Warning: invalid file descriptor 1019 in syscall close()
==20299== Warning: invalid file descriptor 1020 in syscall close()
==20299== Warning: invalid file descriptor 1021 in syscall close()
==20299== Warning: invalid file descriptor 1022 in syscall close()
==20299== Warning: invalid file descriptor 1023 in syscall close()
And this is valgrind backtrace for error:
Code
==17229== Invalid read of size 4
==17229==    at 0x483AEBA: wxTimer::Stop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.2.0)
==17229==    by 0x4A6B477: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFA602: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFA7C6: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFA8E3: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFAB56: wxEvtHandler::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4A6BA18: wxAppConsole::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4180022: Manager::ProcessPendingEvents() (manager.cpp:105)
==17229==    by 0x41E9138: SimpleTextLog::AddLog(wxString const&, bool) (simpletextlog.cpp:66)
==17229==    by 0x418496B: MessageManager::Log(wchar_t const*, ...) (messagemanager.cpp:232)
==17229==    by 0x41F11AD: ToolsManager::OnToolStdOutput(CodeBlocksEvent&) (toolsmanager.cpp:384)
==17229==    by 0x4A6B477: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so. 0.2.0)
==17229==  Address 0x6DA13FC is 0 bytes after a block of size 164 alloc'd
==17229==    at 0x401CC31: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==17229==    by 0x4180589: Manager::GetToolsManager() const (manager.h:139)
==17229==    by 0x8090EF4: MainFrame::CreateMenubar() (main.cpp:673)
==17229==    by 0x8091DAF: MainFrame::CreateIDE() (main.cpp:537)
==17229==    by 0x8092A47: MainFrame::MainFrame(wxWindow*) (main.cpp:458)
==17229==    by 0x8065B5A: CodeBlocksApp::InitFrame() (app.cpp:218)
==17229==    by 0x8066B66: CodeBlocksApp::OnInit() (app.cpp:378)
==17229==    by 0x8067890: wxAppConsole::CallOnInit() (app.h:87)
==17229==    by 0x4AA0B91: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4B90420: (below main) (in /lib/libc-2.3.6.so)
==17229==
==17229== Invalid write of size 4
==17229==    at 0x483AECA: wxTimer::Stop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.2.0)
==17229==    by 0x4A6B477: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFA602: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFA7C6: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFA8E3: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4AFAB56: wxEvtHandler::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4A6BA18: wxAppConsole::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4180022: Manager::ProcessPendingEvents() (manager.cpp:105)
==17229==    by 0x41E9138: SimpleTextLog::AddLog(wxString const&, bool) (simpletextlog.cpp:66)
==17229==    by 0x418496B: MessageManager::Log(wchar_t const*, ...) (messagemanager.cpp:232)
==17229==    by 0x41F11AD: ToolsManager::OnToolStdOutput(CodeBlocksEvent&) (toolsmanager.cpp:384)
==17229==    by 0x4A6B477: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==  Address 0x6DA13FC is 0 bytes after a block of size 164 alloc'd
==17229==    at 0x401CC31: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==17229==    by 0x4180589: Manager::GetToolsManager() const (manager.h:139)
==17229==    by 0x8090EF4: MainFrame::CreateMenubar() (main.cpp:673)
==17229==    by 0x8091DAF: MainFrame::CreateIDE() (main.cpp:537)
==17229==    by 0x8092A47: MainFrame::MainFrame(wxWindow*) (main.cpp:458)
==17229==    by 0x8065B5A: CodeBlocksApp::InitFrame() (app.cpp:218)
==17229==    by 0x8066B66: CodeBlocksApp::OnInit() (app.cpp:378)
==17229==    by 0x8067890: wxAppConsole::CallOnInit() (app.h:87)
==17229==    by 0x4AA0B91: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.2.0)
==17229==    by 0x4B90420: (below main) (in /lib/libc-2.3.6.so)
==17229==
==17229== Invalid read of size 4
==17229==    at 0x483B0B2: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.2.0)
==17229==    by 0x50D9C26: (within /usr/lib/libglib-2.0.so.0.800.6)
==17229==  Address 0x68 is not stack'd, malloc'd or (recently) free'd
Crash is caused by last call but, but two previous ones are incorrect... For me it's hard to say what is problem, i am not familiar with Code::Blocks sources.
This is from revision 2449.

« Last Edit: May 13, 2006, 11:38:24 am by moloh »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: LINUX: Tools Run Crash and Company...
« Reply #1 on: May 13, 2006, 01:46:10 pm »
Regarding invalid read from tinyXML, that is correct, it is a known bug. The buffer is not null-terminated, which was a programming mistake of mine, not tinyXML's fault.

It is not an issue, though. Since March 13, we're using a completely different loading strategy in the development branch, which, among other things, fixes this bug.

However, since nobody ever seemed to have had a problem with the missing '\0' in 7 months (most of the time, there happens to be one by chance), I left the buggy code in HEAD untouched for now.
Modifying the same text block inside the same file in two different revision-controlled source trees causes a lot of havoc, which is something you like to avoid when you can ;)

The trees will be merged by the end of this month, anyway. By that time, this problem will be fixed, too.

The other thing... no bloody idea :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

moloh

  • Guest
Re: LINUX: Tools Run Crash and Company...
« Reply #2 on: May 13, 2006, 10:13:49 pm »
However, since nobody ever seemed to have had a problem with the missing '\0' in 7 months (most of the time, there happens to be one by chance), I left the buggy code in HEAD untouched for now.
It is no "problem" as memory allocations rutines usually alloc more space for program, then even as it looks as invalid read, it is read in program memory as far i know.

The other thing... no bloody idea :)
I tried to get a debug version of wxwidgets to see if i can get more information but result is the same. Only problem is a bunch of ASSERTS from wxwidgets in load process (like loading if image of size zero). I can locate them all and send reports, but i don't know if You are concerned about them. It only result in that the debug version is unusable with Code::Blocks.
As for error i would say that wxTimer was freed somehow before call, but i may be wrong.

moloh

  • Guest
Re: LINUX: Tools Run Crash and Company...
« Reply #3 on: May 16, 2006, 07:47:43 pm »
I manage to test same configuration (or similar one) on Windows machine. And what? It works... how suprising.
But i use LINUX, may someone help me to debug this problem? Maybe some instructions how this can be made. I want it fixed, i may even try to hack Code::Blocks sources.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: LINUX: Tools Run Crash and Company...
« Reply #4 on: May 16, 2006, 08:34:38 pm »
I manage to test same configuration (or similar one) on Windows machine. And what? It works... how suprising.
That confirms the suspicion that I was getting after reading your other thread. Possibly the problem is not to be found in Code::Blocks at all, but in some weird configuration (or buggy library versions) of your gentoo system.
It just seems strange that nothing works for you whereas it mostly works quite OK for everybody.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LINUX: Tools Run Crash and Company...
« Reply #5 on: May 16, 2006, 08:50:08 pm »
I manage to test same configuration (or similar one) on Windows machine. And what? It works... how suprising.
But i use LINUX, may someone help me to debug this problem? Maybe some instructions how this can be made. I want it fixed, i may even try to hack Code::Blocks sources.

Surprise: I mainly use linux and everything works here too (3 installations, all debian based).
Try the following please:

Code
make clean-zipfiles
make clean-bin
make
make install
Be patient!
This bug will be fixed soon...

moloh

  • Guest
Re: LINUX: Tools Run Crash and Company...
« Reply #6 on: May 16, 2006, 10:38:00 pm »
I manage to test same configuration (or similar one) on Windows machine. And what? It works... how suprising.
That confirms the suspicion that I was getting after reading your other thread. Possibly the problem is not to be found in Code::Blocks at all, but in some weird configuration (or buggy library versions) of your gentoo system.
It just seems strange that nothing works for you whereas it mostly works quite OK for everybody.

Maybe, but this would be the first application that works weird. As for wxWidgets i use onlt aMule - it works stable. But hey i use gcc-4.1, who knows implications.
At weekend i will install some binary distribution, probably debian and see results. When i will heve some new info i will post it here.

moloh

  • Guest
Re: LINUX: Tools Run Crash and Company...
« Reply #7 on: May 23, 2006, 11:22:07 am »
New informations...
I managed to install debian unstable, get newest svn build (i use a ubuntu deb package http://forums.codeblocks.org/index.php?topic=3172.0) and get crash with tools.
What i have done?
Added tool named: ln
Executable: ln
Parameters: --help
Run this and crash. Valgrind output, i have to say it is slighty different, it has slighty different trace, why? i don't have any idea, but problem is with the same element.
Code
==4175== Invalid read of size 4
==4175==    at 0x465A8CA: wxTimer::Stop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x420068F: ToolsManager::OnToolTerminated(CodeBlocksEvent&) (in /usr/lib/libcodeblocks.so.0.0.1)
==4175==    by 0x48AE814: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x49403F2: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x49405FE: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x49407DE: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x4940E45: wxEvtHandler::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x48AEB7B: wxAppConsole::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x4634F9B: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x527A7C0: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x52781AB: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x527B63A: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175==  Address 0x698647C is 0 bytes after a block of size 164 alloc'd
==4175==    at 0x401C825: operator new(unsigned) (vg_replace_malloc.c:164)
==4175==    by 0x4180617: Manager::GetToolsManager() const (in /usr/lib/libcodeblocks.so.0.0.1)
==4175==    by 0x808D546: (within /usr/bin/codeblocks)
==4175==    by 0x808E3F7: (within /usr/bin/codeblocks)
==4175==    by 0x808F198: (within /usr/bin/codeblocks)
==4175==    by 0x806609D: (within /usr/bin/codeblocks)
==4175==    by 0x8066E40: (within /usr/bin/codeblocks)
==4175==    by 0x80680FE: wxAppConsole::CallOnInit() (in /usr/bin/codeblocks)
==4175==    by 0x48E56BF: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x48E57A5: wxEntry(int&, char**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x8062A43: (within /usr/bin/codeblocks)
==4175==    by 0x4AC8EAF: (below main) (in /lib/tls/libc-2.3.6.so)
==4175==
==4175== Invalid write of size 4
==4175==    at 0x465A8DA: wxTimer::Stop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x420068F: ToolsManager::OnToolTerminated(CodeBlocksEvent&) (in /usr/lib/libcodeblocks.so.0.0.1)
==4175==    by 0x48AE814: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x49403F2: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x49405FE: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x49407DE: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x4940E45: wxEvtHandler::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x48AEB7B: wxAppConsole::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x4634F9B: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x527A7C0: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x52781AB: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x527B63A: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175==  Address 0x698647C is 0 bytes after a block of size 164 alloc'd
==4175==    at 0x401C825: operator new(unsigned) (vg_replace_malloc.c:164)
==4175==    by 0x4180617: Manager::GetToolsManager() const (in /usr/lib/libcodeblocks.so.0.0.1)
==4175==    by 0x808D546: (within /usr/bin/codeblocks)
==4175==    by 0x808E3F7: (within /usr/bin/codeblocks)
==4175==    by 0x808F198: (within /usr/bin/codeblocks)
==4175==    by 0x806609D: (within /usr/bin/codeblocks)
==4175==    by 0x8066E40: (within /usr/bin/codeblocks)
==4175==    by 0x80680FE: wxAppConsole::CallOnInit() (in /usr/bin/codeblocks)
==4175==    by 0x48E56BF: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x48E57A5: wxEntry(int&, char**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x8062A43: (within /usr/bin/codeblocks)
==4175==    by 0x4AC8EAF: (below main) (in /lib/tls/libc-2.3.6.so)
==4175==
==4175== Invalid read of size 4
==4175==    at 0x465ABF2: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x5279FA5: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x52781AB: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x527B63A: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x527B996: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175==    by 0x4EB2340: gtk_main (in /usr/lib/libgtk-x11-2.0.so.0.800.17)
==4175==    by 0x4650B37: wxEventLoop::Run() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x46EDB48: wxAppBase::MainLoop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x46EDC40: wxAppBase::OnRun() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175==    by 0x8064A4D: (within /usr/bin/codeblocks)
==4175==    by 0x48E56E9: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==    by 0x48E57A5: wxEntry(int&, char**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175==  Address 0x44 is not stack'd, malloc'd or (recently) free'd

Additionally this build produced a file codeblocks.xml:
Code
<?xml version="1.0" encoding="utf-8"?>
<report version="1.0" kind="exception">
  <system description="Linux 2.6.16-1-k7 i686"/>
  <modules>
    <module path="/lib/ld-2.3.6.so" address="04000000" size="00017000" version="2.3.6"/>
    <module path="/usr/lib/valgrind/x86-linux/vgpreload_core.so" address="04019000" size="00002000" version="linux/vgpreload_core"/>
    <module path="/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so" address="0401f000" size="00001000" version="linux/vgpreload_memcheck"/>
    <module path="/usr/lib/gconv/ISO8859-1.so" address="04021000" size="00002000" version="1"/>
    <module path="/usr/lib/X11/locale/common/xlcDef.so.2.0.0" address="04025000" size="00001000" version="2.0.0"/>
    <module path="/usr/lib/libcodeblocks.so.0.0.1" address="04029000" size="00347000" version="0.0.1"/>
    <module path="/lib/tls/libpthread-2.3.6.so" address="04374000" size="00010000" version="2.3.6"/>
    <module path="/lib/tls/libdl-2.3.6.so" address="04386000" size="00004000" version="2.3.6"/>
    <module path="/usr/lib/libwx_gtk2u_xrc-2.6.so.0.3.1" address="0438b000" size="00082000" version="0.3.1"/>
    <module path="/usr/lib/libwx_gtk2u_qa-2.6.so.0.3.1" address="0440e000" size="00020000" version="0.3.1"/>
    <module path="/usr/lib/libwx_gtk2u_html-2.6.so.0.3.1" address="044b2000" size="00005000" version="0.3.1"/>
    <module path="/usr/lib/libwx_gtk2u_adv-2.6.so.0.3.1" address="044b8000" size="0009b000" version="0.3.1"/>
    <module path="/usr/lib/libwx_gtk2u_core-2.6.so.0.3.1" address="04555000" size="002e1000" version="0.3.1"/>
    <module path="/usr/lib/libwx_baseu_xml-2.6.so.0.3.1" address="0483d000" size="00009000" version="0.3.1"/>
    <module path="/usr/lib/libwx_baseu_net-2.6.so.0.3.1" address="04870000" size="00002000" version="0.3.1"/>
    <module path="/usr/lib/libwx_baseu-2.6.so.0.3.1" address="04987000" size="0000e000" version="0.3.1"/>
    <module path="/usr/lib/libstdc++.so.6.0.8" address="049a2000" size="000db000" version="6.0.8"/>
    <module path="/lib/tls/libm-2.3.6.so" address="04a83000" size="00026000" version="2.3.6"/>
    <module path="/lib/libgcc_s.so.1" address="04ab3000" size="00001000" version="1"/>
    <module path="/lib/tls/libc-2.3.6.so" address="04be2000" size="00008000" version="2.3.6"/>
    <module path="/usr/lib/libwxscintilla.so.0.0.1" address="04bed000" size="00102000" version="0.0.1"/>
    <module path="/usr/lib/libgdk-x11-2.0.so.0.800.17" address="04cf0000" size="00082000" version="0.800.17"/>
    <module path="/usr/lib/libz.so.1.2.3" address="04d85000" size="00001000" version="1.2.3"/>
    <module path="/usr/lib/libgtk-x11-2.0.so.0.800.17" address="0506e000" size="00009000" version="0.800.17"/>
    <module path="/usr/lib/libatk-1.0.so.0.1114.0" address="0507a000" size="0001a000" version="0.1114.0"/>
    <module path="/usr/lib/libgdk_pixbuf-2.0.so.0.800.17" address="05095000" size="00016000" version="0.800.17"/>
    <module path="/usr/lib/libfontconfig.so.1.0.4" address="050d4000" size="00005000" version="1.0.4"/>
    <module path="/usr/lib/libXext.so.6.4.0" address="050da000" size="0000e000" version="6.4.0"/>
    <module path="/usr/lib/libXrender.so.1.3.0" address="050ef000" size="00001000" version="1.3.0"/>
    <module path="/usr/lib/libXinerama.so.1.0.0" address="050f2000" size="00001000" version="1.0.0"/>
    <module path="/usr/lib/libXi.so.6.0.0" address="050fa000" size="00001000" version="6.0.0"/>
    <module path="/usr/lib/libXrandr.so.2.0.0" address="050fc000" size="00004000" version="2.0.0"/>
    <module path="/usr/lib/libXcursor.so.1.0.2" address="05108000" size="00001000" version="1.0.2"/>
    <module path="/usr/lib/libXfixes.so.3.0.0" address="0510d000" size="00001000" version="3.0.0"/>
    <module path="/usr/lib/libpango-1.0.so.0.1200.1" address="05145000" size="00002000" version="0.1200.1"/>
    <module path="/usr/lib/libX11.so.6.2.0" address="0520c000" size="00003000" version="6.2.0"/>
    <module path="/usr/lib/libgobject-2.0.so.0.1000.2" address="05249000" size="00001000" version="0.1000.2"/>
    <module path="/usr/lib/libgmodule-2.0.so.0.1000.2" address="0524b000" size="00004000" version="0.1000.2"/>
    <module path="/usr/lib/libgthread-2.0.so.0.1000.2" address="05252000" size="00001000" version="0.1000.2"/>
    <module path="/usr/lib/libglib-2.0.so.0.1000.2" address="052da000" size="00001000" version="0.1000.2"/>
    <module path="/usr/lib/libpng12.so.0.1.2.8" address="052ff000" size="00001000" version="0.1.2.8"/>
    <module path="/usr/lib/libjpeg.so.62.0.0" address="0531f000" size="00001000" version="62.0.0"/>
    <module path="/usr/lib/libtiff.so.4.2.1" address="05372000" size="00003000" version="4.2.1"/>
    <module path="/usr/lib/libexpat.so.1.0.0" address="05376000" size="00020000" version="1.0.0"/>
    <module path="/usr/lib/libpangocairo-1.0.so.0.1200.1" address="0539d000" size="00001000" version="0.1200.1"/>
    <module path="/usr/lib/libcairo.so.2.2.4" address="053e7000" size="00001000" version="2.2.4"/>
    <module path="/usr/lib/libfreetype.so.6.3.10" address="053e9000" size="0006c000" version="6.3.10"/>
    <module path="/usr/lib/libXau.so.6.0.0" address="05457000" size="00001000" version="6.0.0"/>
    <module path="/usr/lib/libXdmcp.so.6.0.0" address="0545b000" size="00002000" version="6.0.0"/>
    <module path="/usr/lib/libpangoft2-1.0.so.0.1200.1" address="05481000" size="00001000" version="0.1200.1"/>
    <module path="/usr/lib/locale/locale-archive" address="05585000" size="00047000"/>
    <module path="/usr/lib/pango/1.5.0/modules/pango-basic-fc.so" address="055d6000" size="00003000" version="fc"/>
    <module path="/lib/tls/libnss_compat-2.3.6.so" address="055df000" size="00009000" version="2.3.6"/>
    <module path="/lib/tls/libnsl-2.3.6.so" address="055fa000" size="00002000" version="2.3.6"/>
    <module path="/lib/tls/libnss_nis-2.3.6.so" address="055fe000" size="0000a000" version="2.3.6"/>
    <module path="/lib/tls/libnss_files-2.3.6.so" address="05612000" size="00002000" version="2.3.6"/>
    <module path="/usr/lib/gtk-2.0/2.4.0/engines/libclearlooks.so" address="0572e000" size="00013000" version="2.0/2.4.0/engines/libclearlooks"/>
    <module path="/usr/lib/libart_lgpl_2.so.2.3.17" address="05756000" size="00001000" version="2.3.17"/>
    <module path="/usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so" address="0575d000" size="00001000" version="xpm"/>
    <module path="/usr/lib/libgnomeprint-2-2.so.0.1.0" address="05c61000" size="00063000" version="0.1.0"/>
    <module path="/usr/lib/libxml2.so.2.6.24" address="05dd7000" size="00005000" version="2.6.24"/>
    <module path="/usr/lib/libgnomeprintui-2-2.so.0.1.0" address="05ddd000" size="00038000" version="0.1.0"/>
    <module path="/usr/lib/libgnomecanvas-2.so.0.1400.0" address="05e3f000" size="00001000" version="0.1400.0"/>
    <module path="/SYSV00000000" address="06e40000" size="00060000"/>
    <module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" address="072e5000" size="00054000"/>
    <module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf" address="07353000" size="00024000"/>
    <module path="/usr/share/codeblocks/plugins/libprojectwizard.so" address="073d7000" size="0004a000"/>
    <module path="/usr/share/codeblocks/plugins/libwxsmith.so" address="075a4000" size="00017000"/>
    <module path="/usr/share/codeblocks/plugins/libastyle.so" address="075bf000" size="0004a000"/>
    <module path="/usr/share/codeblocks/plugins/libcodestat.so" address="07630000" size="00002000"/>
    <module path="/usr/share/codeblocks/plugins/libtodo.so" address="07661000" size="00003000"/>
    <module path="/usr/share/codeblocks/plugins/libdefaultmimehandler.so" address="07686000" size="00002000"/>
    <module path="/usr/share/codeblocks/plugins/libkeybinder.so" address="076ce000" size="00003000"/>
    <module path="/usr/share/codeblocks/plugins/libpluginwizard.so" address="076f4000" size="00002000"/>
    <module path="/usr/share/codeblocks/plugins/libprofiler.so" address="07721000" size="00002000"/>
    <module path="/usr/share/codeblocks/plugins/libclasswizard.so" address="07731000" size="00001000"/>
    <module path="/usr/share/codeblocks/plugins/libhelp_plugin.so" address="07758000" size="00002000"/>
    <module path="/usr/share/codeblocks/plugins/libcodecompletion.so" address="077eb000" size="00005000"/>
    <module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf" address="07ff9000" size="00043000"/>
    <module path="/usr/bin/codeblocks" address="080d6000" size="00006000"/>
    <module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf" address="08bdd000" size="00031000"/>
    <module path="/usr/lib/valgrind/x86-linux/memcheck" address="0a143000" size="00001000"/>
    <module path="[stack]" address="afa5b000" size="00015000"/>
  </modules>
  <stack>
    <frame level="2" function="wxStackWalker::Walk(unsigned int)" offset="0000002e"/>
    <frame level="3" function="wxDebugReport::AddContext(wxDebugReport::Context)" offset="000009f2"/>
    <frame level="4" function="wxDebugReport::AddAll(wxDebugReport::Context)" offset="00000018"/>
    <frame level="5" function="wxHtmlWindow::LoadPage(wxString const&amp;)" offset="00000cdc"/>
    <frame level="6" function="wxFatalSignalHandler" offset="00000026"/>
    <frame level="7"/>
    <frame level="8"/>
    <frame level="9"/>
    <frame level="10" function="g_main_context_dispatch" offset="000001fc"/>
    <frame level="11"/>
    <frame level="12" function="g_main_loop_run" offset="000001f7"/>
    <frame level="13" function="gtk_main" offset="000000c1"/>
    <frame level="14" function="wxEventLoop::Run()" offset="00000058"/>
    <frame level="15" function="wxAppBase::MainLoop()" offset="00000059"/>
    <frame level="16" function="wxAppBase::OnRun()" offset="00000021"/>
    <frame level="17"/>
    <frame level="18" function="wxEntry(int&amp;, wchar_t**)" offset="0000006a"/>
    <frame level="19" function="wxEntry(int&amp;, char**)" offset="00000036"/>
    <frame level="20" function="EditorBase::CreateContextSubMenu(int)" offset="000002bc"/>
  </stack>
</report>

I contacted with one other Gentoo User but he doesn't have these strange crash problems.
One more thought, this problem is with last element of class ToolsManager, wxTimer, so maybe it could be a problem with structure alignment? But this is a blind shoot...
I can't send anything about debian configuration, nor how this binary package was created but i can give some specific informations about my system configuration, but i must say, i don't use anything weird, i never had problems with any library configuration, also i use one more wxWidgets application (aMule) and it works without problems.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LINUX: Tools Run Crash and Company...
« Reply #8 on: May 23, 2006, 11:41:21 am »
Here you go:

Code: cpp
void ToolsManager::OnToolTerminated(CodeBlocksEvent& event)
{
    m_Timer.Stop(); // <-- your crash is here
    m_Pid = 0;
    m_pProcess = 0;

    Manager::Get()->GetMessageManager()->Log(_T("Tool execution terminated with status %d"), event.GetInt());
}

It makes no sense, because m_Timer is a member object (not a pointer). The only time this could be invalid is if the ToolsManager class is not constructed yet. But this can't be the case because it's a singleton. It exists throughout the application lifetime. And, if I 'm not mistaken, you don't get the crash on startup or on shutdown, but during a normal run. Right?

Quote
i never had problems with any library configuration, also i use one more wxWidgets application (aMule) and it works without problems.

This means absolutely nothing. Nil.
The fact that two apps use the same widgets lib under the hood doesn't necessarily indicate faulty usage in one of them (if one is misbehaving). Especially if that lib is wxWidgets. You can have it configured in so many ways (static/shared, monolithic/modular, unicode/ansi, etc).

Quote
I can't send anything about debian configuration, nor how this binary package was created but i can give some specific informations about my system configuration

And you really want to get help after stating this?
Well, I will ask for info and you decide if you want to give me some.
I need the output of the following commands:
Code
wx-config --cflags
wx-config --libs
ldd codeblocks
ldd libcodeblocks.so

(I just hope you 're not using a static wxWidgets build)
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: LINUX: Tools Run Crash and Company...
« Reply #9 on: May 23, 2006, 11:55:16 am »
Hallo,

I have checked both under Gentoo (rev2489) and Ubuntu 5.10 (.deb package rev2484). I have added ln as tool with --help as parameter.

Gentoo works fine, but Ubuntu crashes. It crashes when I press enter (but also with the X button) to close the command line windows and generates the same error report as posted by moloh.

It is possible that this is just a problem of the .deb package instead of C::B itself.

Moloh could you try a previous revision of C::B? And also the new built I will provided today (or tomorrow morning). Thanks :).

Best wishes,
Michael

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: LINUX: Tools Run Crash and Company...
« Reply #10 on: May 23, 2006, 12:38:40 pm »
@mandrav:
The crash does not occur at this position. Valgring simply reports that there is something (possibly) wrong at this place - but its inside a wxWidgets function thus probably not "our" fault. If it would crash there valgrind should not report any other issues beyond this place - but it does.
But the main reason is: Take a look at the backtrace. Unfortunately it is not a complete one, but you can see that above frame level 20 (EditorBase::CreateContextSubMenu(int)) a new main loop is created - looks like one of those wxYield-re-entrance-problems to me. Anyway, this is still strange because I can't see a call to wxYield in the backtrace (OK, it is not complete - maybe some important parts are missing) and with a quick look I couldn't find any problematic line in 'EditorBase::CreateContextSubMenu' that could lead into such trouble.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LINUX: Tools Run Crash and Company...
« Reply #11 on: May 23, 2006, 12:51:20 pm »
@mandrav:
... and with a quick look I couldn't find any problematic line in 'EditorBase::CreateContextSubMenu' that could lead into such trouble.

The backtrace is invalid. Unless I 'm mistaken, he experiences this crash when running a custom tool. EditorBase::CreateContextSubMenu() just doesn't belong in this picture...
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: LINUX: Tools Run Crash and Company...
« Reply #12 on: May 23, 2006, 02:17:59 pm »
Hello,

I have built a .deb package for rev2489, but still get the same crash. And I have used make clean-zipfiles, before building.

Best wishes,
Michael

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: LINUX: Tools Run Crash and Company...
« Reply #13 on: May 23, 2006, 03:27:33 pm »
I tried with my own compiled version in Dapper and get the crash calling ln --help with any launching option, and get the same backtrace too.

I also tried calling a python program that just prints argv and it works fine.

Time to wonder...

BTW, I also tried calling ln --help under Windows (I have unxutils in the path) and it worked fine (it's meaningless, I know, but I just wanted to try :)).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LINUX: Tools Run Crash and Company...
« Reply #14 on: May 23, 2006, 04:05:55 pm »
I tried with my own compiled version in Dapper and get the crash calling ln --help with any launching option, and get the same backtrace too.

So you are looking at it? Good :)
Be patient!
This bug will be fixed soon...