Project

General

Profile

Bug #130

keepassx crashes when trying to open another file

Added by Harald Judt almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Operating System:
Linux
Affected version:
Affected revision:

Description

I can use keepassx with one file, but if I try to open another database it will crash with

ASSERT: "entry->uuid() == uuid()" in file <snip>/keepassx-9999/src/core/Entry.cpp, line 366.

Steps to reproduce
1) Open your default database.
2) Close database.
3) Open another database.
-> Crash

This might be related to some history/bookmark function.

Associated revisions

Revision 8d16522d
Added by Florian Geyer over 2 years ago

Repair UUID of inconsistent history items.

Closes #130

History

#1 Updated by Felix Geyer almost 5 years ago

I can't reproduce it. That assert looks more like a broken database.
When you just open the second database the assert isn't hit?

#2 Updated by Harald Judt almost 5 years ago

Ok, it seems this is a bit more complicated. The database is not corrupt, I can open it on another computer. I just encountered the same or a very similar problem before, that's why I came to that conclusion. In fact, the steps to reproduce do not work with another (third) database.

Maybe it is because of the patch I attached to #129. I will have to investigate more on this.

#3 Updated by Felix Geyer almost 5 years ago

So do you hit the assert when you just start keepassx and open the database?

The database is not corrupt, I can open it on another computer.

With what version of KeePassX?
Has it also been built in debug mode?

#4 Updated by Harald Judt almost 5 years ago

This seems to be a problem with either current git or libgcrypt-1.6.0 and my patch; I suspect the latter and will see if the problem persists if I downgrade libgcrypt and remove the patch. I guess the patch is incomplete.

#5 Updated by Harald Judt almost 5 years ago

Downgrading to libcrypt-1.5.3 and removing the patch didn't solve it, the error message still appears. I will try an earlier version and bisect when I have more time.

#6 Updated by Harald Judt almost 5 years ago

It also fails with 2.0-alpha1. Maybe it is a compiler issue or some other system configuration problem.

#7 Updated by Felix Geyer almost 5 years ago

Could you temporarily drop that assert, open the database with utils/kdbx-extract and check the xml output.

See if you find something like:

            <Entry>
                <UUID>[UUID]</UUID>
[...]
                <History>
[...]
                    <Entry>
                        <UUID>[Different UUID than in the base Entry]</UUID>

#8 Updated by Harald Judt almost 5 years ago

Damn! Now I know why the older version worked! I remembered it had something to do with the history... I compiled that version in July and removed that ASSERT to get it working, but have already forgotten about it.

I will try to extract the information you requested.

#9 Updated by Harald Judt almost 5 years ago

Yes, there is exactly one such entry in the xml output. It looks like this:

<Entry>
  <UUID>123</UUID>
  ...
  <History>
    <Entry>
      <UUID>456</UUID>
      ...
    </Entry
    <Entry>
      <UUID>123</UUID>
      ...
    </Entry>
  </History>
</Entry>

#10 Updated by Felix Geyer almost 5 years ago

Imho that's a bug in the code that has written the database. Entries aren't supposed to change the UUID.
Did you only use KeePassX to edit that database?

#11 Updated by Harald Judt almost 5 years ago

No, that was created by keepass (import from v1). I do not edit it but use it read-only and it's only an assertion, so actually no problem, but I guess I need to find out how to create a release build on my gentoo system that doesn't crash on the assert().

#12 Updated by Patrick Fournier over 4 years ago

I had the same problem with KeepassX 2.0 alpha 6 (Ubuntu 14.04). I used Keepass2 to clean up the history and object information of my DB (Tools/Database tools/Database maintenance) and it solved my problem. I was able to open my DB with KeepassX again.

The DB has a long history: it was initally created and updated in Keepass1, converted to Keepass 2 format with Keepass2, updated with Keepass2 for a while and then updated with KeepassX.

#13 Updated by Florian Geyer over 2 years ago

  • Status changed from New to Closed

#14 Updated by Florian Geyer over 2 years ago

The UUIDs of history items are now corrected when the database is opened.

#15 Updated by Felix Geyer over 2 years ago

  • Target version set to 2.0.3

Also available in: Atom PDF