Page 1 of 1

4412 crash

Posted: Sun Sep 19, 2010 3:32 pm
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

Re: 4412 crash

Posted: Sun Sep 19, 2010 5:31 pm
by eranif
works fine here (XP Sp3)
does this happen for a specific project or is it consistent regardless the project?

Eran

Re: 4412 crash

Posted: Sun Sep 19, 2010 6:06 pm
by frank_frl
It happens with all projects :(

Frank

Re: 4412 crash

Posted: Sun Sep 19, 2010 6:32 pm
by frank_frl
Hi Eran,

I deleted all configuration files, restarted fresh, but still the same.

Re: 4412 crash

Posted: Sun Sep 19, 2010 8:22 pm
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

Re: 4412 crash

Posted: Sun Sep 19, 2010 10:15 pm
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

Re: 4412 crash

Posted: Sun Sep 19, 2010 10:17 pm
by eranif
Have u tried re-building codelite ?

Eran

Re: 4412 crash

Posted: Sun Sep 19, 2010 10:24 pm
by frank_frl
Xavi wrote:

Code: Select all

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

Frank

Re: 4412 crash

Posted: Sun Sep 19, 2010 10:28 pm
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