wxLogDebug Crashes Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
rodrigod
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Thu Jun 26, 2008 8:50 pm

wxLogDebug Crashes

Post by rodrigod »

On wxlogdebug the program crashes with **SIGABRT. There are many wxlogdebug through out the code, but after the constructor of a class I designed, any wxlogdebug crashes without printing.

Here is some code to show what happens:

this code is on my executable

Code: Select all

wxLogDebug("before");
	
	CdbCanaisTipoPontos *dbTipoPontos=new CdbCanaisTipoPontos();
	wxString teste = "will it crash?";
	wxLogDebug("crashed on this log");
My class is on a dynamic library .so.

this is the code for the constructor (The Class CdbCanaisTipoPontos derives from AVDBase)

Code: Select all

AVDBase::AVDBase(){

	m_pResultSet = NULL; /*pointer to a resultset from databaselayer*/

	m_pDatabaseLayer = NULL; /*pointer to a database object from databaselayer*/

	m_strFunctionError=wxEmptyString; /*wxString*/

	m_Error = wxEmptyString; /*wxString*/

	m_nError = 0; /int*/

}
CdbCanaisTipoPontos::CdbCanaisTipoPontos(){}
I am using opensuse 11.1, ide Monodevelop, Gcc 4.2, wxWidget 2.8.9 dinamic debug

If any more information is need just ask away.

Thanks

**edit: I had written SIGSEV, but the signal I receive is SIGABRT
Last edited by rodrigod on Fri Aug 28, 2009 6:55 pm, edited 2 times in total.
rodrigod
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Thu Jun 26, 2008 8:50 pm

Post by rodrigod »

This gets printed on execution:

*** glibc detected *** /home/spin/SpinGateway/C/LibraryTest/LibraryTest/bin/Debug/LibraryTest: corrupted double-linked list: 0x08061c40 ***
======= Backtrace: =========
/lib/libc.so.6[0xb718b654]
/lib/libc.so.6[0xb718b8f4]
/lib/libc.so.6[0xb718d845]
/lib/libc.so.6(__libc_malloc+0x9c)[0xb718f88c]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_ZN12wxStringBase11AllocBufferEj+0xa3)[0xb75ed987]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_ZN12wxStringBase16AllocBeforeWriteEj+0xa5)[0xb75f0475]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_ZN8wxString11GetWriteBufEj+0x24)[0xb75f0572]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_ZN14wxStringBufferC1ER8wxStringj+0x38)[0xb7594ee6]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_ZN8wxString7PrintfVEPKcPc+0x35)[0xb75f062f]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_ZN8wxString7FormatVEPKcPc+0x38)[0xb75f07d8]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_Z11wxVLogDebugPKcPc+0x44)[0xb75d40ec]
/home/spin/wxGTK-2.8.9/dinDebug/lib/libwx_based-2.8.so.0(_Z10wxLogDebugPKcz+0x2a)[0xb75d4170]
/home/spin/SpinGateway/C/LibraryTest/LibraryTest/bin/Debug/LibraryTest[0x804ae30]
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7135705]
/home/spin/SpinGateway/C/LibraryTest/LibraryTest/bin/Debug/LibraryTest[0x804aa51]

dont know if it will help

thanks
rodrigod
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Thu Jun 26, 2008 8:50 pm

Post by rodrigod »

It was some bizarre linking problem, after recompiling everything it began working again.
Post Reply