AW: Kdevelop can only be started twice

Jonas Nordin jonas.nordin at cenacle.se
Thu Jun 17 09:01:13 BST 1999



Micko Roland wrote:

> Hi Jonas,
>
> I've been investigating the problem, and it seems to be a problem of the
> file classes.db.
> Here is what i found out.
>
> 1. I was able to start it twice, as one instance has been started from KWM
> and the second from the commandline, where the working directory is
> different from my home directory.

This is another issue that has to be fixed. The database file should end up in
the project directory always!

> 2. Each time a project is opened the file classes.db is also opened.I don't
> have any information about gdbm_open so I don't have a glue about the
> parameters that are used, but I guess that the file is opened exclusiv. So
> If you try to open it once again with a second instance of KDevelop that
> tries to access the same file, the call is unsucessfull. So any further
> access to this file leads to the assertion error. As there is information of
> already known classes stored, it has to be opened exclusiv or you must use
> file locking mechanism to inhibit concurrent read, writes on the file.

The trick is that all instances should share the SAME classes.db to avoid
reparsing information. I think the solution is to make the first instance open
it in read/write mode(which is what it currently does). If this fails, just open
it as a reader(which should be ok I think).

> I think this is also the solution to the thread >> A really huge bug <<.
>
> I myself changed the code so the file is created for each instance of
> KDevelop with the name classes.db.<pid>. This is not what you intended but
> it is a quick and dirty solution which helps me to continue to work.
>
> I changed the constructor of CClassStore to

I'll try to fix the problem today. Many thanks for your help!

/J




More information about the KDevelop mailing list