Bug 74664 - kdevelop always crashes on code completion of PCS stored data.
Summary: kdevelop always crashes on code completion of PCS stored data.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (show other bugs)
Version: 3.0.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
: 71450 76233 81750 82125 83028 83403 87558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-09 02:17 UTC by geiseri
Modified: 2004-11-18 20:08 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geiseri 2004-02-09 02:17:40 UTC
Version:           3.0.0 (using KDE 3.2.90 (CVS >= 20040117), yes)
Compiler:          gcc version 3.3.3 20040125 (prerelease) (Debian)
OS:          Linux (i686) release 2.4.23-1-k7

When I try to complete a Qt or KDE type with a fresh PCS i get a crash every time.  The error is an assert in kdevelop/lib/catalog/gcatalog.tcc on line 364.  Now was is VERY strange is the error returned is -30978.  This is #define DB_RUNRECOVERY          (-30978)/* Panic return. */ in the dbm support file.  Now this ERROR should have never happened according to the docs.  Worse we assert on errors here instead of handling them.  We ensure that the user will always trash the app if anything goes wrong.  This should at least be fixed...
Comment 1 Jens Dagerbo 2004-02-09 08:50:33 UTC
I did some more reading and while it's true that the failing call, according to the api docs, should not be able to return this error, I also found:

"Once DB_RUNRECOVERY is returned by any interface, it will be returned from all subsequent Berkeley DB calls made..." 

It seems likely we have have an (ignored) error condition earlier and the real problem is probably not even close to the crashpoint.

I also note that our "Requirements" page (http://www.kdevelop.org/index.html?filename=requirements.html) lists 
"Berkley DB >= 3.0 and <= 4.1" (anyone know who put it there? the configure test apparently accepts anything >3.0.) and I believe Ian is running the latest stable version (4.2.52?)

Comment 2 Jens Dagerbo 2004-02-09 08:52:32 UTC
*** Bug 71450 has been marked as a duplicate of this bug. ***
Comment 3 Amilcar do Carmo Lucas 2004-02-09 10:12:39 UTC
I've put it there bacause a user had problems using a newer DB version, but then downgraded and the problems where gone.
Comment 4 Jens Dagerbo 2004-02-09 10:34:44 UTC
OK.. we need to look into this deeper. If we really always bomb with 4.2.x versions we should put in a runtime check for bdb version and refuse to use it if the check fails.

geiseri, could you possibly downgrade your bdb to some 4.1.x version and try to repeat the case?

We need to update the configure check too, if this issue persists.
Comment 5 geiseri 2004-02-09 14:01:38 UTC
I dropped back to 4.1... bad news while Qt works KDE-libs still blows up.  This is kinda funky, because id think both would be working or failing.

One other thing that confused me.  If I uncheck a database it still crashes with the same backtrace.  It seems that the only way to "fix" it is to remove the pcs manually...  This should be an option.

As a side note "WHY THE HELL DO WE HAVE ASSERTS IN PRODUCTION CODE?!" ;)

If we are going to assert that means a) we are going to fix this bug before release or B) we hate all human life, espesially the kind who has yet to save their work before command completion kill it.
Comment 6 Jens Dagerbo 2004-02-27 00:58:13 UTC
*** Bug 76233 has been marked as a duplicate of this bug. ***
Comment 7 Jens Dagerbo 2004-05-20 15:22:42 UTC
*** Bug 81750 has been marked as a duplicate of this bug. ***
Comment 8 Jens Dagerbo 2004-05-25 21:57:55 UTC
*** Bug 82125 has been marked as a duplicate of this bug. ***
Comment 9 Winfried Dobbe 2004-05-31 21:44:35 UTC
Had seem problem (Suse 9.1, cvs tarball 24-05-04, BDB4.2.52). Recompiled with DB4.0, now code completion works fine again. Please add at least a check in configure.
Comment 10 Raul Moratalla 2004-06-08 14:00:49 UTC
Fedora Core 2 uses db 4.2, this is a big problem for me, I can't use code completion :( but I compiled kdevelop with db4.1 and don't crashes.
Comment 11 Weiland 2004-06-08 14:39:18 UTC
this worked: Suse 9.1, cvs tarball xx-05-04, db 4.0
workes fine now: Suse 9.1, cvs tarball 02-06-04, db 4.2 ;)
Comment 12 Weiland 2004-06-08 17:45:38 UTC
correction: NOT cvs tarball 02-06-04, but version 3.0.3 works with db 4.2
Comment 13 Jens Dagerbo 2004-06-08 19:35:45 UTC
*** Bug 83028 has been marked as a duplicate of this bug. ***
Comment 14 Alexander Dymo 2004-06-08 21:50:55 UTC
As we have now in cvs head local copy of bdb 3.2.9a which is know to work well, I'm closing this bug. Please test cvs version. In case of successful tests I will backport bdb copy to branch and we will release 3.0.5 version.
Comment 15 Jens Dagerbo 2004-06-16 18:46:56 UTC
*** Bug 83403 has been marked as a duplicate of this bug. ***
Comment 16 Jens Dagerbo 2004-11-18 20:08:14 UTC
*** Bug 87558 has been marked as a duplicate of this bug. ***