KDevelop crashes when adding a file 
    Oliver Eichler 
    oliver.eichler at dspsolutions.de
       
    Wed Jun 16 11:52:49 BST 1999
    
    
  
On 15-Jun-99 Jonas Nordin wrote:
>> I would like to report that KDevelop crashed when adding a new/existing
>> (tried both) file to the project. After choosing the file the app. window
>> is not updated anymore and KDevelop litterally ´explodes´ in memory within
>> seconds.
> 
> Compile kdevelop using debug code( ./configure --enable-debug). Then execute
> kdevelop inside gdb and use backtrace to find out where it crashes. 
> /J
Back from the dungeons of KDevelop the situation look like this:
In file cproject.cpp in line 433 you can find following code:
while((slash_pos = makefile_name.findRev('/')) != -1){ // if found
    slash2_pos = makefile_name.findRev('/',slash_pos-1);
    if(slash2_pos != -1){
      makefile_name.remove(slash2_pos,slash_pos-slash2_pos);
      check_makefile_list.append(makefile_name);
    } 
    else{
      makefile_name = "";
    }
  }
It look like this while loop seems to find all possible strings the
makefile.am. Something like:
/dir1/dir2/dir3/Makefile.am
/dir1/dir2/Makefile.am
/dir1/Makefile.am
/Makefile.am
If this makes sense... I don´t know. Not to me. Anyway the loop is endless as
the last slash never gets removed and the list gets appended enless.
As solution I tried:
  while((slash_pos = makefile_name.findRev('/')) != -1){ // if found
    slash2_pos = makefile_name.findRev('/',slash_pos-1);
    if(slash2_pos != -1){
      if(slash2_pos == 0)
        makefile_name.remove(slash2_pos,slash_pos-slash2_pos+1);
      else
        makefile_name.remove(slash2_pos,slash_pos-slash2_pos);
      check_makefile_list.append(makefile_name);
    } 
    else{
      makefile_name = "";
    }
  }
The loop ends correctly, however KDevelop dies with a segmentation fault later
on. 
I really wonder: Did anyone ever successfully add a file to a project sofar?
I am sorry, I do not have the time to investigate further. Guess I have to wait
for versions >0.4 befor using KDevelop
oliver
---
Oliver Eichler, Dipl.-Ing.
DSP Solutions
Ingenieure Kellermann, Voigt, Hoepfl, Eichler un Weidner
Partnerschaft
    
    
More information about the KDevelop
mailing list