Hi *,

with cmake 2.6.1 using the Eclipse CDT Generator I get reproducable crashes:

    std::string outputPath = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");

in the function void cmExtraEclipseCDT4Generator::CreateProjectFile():

...
  // TODO: refactor this
  // create linked resources
  if (this->IsOutOfSourceBuild)
    {
    fout << "\t<linkedResources>\n";
    // for each sub project create a linked resource to the source dir
    // - only if it is an out-of-source build
    for (std::map<cmStdString, std::vector<cmLocalGenerator*> >::const_iterator
          it = this->GlobalGenerator->GetProjectMap().begin();
         it != this->GlobalGenerator->GetProjectMap().end();
         ++it)
      {
      std::string linkSourceDirectory = this->GetEclipsePath(
                            it->second[0]->GetMakefile()->GetStartDirectory());
      // .project dir can't be subdir of a linked resource dir
      if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
                                         linkSourceDirectory.c_str()))
        {
        this->AppendLinkedResource(fout, it->first,
                                   this->GetEclipsePath(linkSourceDirectory));
        this->SrcLinkedResources.push_back(it->first);
        }
      }
    // for EXECUTABLE_OUTPUT_PATH when not in binary dir
>>>>>>
    std::string outputPath = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
>>>>>>
    if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
                        outputPath.c_str(), this->HomeOutputDirectory.c_str()))
      {
      std::string name = this->GetPathBasename(outputPath);

      // make sure linked resource name is unique
      while (this->GlobalGenerator->GetProjectMap().find(name)
             != this->GlobalGenerator->GetProjectMap().end())
        {
        name += "_";
        }
        this->AppendLinkedResource(fout, name,
                                   this->GetEclipsePath(outputPath));
        this->OutLinkedResources.push_back(name);
      }
...

Stacktrace:
        msvcp90d.dll!104ed4c3()         
        [Frames below may be incorrect and/or missing, no symbols loaded for
msvcp90d.dll]
        msvcp90d.dll!104ebfbd()         
        msvcp90d.dll!10488d7c()         
        msvcp90d.dll!1048816c()         
>       cmake.exe!cmExtraEclipseCDT4Generator::CreateProjectFile()  Line 354 + 
> 0x1c bytes       
        cmake.exe!cmExtraEclipseCDT4Generator::Generate()  Line 100     
        cmake.exe!cmGlobalGenerator::Generate()  Line 893 + 0x1b bytes  
        cmake.exe!cmGlobalUnixMakefileGenerator3::Generate()  Line 143  
        cmake.exe!cmake::Generate()  Line 2325 + 0x1b bytes     
        cmake.exe!cmake::Run(const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > > & args=[4]("\cmake\bin\cmake.exe","-G","Eclipse CDT4 - MinGW
Makefiles","..\inforate\packages"), bool noconfigure=false)  Line 2305
+ 0x8 bytes
        cmake.exe!do_cmake(int ac=4, char * * av=0x01825a48)  Line 481 + 0x1a 
bytes     
        cmake.exe!main(int ac=4, char * * av=0x01825a48)  Line 294 + 0xd bytes  
        cmake.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes    
        cmake.exe!mainCRTStartup()  Line 403    
        kernel32.dll!7c816fd7()         

Local variables:
+               outputPath      ""      
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
-               this    0x018794e8 {SrcLinkedResources=[1]("INFORATE")
OutLinkedResources=[0]() HomeDirectory="D:/sources/inforate/packages"
...}    cmExtraEclipseCDT4Generator * const
+               cmExternalMakefileProjectGenerator      
{SupportedGlobalGenerators=[3]("NMake
Makefiles","MinGW Makefiles","Unix Makefiles")
GlobalGenerator=0x018796f0 }    cmExternalMakefileProjectGenerator
+               SrcLinkedResources      [1]("INFORATE") 
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >
                OutLinkedResources      [0]()   
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >
+               HomeDirectory   "D:/sources/inforate/packages"  
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
+               HomeOutputDirectory     "D:/sources/b2" 
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
                IsOutOfSourceBuild      true    bool
                GenerateSourceProject   false   bool
-               fout    {...}   cmGeneratedFileStream
+               cmGeneratedFileStreamBase       {Name="D:/sources/b2/.project"
TempName="D:/sources/b2/.project.tmp" CopyIfDifferent=false
...}    cmGeneratedFileStreamBase
+               std::basic_ofstream<char,std::char_traits<char>
>       {_Filebuffer={...} }    std::basic_ofstream<char,std::char_traits<char>
>
+               filename        "D:/sources/b2/.project"        
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
+               make    "C:/mingw/bin/mingw32-make.exe" 
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
+               mf      0x018766b0 {Prefix="" AuxSourceDirectories=[0]()
cmStartDirectory="D:/sources/inforate/packages" ...}    const cmMakefile
*


Is there a known work-around / patch?

Best regards,

Thomas
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to