eranif / codelite

A multi purpose IDE specialized in C/C++/Rust/Python/PHP and Node.js. Written in C++
https://codelite.org
GNU General Public License v2.0
2.17k stars 462 forks source link

Segfault while searching a resource in a PHP project #853

Closed jclaveau closed 9 years ago

jclaveau commented 9 years ago

Steps to reproduce :

My version is Codelite 8.0.5 (commit 466ff70 on master).

Please tell me if I can provide more information.

Starting program: /home/jean/Programmes/CodeLite/bin/codelite 
warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).

Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe9582700 (LWP 17355)]
[New Thread 0x7fffe8d81700 (LWP 17356)]
[New Thread 0x7fffe3fff700 (LWP 17357)]
[New Thread 0x7fffe37fe700 (LWP 17358)]
[New Thread 0x7fffe2ffd700 (LWP 17359)]
[New Thread 0x7fffbfedb700 (LWP 17361)]
[New Thread 0x7fffbf6da700 (LWP 17362)]
[New Thread 0x7fffbeed9700 (LWP 17363)]
[Thread 0x7fffbfedb700 (LWP 17361) exited]
[New Thread 0x7fffbe6d8700 (LWP 17364)]
[New Thread 0x7fffbded7700 (LWP 17365)]
[New Thread 0x7fffbd6d6700 (LWP 17366)]
[New Thread 0x7fffbced5700 (LWP 17367)]
[New Thread 0x7fffa7fff700 (LWP 17368)]
[New Thread 0x7fffa77fe700 (LWP 17369)]
[New Thread 0x7fffa6ffd700 (LWP 17370)]
[New Thread 0x7fffa67fc700 (LWP 17371)]
[New Thread 0x7fffa5ffb700 (LWP 17372)]
[New Thread 0x7fffa57fa700 (LWP 17373)]
[Thread 0x7fffe37fe700 (LWP 17358) exited]
[Thread 0x7fffe3fff700 (LWP 17357) exited]
[New Thread 0x7fffe3fff700 (LWP 17374)]
[New Thread 0x7fffe37fe700 (LWP 17376)]
[New Thread 0x7fff89ab9700 (LWP 17378)]
[New Thread 0x7fff889ab700 (LWP 17379)]
[New Thread 0x7fff7faf0700 (LWP 17380)]
[New Thread 0x7fff7ea97700 (LWP 17385)]
[New Thread 0x7fffbfedb700 (LWP 17387)]
[New Thread 0x7fff7e296700 (LWP 17396)]
[Thread 0x7fff7e296700 (LWP 17396) exited]
[New Thread 0x7fff7e296700 (LWP 17398)]
[Thread 0x7fff7e296700 (LWP 17398) exited]
[New Thread 0x7fff7da95700 (LWP 17400)]
[Thread 0x7fffe37fe700 (LWP 17376) exited]
[New Thread 0x7fff7e296700 (LWP 17403)]
[Thread 0x7fff7e296700 (LWP 17403) exited]
[New Thread 0x7fff7e296700 (LWP 17405)]
[Thread 0x7fff7e296700 (LWP 17405) exited]
[New Thread 0x7fff7e296700 (LWP 17407)]
[Thread 0x7fff7e296700 (LWP 17407) exited]
[New Thread 0x7fff7e296700 (LWP 17409)]
[Thread 0x7fff7e296700 (LWP 17409) exited]
[New Thread 0x7fff7e296700 (LWP 17411)]
[Thread 0x7fff7e296700 (LWP 17411) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff408bdc9 in sqlite3VdbeDelete ()
   from /home/jean/Programmes/CodeLite//lib/codelite/libwxsqlite3.so
(gdb) bt
#0  0x00007ffff408bdc9 in sqlite3VdbeDelete ()
   from /home/jean/Programmes/CodeLite//lib/codelite/libwxsqlite3.so
#1  0x00007ffff408bb68 in sqlite3VdbeFinalize ()
   from /home/jean/Programmes/CodeLite//lib/codelite/libwxsqlite3.so
#2  0x00007ffff408cf9f in sqlite3_finalize ()
   from /home/jean/Programmes/CodeLite//lib/codelite/libwxsqlite3.so
#3  0x00007ffff40566ec in wxSQLite3Statement::Finalize (this=0x7fffffffbb50)
    at /home/jean/dev/codelite/sdk/wxsqlite3/src/wxsqlite3.cpp:1438
#4  0x00007ffff405542e in wxSQLite3Statement::~wxSQLite3Statement (this=0x7fffffffbb50, 
    __in_chrg=<optimized out>)
    at /home/jean/dev/codelite/sdk/wxsqlite3/src/wxsqlite3.cpp:1161
#5  0x00007ffff4df4513 in PHPLookupTable::LoadFromTableByNameHint (this=0x7fffffffc6e0, 
    matches=..., tableName=..., nameHint=..., flags=PHPLookupTable::kLookupFlags_Contains)
    at /home/jean/dev/codelite/CodeLite/PHPLookupTable.cpp:763
#6  0x00007ffff4df3f0c in PHPLookupTable::LoadAllByFilter (this=0x7fffffffc6e0, matches=..., 
    nameHint=..., flags=PHPLookupTable::kLookupFlags_Contains)
    at /home/jean/dev/codelite/CodeLite/PHPLookupTable.cpp:727
#7  0x00007fff88b0ab05 in OpenResourceDlg::DoGetResources (this=0x7fffffffc2f0, filter=...)
    at /home/jean/dev/codelite/codelitephp/php-plugin/php_open_resource_dlg.cpp:167
#8  0x00007fff88b0a4d4 in OpenResourceDlg::OnTimer (this=0x7fffffffc2f0, event=...)
    at /home/jean/dev/codelite/codelitephp/php-plugin/php_open_resource_dlg.cpp:133
#9  0x00007ffff52e82ae in wxAppConsoleBase::CallEventHandler (this=0xf42020, 
    handler=0x7fffffffc2f0, functor=..., event=...) at ../src/common/appbase.cpp:623
#10 0x00007ffff545b392 in wxEvtHandler::ProcessEventIfMatchesId (entry=..., 
    handler=<optimized out>, event=...) at ../src/common/event.cpp:1392
#11 0x00007ffff545b443 in wxEventHashTable::HandleEvent (this=<optimized out>, event=..., 
    self=self@entry=0x7fffffffc2f0) at ../src/common/event.cpp:998
#12 0x00007ffff545b79d in wxEvtHandler::TryHereOnly (this=this@entry=0x7fffffffc2f0, 
    event=...) at ../src/common/event.cpp:1589
#13 0x00007ffff545b813 in TryBeforeAndHere (event=..., this=this@entry=0x7fffffffc2f0)
    at ../include/wx/event.h:3671
#14 wxEvtHandler::ProcessEventLocally (this=this@entry=0x7fffffffc2f0, event=...)
    at ../src/common/event.cpp:1522
#15 0x00007ffff545b875 in wxEvtHandler::ProcessEvent (this=0x7fffffffc2f0, event=...)
    at ../src/common/event.cpp:1495
#16 0x00007ffff545b607 in wxEvtHandler::SafelyProcessEvent (this=<optimized out>, event=...)
    at ../src/common/event.cpp:1613
#17 0x00007ffff53cbe31 in wxTimerImpl::SendEvent (this=0x40be400)
    at ../src/common/timerimpl.cpp:51
#18 0x00007ffff5e32fe4 in timeout_callback (data=0x40be400) at ../src/gtk/timer.cpp:38
#19 0x00007ffff12c9703 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff12c8ce5 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#21 0x00007ffff12c9048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff12c930a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff78c9447 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff5e22f05 in wxGUIEventLoop::DoRun (this=0x3612150) at ../src/gtk/evtloop.cpp:65
#25 0x00007ffff532ab30 in wxEventLoopBase::Run (this=0x3612150)
    at ../src/common/evtloopcmn.cpp:78
#26 0x00007ffff5e7eccc in wxDialog::ShowModal (this=0x7fffffffc2f0)
    at ../src/gtk/dialog.cpp:181
#27 0x00007fff88b71c1b in PhpPlugin::OnOpenResource (this=0x2108770, e=...)
    at /home/jean/dev/codelite/codelitephp/php-plugin/php.cpp:413
#28 0x00007ffff52e82ae in wxAppConsoleBase::CallEventHandler (this=0xf42020, 
    handler=0x2108770, functor=..., event=...) at ../src/common/appbase.cpp:623
#29 0x00007ffff545b392 in wxEvtHandler::ProcessEventIfMatchesId (entry=..., 
    handler=<optimized out>, event=...) at ../src/common/event.cpp:1392
#30 0x00007ffff545b6f6 in wxEvtHandler::SearchDynamicEventTable (this=this@entry=0xf20f00, 
    event=...) at ../src/common/event.cpp:1751
#31 0x00007ffff545b77e in wxEvtHandler::TryHereOnly (this=this@entry=0xf20f00, event=...)
    at ../src/common/event.cpp:1585
#32 0x00007ffff545b813 in TryBeforeAndHere (event=..., this=this@entry=0xf20f00)
    at ../include/wx/event.h:3671
#33 wxEvtHandler::ProcessEventLocally (this=this@entry=0xf20f00, event=...)
    at ../src/common/event.cpp:1522
#34 0x00007ffff545b875 in wxEvtHandler::ProcessEvent (this=0xf20f00, event=...)
    at ../src/common/event.cpp:1495
#35 0x00007ffff4d626d0 in EventNotifier::ProcessEvent (this=0xf20f00, event=...)
    at /home/jean/dev/codelite/CodeLite/event_notifier.cpp:149
#36 0x0000000000765632 in clMainFrame::OnFindResourceXXX (this=0x10d1980, e=...)
    at /home/jean/dev/codelite/LiteEditor/frame.cpp:5124
#37 0x00007ffff52e82ae in wxAppConsoleBase::CallEventHandler (this=0xf42020, 
    handler=0x10d1980, functor=..., event=...) at ../src/common/appbase.cpp:623
#38 0x00007ffff545b392 in wxEvtHandler::ProcessEventIfMatchesId (entry=..., 
    handler=<optimized out>, event=...) at ../src/common/event.cpp:1392
#39 0x00007ffff545b443 in wxEventHashTable::HandleEvent (this=<optimized out>, event=..., 
    self=self@entry=0x10d1980) at ../src/common/event.cpp:998
#40 0x00007ffff545b79d in wxEvtHandler::TryHereOnly (this=0x10d1980, event=...)
    at ../src/common/event.cpp:1589
#41 0x00007ffff545b5b3 in wxEvtHandler::DoTryChain (this=this@entry=0x10d1cf8, event=...)
    at ../src/common/event.cpp:1554
#42 0x00007ffff545b828 in wxEvtHandler::ProcessEventLocally (this=this@entry=0x10d1cf8, 
    event=...) at ../src/common/event.cpp:1522
#43 0x00007ffff545b875 in wxEvtHandler::ProcessEvent (this=0x10d1cf8, event=...)
    at ../src/common/event.cpp:1495
#44 0x00007ffff545b607 in wxEvtHandler::SafelyProcessEvent (this=<optimized out>, event=...)
---Type <return> to continue, or q <return> to quit---
    at ../src/common/event.cpp:1613
#45 0x00007ffff5e44e7f in gtk_window_key_press_callback (gdk_event=0x2033520, win=0x2851c30)
    at ../src/gtk/window.cpp:972
#46 0x00007ffff78cb815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#47 0x00007ffff15983b8 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#48 0x00007ffff15a9d3d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#49 0x00007ffff15b16f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#50 0x00007ffff15b1ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#51 0x00007ffff79db684 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#52 0x00007ffff79eeefb in gtk_window_propagate_key_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#53 0x00007ffff5e34208 in wxgtk_tlw_key_press_event (widget=0x112d200, event=0x2033520)
    at ../src/gtk/toplevel.cpp:243
#54 0x00007ffff78cb815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#55 0x00007ffff15983b8 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#56 0x00007ffff15a9d3d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#57 0x00007ffff15b16f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#58 0x00007ffff15b1ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#59 0x00007ffff79db684 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#60 0x00007ffff78ca097 in gtk_propagate_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#61 0x00007ffff78ca37b in gtk_main_do_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#62 0x00007ffff32dd1ec in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#63 0x00007ffff12c8e04 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#64 0x00007ffff12c9048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#65 0x00007ffff12c930a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#66 0x00007ffff78c9447 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#67 0x00007ffff5e22f05 in wxGUIEventLoop::DoRun (this=0x1000ba0) at ../src/gtk/evtloop.cpp:65
#68 0x00007ffff532ab30 in wxEventLoopBase::Run (this=0x1000ba0)
    at ../src/common/evtloopcmn.cpp:78
#69 0x00007ffff52ea38d in wxAppConsoleBase::MainLoop (this=0xf42020)
    at ../src/common/appbase.cpp:334
#70 0x00007ffff537649d in wxEntry (argc=<optimized out>, argv=<optimized out>)
    at ../src/common/init.cpp:495
#71 0x000000000084a6ac in main (argc=1, argv=0x7fffffffdfc8)
    at /home/jean/dev/codelite/LiteEditor/app.cpp:256
eranif commented 9 years ago

is it possible to include a sample workspace that reproduces the problem?

does regarding the workspace helps (workspace->retag workspace (full) )

jclaveau commented 9 years ago

If you mean the ".workspace" file, I can but for the workspace itself I cannot as there are copyrights on these sources.

As it looks like a sqlite issue, I can maybe give the db to you?

eranif commented 9 years ago

Please upload and link the workspace-path/.codelite/phpsymbols.db

jclaveau commented 9 years ago

Here it is : http://doc.coloc.c277.fr/data/public/09c1dd

eranif commented 9 years ago

It looks like the disk image is malformed which caused the crash. Did: Workspace -> Retag Workspace (full) help? (its important to run the "full" version as it deletes and regenerate the file from scratch)

If this does not help you either:

and new file should be created for you on startup (once the parsing is done)

eranif commented 9 years ago

This should be fixed now. See commit https://github.com/eranif/codelite/commit/551e645e997b5da893ad49b83a194d624ac3922f for more details

jclaveau commented 9 years ago

Just tested. It works like a charm. Thanks a lot!

eranif commented 9 years ago

:+1: