User forums > Using Code::Blocks

Memleak fixed in code completion plugin

(1/2) > >>

rickg22:
Yesterday I fixed a memory leak in the code completion plugin (and one or two crashes in the SDK). I haven't been able to test it under linux, but I need all unix users to test it and notify if it stops crashing now.

You need to download it with CVS.

The tag to download is: SNAPSHOT_AUG_11_2005

Thank you.

CleverFool:

--- Code: ---cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks update -C -r SNAPSHOT_AUG_11_2005
cvs [update aborted]: no such tag SNAPSHOT_AUG_11_2005
--- End code ---

Just latest sources (with simple CVS update) gives me:


--- Code: ---Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230419024 (LWP 8640)]
0xb7e61cfb in wxThreadInternal::PthreadStart () from /usr/lib/libwx_gtk2-2.4.soProgram received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230419024 (LWP 8640)]
0xb7e61cfb in wxThreadInternal::PthreadStart () from /usr/lib/libwx_gtk2-2.4.so
(gdb) bt
#0  0xb7e61cfb in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_gtk2-2.4.so
#1  0xb7e61ecc in wxPthreadStart () from /usr/lib/libwx_gtk2-2.4.so
#2  0xb77dcccd in start_thread () from /lib/tls/libpthread.so.0
#3  0xb776fb0e in clone () from /lib/tls/libc.so.6

(gdb) bt
#0  0xb7e61cfb in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_gtk2-2.4.so
#1  0xb7e61ecc in wxPthreadStart () from /usr/lib/libwx_gtk2-2.4.so
#2  0xb77dcccd in start_thread () from /lib/tls/libpthread.so.0
#3  0xb776fb0e in clone () from /lib/tls/libc.so.6
--- End code ---

I'll try to recompile later with debugging info....

rickg22:
Hmmm... if you can't find the tag it means the anonymous CVS hasn't been updated yet. But good idea! Please recompile with debugging info! That way we can see what's going on. (This is something i've asked for so much time :( )

CleverFool:
I've updated snapshot, however there is nothing more interesting I can report yet.

One strange thing I found is that if codeblocks is being run from debuger, which cause it to be a litttle slower - I even have some seconds to play with code completion plugin before codeblocks crashes completely. Some new backtrace I was able to retrieve (don't know if it will help you):


--- Code: ---Program received signal SIGABRT, Aborted.
[Switching to Thread -1225189696 (LWP 12338)]
0xb765c9e7 in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb765c9e7 in raise () from /lib/tls/libc.so.6
#1  0xb765e31b in abort () from /lib/tls/libc.so.6
#2  0xb7693365 in __fsetlocking () from /lib/tls/libc.so.6
#3  0xb769950c in malloc_usable_size () from /lib/tls/libc.so.6
#4  0xb769a5ab in free () from /lib/tls/libc.so.6
#5  0xb769bc4c in malloc () from /lib/tls/libc.so.6
#6  0xb765ed1f in qsort () from /lib/tls/libc.so.6
#7  0xb7d3fd57 in wxBaseArrayPtrVoid::Sort () from /usr/lib/libwx_gtk2-2.4.so
#8  0xb6a90753 in TokensArray::Sort () from /home/ruslan/workspace/codeblocks/src/output/share/CodeBlocks/plugins/libcodecompletion.so
#9  0xb6a8d1b3 in Parser::SortAllTokens () from /home/ruslan/workspace/codeblocks/src/output/share/CodeBlocks/plugins/libcodecompletion.so
#10 0xb6a88295 in NativeParser::MarkItemsByAI () from /home/ruslan/workspace/codeblocks/src/output/share/CodeBlocks/plugins/libcodecompletion.so
#11 0xb6a7f5ce in CodeCompletion::CodeComplete () from /home/ruslan/workspace/codeblocks/src/output/share/CodeBlocks/plugins/libcodecompletion.so
#12 0xb6a8041c in CodeCompletion::DoCodeComplete () from /home/ruslan/workspace/codeblocks/src/output/share/CodeBlocks/plugins/libcodecompletion.so
#13 0xb6a80b78 in CodeCompletion::OnCodeComplete () from /home/ruslan/workspace/codeblocks/src/output/share/CodeBlocks/plugins/libcodecompletion.so
#14 0xb7d46f05 in wxEvtHandler::SearchEventTable () from /usr/lib/libwx_gtk2-2.4.so
#15 0xb7d46cfc in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_gtk2-2.4.so
#16 0xb7a88844 in PluginManager::NotifyPlugins () from /home/ruslan/workspace/codeblocks/src/output/libcodeblocks.so
#17 0xb7a1a658 in cbEditor::NotifyPlugins () from /home/ruslan/workspace/codeblocks/src/output/libcodeblocks.so
#18 0xb7a1d048 in cbEditor::DoAskForCodeCompletion () from /home/ruslan/workspace/codeblocks/src/output/libcodeblocks.so
#19 0xb7a21f0c in cbEditor::OnTimer () from /home/ruslan/workspace/codeblocks/src/output/libcodeblocks.so
#20 0xb7d46f05 in wxEvtHandler::SearchEventTable () from /usr/lib/libwx_gtk2-2.4.so
#21 0xb7d46cfc in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_gtk2-2.4.so
#22 0xb7dc5075 in wxTimerBase::Notify () from /usr/lib/libwx_gtk2-2.4.so
#23 0xb7d07654 in timeout_callback () from /usr/lib/libwx_gtk2-2.4.so
#24 0xb71b67d4 in g_main_context_wakeup () from /usr/lib/libglib-2.0.so.0
#25 0xb71b4a21 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0xb71b7c77 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#27 0xb71b81c8 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#28 0xb7486849 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#29 0xb7cc0896 in wxApp::MainLoop () from /usr/lib/libwx_gtk2-2.4.so
#30 0xb7d14ecf in wxAppBase::OnRun () from /usr/lib/libwx_gtk2-2.4.so
#31 0xb7cc1240 in wxEntry () from /usr/lib/libwx_gtk2-2.4.so
#32 0x08057c32 in ?? ()
#33 0xb7647ec0 in __libc_start_main () from /lib/tls/libc.so.6
#34 0x08057af1 in ?? ()

--- End code ---

rickg22:
Hmm... very interesting. However this is a SIGABRT (abort) and not a SIGSEGV (segmentation fault).

Navigation

[0] Message Index

[#] Next page

Go to full version