Sep
09
2010

Patched kdelibs for running KDevelop from GIT without crashes

IT

Recent KDevelop GIT builds are crashing with katepart from kdelibs 4.5.1, so for us Archers I made patched package which should work better.

If you don't want to do this, you have more options how to fix it.

This will be included in KDE 4.5.2 which is scheulded at the end of this month, so this is only a temporary fix, which I will not even add in the AUR.

Here is tarball with PKGBUILD and patches. Just build and install. The package comes with ABSOLUTELY no warranty, although it's only 3 patches bigger than official release and it works for me pretty well.

Download tarball here: kdelibs-4.5.1-2.src.tar.gz (5 kB).

» Add comment

Discussion: 12 comments

» Reply 10.09.2010 12:34 | Bernhard Friedreich | web | Thanks!
Thank you very much! I've experienced this crash before this blog post existed and I didn't know about any problems beforehand... I got crazy trying to rebuild everything custom I had on my system (qt-git, kdevelop-git, kdevplatform-git, ...) but nothing fixed it...

thanks again I'm soon going to try it out :)

PS: looks like your captcha is broken in firefox oO wasn't able to submit - now using chrome...
(error message: "Input error: Invalid referer") and no captcha is shown at all
» Reply 10.09.2010 14:14 | mosra | web | Oops...
I completely forgot about this recaptcha thing, it was bound to old domain name and I forgot to update it when I moved to another domain.

I have to fix it as soon as possible, because blog without working comments is useless :-)
reCaptcha should be fixed now.

Many thanks for noticing the error :)
» Reply 10.09.2010 17:58 | Bernhard Friedreich | web |
Sadly it still crashes... although later in the game... I can open a project, open a file - first strange thing I noticed: the kdevelop window (maximized) resized to the size of a kwrite window
after that I could start editing - but while typing it crashed on me...

Backtrace: http://pastebin.com/6dC176cF

don't think it is appropriate to create a bugreport as we are using patched libs...
» Reply 10.09.2010 18:03 | Bernhard Friedreich | web |
to be more precisely:
it crashes in a CMakeLists.txt when trying to autocomplete a path

e.g.:
QT4_AUTO_WRAP(variable
some_path_to_a_header.h
)

I tried to add "/data" in front of the "some_path_....h"

it is reproducible..
Although the backtrace says the problem is somewhere in KateCompletionWidget I hope this is problem in KDevelop and not in the patched kdelibs :-)

I looked again into commits in KDE 4.5.2 branch and KateCompletionWidget class hasn't been updated for nearly two months - so it looks like the problem is not even fixed, or the problem is fixed only in trunk and not backported to 4.5.2.

Sadly I couldn't reproduce that problem, no crashes here, maybe it's only a problem with dirty duchain cache (which causes a lot crashes for me), try to remove ~/.kdevduchain and see if that helps.

I look again into Kate repository if there is any commit touching KateCompletionWidget class.
» Reply 10.09.2010 19:47 | Bernhard Friedreich | web |
I tried removing .kdevduchain... didn't work..

Could it be related to the project not actually building (cmake wise)? because the autocompletion needs a working cmake project?
the project currently doesn't work because cmake doesn't find the moc files - so maybe the autocompletion dies because the project's cmake files can't be evaluated? *me makes wild guesses*
um... I don't know... it sometimes crashes if there is a syntax error, but on missing files? This doesn't cause the crash.

One last solution which could help with localizing the problem - try to install older version of kdevelop/kdevplatform (from 2010-09-04 and older) with non-patched kdelibs and check if that crashes too. If yes, "hooray", it's problem in KDevelop, if not, I'm screwed and the backport doesn't work (or I missed some more commits which should have been backported).
» Reply 11.09.2010 10:42 | Bernhard Friedreich | web |
wohoo! sorry for the noice but it works :)

the problem seems to have been nothing related to your kdelibs but instead my fucked up version of Qt in combination with an old kdevelop plugin (controlflow)

works now :)
good to backport imho

THANKS
I looked into Kate GIT repository and there is SO MANY commits to KateCompletionWidget that it is impossible to locate anything that would fix it. The commits depend on each other, so in the end it would be easier to switch to unstable KDE 4.6.xx (and experience even more crashes) than trying to backport everything.

But I still hope it's a temporary problem in KDevelop/duchain cache, not in Kate.
Kdevelop crashes each time I close the main windows...
Would this patched version fix that ?
Crash on exit is a problem with KDevelop, not in KDELibs/Kate, this patch fixes only crashes related to file editing.

I'm not a KDevelop developer, so I can only guess - your crash can be triggered with an outdated plugin, messed up duchain cache (see comments above) or just bug in KDevelop itself. I don't know.