4412 crash

Discussion about CodeLite development process and patches
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

4412 crash

Post by frank_frl »

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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: 4412 crash

Post by eranif »

works fine here (XP Sp3)
does this happen for a specific project or is it consistent regardless the project?

Eran
Make sure you have read the HOW TO POST thread
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: 4412 crash

Post by frank_frl »

It happens with all projects :(

Frank
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: 4412 crash

Post by frank_frl »

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:

Re: 4412 crash

Post by frank_frl »

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++

Re: 4412 crash

Post by Xavi »

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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: 4412 crash

Post by eranif »

Have u tried re-building codelite ?

Eran
Make sure you have read the HOW TO POST thread
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: 4412 crash

Post by frank_frl »

Xavi wrote:

Code: Select all

   const std::map<wxString, wxString> envSets = EnvironmentConfig::Instance()->GetSettings().GetEnvVarSets(); 
THX,
that fixed it :D

Frank
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: 4412 crash

Post by eranif »

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
Make sure you have read the HOW TO POST thread
Post Reply