User forums > Using Code::Blocks

Compilation successfull but cant start.

<< < (2/5) > >>

rickg22:
I recall there's some patch for wx2.6.1... now where was the patch guys?

darklordsatan:

--- Quote from: rickg22 on July 28, 2005, 01:05:27 am ---I recall there's some patch for wx2.6.1... now where was the patch guys?

--- End quote ---

To the risk of sounding stupid, did you reffer to this? And its  fixes wxMSW only

Game_Ender:
I am working on the CVS version of codeblocks here, hopefully what I have found will be helpfull.
EDIT: RedHat Enterprise Linux WS wxGTK-2.6.1

I am sure Mandrav has already seen this, but I guess it would be good to post.  Here is the list of incompatibilities wxWidgets 2.6.1 has with wxWidgets 2.4.2.  I have also attached a log from valgrind 2.4.1, which does a really good job of chasing down memory errors and leaks, but only on linux.

There are also two mismatched delete/delete[] errors in wxZipMemory before this error occurs, but valgrind says they aren't related.  They stem from the InitXRCStuff (specifically the call to xmlResource::Get()->Load...) method which is called right before InitFrame call that sets off the creation of the MainFrame and the CreateIDE call.


--- Code: ---==882== Use of uninitialised value of size 4
==882==    at 0x1BD00845: wxWindowBase::GetClientSize() const (in /usr/local/lib/libwx_gtk2_core-2.6.so.0.0.0)
==882==    by 0x8064316: MainFrame::CreateIDE() (main.cpp:419)
==882==    by 0x8063832: MainFrame::MainFrame(wxWindow*) (main.cpp:362)
==882==    by 0x805D466: CodeBlocksApp::InitFrame() (app.cpp:176)
==882==    by 0x805D931: CodeBlocksApp::OnInit() (app.cpp:249)
==882==    by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882==    by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882==    by 0x805CAEE: main (app.cpp:79)
==882==
==882== Invalid read of size 4
==882==    at 0x1BD00845: wxWindowBase::GetClientSize() const (in /usr/local/lib/libwx_gtk2_core-2.6.so.0.0.0)
==882==    by 0x8064316: MainFrame::CreateIDE() (main.cpp:419)
==882==    by 0x8063832: MainFrame::MainFrame(wxWindow*) (main.cpp:362)
==882==    by 0x805D466: CodeBlocksApp::InitFrame() (app.cpp:176)
==882==    by 0x805D931: CodeBlocksApp::OnInit() (app.cpp:249)
==882==    by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882==    by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882==    by 0x805CAEE: main (app.cpp:79)
==882==  Address 0x320 is not stack'd, malloc'd or (recently) free'd
==882==
==882== Process terminating with default action of signal 11 (SIGSEGV)
==882==  Access not within mapped region at address 0x320
==882==    at 0x1BD00845: wxWindowBase::GetClientSize() const (in /usr/local/lib/libwx_gtk2_core-2.6.so.0.0.0)
==882==    by 0x8064316: MainFrame::CreateIDE() (main.cpp:419)
==882==    by 0x8063832: MainFrame::MainFrame(wxWindow*) (main.cpp:362)
==882==    by 0x805D466: CodeBlocksApp::InitFrame() (app.cpp:176)
==882==    by 0x805D931: CodeBlocksApp::OnInit() (app.cpp:249)
==882==    by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882==    by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882==    by 0x805CAEE: main (app.cpp:79)

--- End code ---

EDIT: Just realized this should probably be in the dev forum, thats if I am helping.

Game_Ender:
I got the wxZip error to go away by, they forgot to use "delete[]" instead of "delete" in the destructor of wxZipMemory on line line 488 of zipstrm.cpp.  The segfault is still there though, with an additional error that I forgot to mention before:

--- Code: ---==882== Conditional jump or move depends on uninitialised value(s)
==882==    at 0x805CD8F: CodeBlocksApp::LoadConfig() (app.cpp:92)
==882==    by 0x805D61C: CodeBlocksApp::OnInit() (app.cpp:222)
==882==    by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882==    by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882==    by 0x805CAEE: main (app.cpp:79)

--- End code ---

I am trying to track down the cause right now, but it appears that m_HasDebugLog is used in the LoadConfig function of CodeBlocksApp before it is actually assigned a value.  It appears only to be assigned a value in CmdLineParse which isn't called till after that point.

EDIT: This rabbit whole is way deeper than I have time to fix right now. I got rid of the call to "GetClientSize" just to test, but I still gets lots of pointer errors (ie use of an unintialized value 4 bytes in size) related to GetSize.  Not to mention other errors related to conditional statements based on undefined values.  Later I think I will try to compile under wxGTK-2.4.2 and see how many of these errors are wxGTK 2.6.1 related.

rickg22:
Game_Ender:

Please submit a bug report (or patch) to the wxWidgets project regarding the delete operator. (this doesn't concern the CB development team, but it's important to report it).

BTW, this valgrind looks really cool. I wish there was a windows version. Anyway, if m_HasDebugLog is initialized, try adding a default value (false) in the CodeblocksApp constructor. (I can't understand why it's not issued a warning on compilation - you're using CVS HEAD, right? I'm using VERSION_1_0 ).

Anyway, if this solves the crash, please submit a patch or bug report at SF.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version