Discussion about CodeLite development process and patches
frank_frl
CodeLite Expert
Posts: 176 Joined: Sun Aug 17, 2008 2:45 pm
Contact:
Post
by frank_frl » Sun Sep 19, 2010 3:32 pm
Hi Eran,
rev 4412 crashes on XP when opening project settings.
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x77c17fd4 in wcslen () from C:\WINDOWS\system32\msvcrt.dll
(gdb) bt
#0 0x77c17fd4 in wcslen () from C:\WINDOWS\system32\msvcrt.dll
#1 0x773fa20d in ImageList_Duplicate ()
from C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df
_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
#2 0x773c14b8 in ImageList_Duplicate ()
from C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df
_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
#3 0x7e368734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
#4 0x00060c9a in ?? ()
#5 0x00000180 in ?? ()
#6 0x00000000 in ?? ()
(gdb)
Frank
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Sun Sep 19, 2010 5:31 pm
works fine here (XP Sp3)
does this happen for a specific project or is it consistent regardless the project?
Eran
frank_frl
CodeLite Expert
Posts: 176 Joined: Sun Aug 17, 2008 2:45 pm
Contact:
Post
by frank_frl » Sun Sep 19, 2010 6:06 pm
It happens with all projects
Frank
frank_frl
CodeLite Expert
Posts: 176 Joined: Sun Aug 17, 2008 2:45 pm
Contact:
Post
by frank_frl » Sun Sep 19, 2010 6:32 pm
Hi Eran,
I deleted all configuration files, restarted fresh, but still the same.
frank_frl
CodeLite Expert
Posts: 176 Joined: Sun Aug 17, 2008 2:45 pm
Contact:
Post
by frank_frl » Sun Sep 19, 2010 8:22 pm
Hi Eran,
I found more time to investigate, the crash is in project_settings_dlg.cpp line 397.
Code: Select all
///////////////////////////////////////////////////////////////////////////
// Set the environment page
///////////////////////////////////////////////////////////////////////////
m_choiceEnv->Clear();
const std::map<wxString, wxString>& envSets = EnvironmentConfig::Instance()->GetSettings().GetEnvVarSets();
std::map<wxString, wxString>::const_iterator iterI = envSets.begin();
int useActiveSetIndex = m_choiceEnv->Append(USE_WORKSPACE_ENV_VAR_SET);
for (; iterI != envSets.end(); iterI++) {
m_choiceEnv->Append(iterI->first); // Crashes here already in the first iteration !!!!!!!!!!!!!!
}
int selEnv = m_choiceEnv->FindString( buildConf->GetEnvVarSet() );
m_choiceEnv->SetSelection(selEnv == wxNOT_FOUND ? useActiveSetIndex : selEnv);
Frank
Xavi
CodeLite Enthusiast
Posts: 12 Joined: Mon Apr 19, 2010 4:52 pm
Genuine User: Yes
IDE Question: C++
Post
by Xavi » Sun Sep 19, 2010 10:15 pm
frank_frl wrote: Code: Select all
const std::map<wxString, wxString>& envSets = EnvironmentConfig::Instance()->GetSettings().GetEnvVarSets();
Plase try after .-
Code: Select all
const std::map<wxString, wxString> envSets = EnvironmentConfig::Instance()->GetSettings().GetEnvVarSets();
HTH,
--
Xavi
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Sun Sep 19, 2010 10:17 pm
Have u tried re-building codelite ?
Eran
frank_frl
CodeLite Expert
Posts: 176 Joined: Sun Aug 17, 2008 2:45 pm
Contact:
Post
by frank_frl » Sun Sep 19, 2010 10:24 pm
Xavi wrote:
Code: Select all
const std::map<wxString, wxString> envSets = EnvironmentConfig::Instance()->GetSettings().GetEnvVarSets();
THX,
that fixed it
Frank
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Sun Sep 19, 2010 10:28 pm
I was about to post that probably Xavi's advise is correct:
this call:
Code: Select all
EnvironmentConfig::Instance()->GetSettings()
returns a temporary object, so the reference to the map was probably destroyed by the time the iteration started
Fixed in trunk
Eran