Kdevelop modifies files - even excluded files!

Milian Wolff mail at milianw.de
Tue Mar 1 15:23:51 GMT 2016


On Tuesday, March 1, 2016 3:45:13 PM CET Erik Rull wrote:
> Hi,
> 
> On March 1, 2016 at 2:40 PM Milian Wolff <mail at milianw.de> wrote:
> 
> 
> On Tuesday, March 1, 2016 9:19:30 AM CET Erik Rull wrote:
> 
> Hi all,
> 
> this seems to be a bug:
> 
> Yes, please make sure to report it on our bug tracker at bugs.kde.org.
> 
> My project is up to date and make tells me that there is nothing todo.
> Then I start kdevelop and let the background parser do his work.
> Then I just call make on the command line and get errors because files are
> changed and now corrupted that should not be changed.
> I have some more or less ancient .d files that tell make further
> dependencies on what to do and they get modified by kdevelop!
> 
> Why? And how can I stop that?
> 
> Very good question :) First things first:
> 
> a) what version of KDevelop are you using?
> 
> Kdevelop 4.6.0 on KDE 4.13.3 (available via Kubuntu 14.04)

This is extremely old. I urge you to update to the latest KDevelop 4.7.x 
before doing anything else. Potentially this issue is resolved there already.

> b) what project manager are you using? Custom Make? Assuming the latter,
> then
> 
> Yes.

OK, then the below is very likely the culprit.

> c) I have the gut feeling that our makefileresolver.cpp code is to blame.
> Try disabling it by returning early before m_resolver->resolveIncludePath
> is used in custommakemanager.cpp.
> 
> Errr - I didn't want to recompile it...

Well, if you want to help fixing it, then this is is the only way.

> The modification is really bad, the file gets corrupted and causesrecompiles
> at positions that were actually not really modified by me. Even worse: The
> files are corrupted in a way that the compiler stops with an error!
> 
> Yes, I agree. Just note that we do not write to these files directly.
> Probably it's some external tool that we invoke which triggers the writes.
> Just as bad, but wanted to mention this to give a perspective.
> 
> Example of a "good" file before kdevelop was started:
> common/ArgumentList.o common/ArgumentList.d : common/ArgumentList.cpp
> common/ArgumentList.h \
> common/STL.h common/Tools.h common/Thread.h common/Time.h common/Log.h \
> common/XWare.h
> 
> And after the modification:
> common/ArgumentList.o common/ArgumentList.d : common/ArgumentList.cpp
> common/ArgumentList.h \
> common/STL.h common/Tools.h common/Thread.h common/Time.h common/Log.h \
> common/XWare.h
> ommon/Log.h \
> common/XWare.h
> 
> Please let me know how to stop that. Kdevelop 3.5 never showed that issue.
> 
> When kdevelop is running and I cleaned up the bad files and recreated them
> then everything is fine until the next kdevelop (re-)start.
> I explicitly excluded *.d in the Kdevelop project pattern configuration.
> 
> Excluding these files probably doesn't matter, see above.
> 
> I will try to track the access of the file and try to find the culprit that
> modified it...

Yes, that would be helpful.

Cheers

-- 
Milian Wolff
mail at milianw.de
http://milianw.de



More information about the KDevelop mailing list