Page 1 of 1
CodeLite crash during Find Reference
Posted: Tue Apr 03, 2012 5:32 pm
by dhs
Hi
I have CodeLite crashed everytime I try to use Search --> Find Reference function
Do you have any idea ?
Thank you
Re: CodeLite crash during Find Reference
Posted: Wed Apr 04, 2012 1:19 am
by eranif
OS? codeilte version?
If its under linux - run it under debugger
Also: do you get crash report at ~/.codelite/crash.log
Eran
Re: CodeLite crash during Find Reference
Posted: Wed Apr 04, 2012 10:57 am
by dhs
I am using Redhat Entreprice, using the last version of Codelite we have on the web site
Here is what I see in the crash log
/lib64/libpthread.so.0 [0x314180de70] 0
/lib64/libc.so.6 strlen 0
~/codelite/lib/codelite/libcodeliteu.so CppWordScanner::CppWordScanner(std::string const&) 0
~/codelite/lib/codelite/libcodeliteu.so RefactoringEngine::DoFindReferences(wxString const&, wxFileName con
st&, int, int, std::vector<wxFileName, std::allocator<wxFileName> > const&, bool) 0
~/codelite/lib/codelite/libcodeliteu.so RefactoringEngine::FindReferences(wxString const&, wxFileName const
&, int, int, std::vector<wxFileName, std::allocator<wxFileName> > const&) 0
ContextCpp::OnFindReferences(wxCommandEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, w
xEvtHandler*, wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEvent(wxEvent&) 0
clMainFrame::OnCppContextMenu(wxCommandEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, w
xEvtHandler*, wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEvent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEvent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_gtk2u_core-2.8.so.0 wxWindowBase::TryParent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEvent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_gtk2u_core-2.8.so.0 wxWindowBase::TryParent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEvent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_gtk2u_core-2.8.so.0 wxWindowBase::TryParent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_baseu-2.8.so.0 wxEvtHandler::ProcessEvent(wxEvent&) 0
~/wxGTK-2.8.12/lib/libwx_gtk2u_core-2.8.so.0 wxMenuBase::SendEvent(int, int) 0
~/wxGTK-2.8.12/lib/libwx_gtk2u_core-2.8.so.0 [0x2aaaabcdbbc1] 0
Re: CodeLite crash during Find Reference
Posted: Tue Apr 24, 2012 4:57 pm
by dhs
Hi
I think that I know why CodeLite Crash.
here is the constructor CppWordScanner()
CppWordScanner::CppWordScanner(const std::string &fileName)
: m_filename(fileName)
, m_offset(0)
{
// disable log
wxLogNull nolog;
wxFFile thefile(wxString(fileName.c_str(), wxConvUTF8), wxT("rb"));
if(thefile.IsOpened()) {
wxFileOffset size = thefile.Length();
std::string fileData;
fileData.reserve(size);
wxCSConv fontEncConv(wxFONTENCODING_ISO8859_1);
wxString tmp;
thefile.ReadAll( &tmp, fontEncConv );
m_text = tmp.mb_str().data();
}
doInit();
}
In one of my team file, we have some weird character encapsulated in the comment /* */
CodeList crash at the BOLD line above.
Could you please suggest how to correct the issue so that CodeLite just skip the file and not crash any more ?
Thanks
Re: CodeLite crash during Find Reference
Posted: Tue Apr 24, 2012 9:18 pm
by eranif
dhs wrote:In one of my team file, we have some weird character encapsulated in the comment /* */
Can you send me a sample file with the offending lines that will cause codelite to crash?
If I will be able to reproduce it, I will be able to fix it
Eran
Re: CodeLite crash during Find Reference
Posted: Wed Apr 25, 2012 12:41 pm
by dhs
I send a simple example file
Re: CodeLite crash during Find Reference
Posted: Thu Apr 26, 2012 1:33 pm
by eranif
Hi,
Using this sample did not cause codelite to crash, however it did surface some bad behavior (wrong match position etc)
This is now fixed in trunk, hopefully the crash as well
If you can test it - it will be very much appreciated
Eran