Bug 178326 - misleading error method when database locked
Summary: misleading error method when database locked
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Schema (show other bugs)
Version: 0.10.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-20 23:15 UTC by Martin Schmettow
Modified: 2017-07-25 19:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.10.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schmettow 2008-12-20 23:15:13 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Somehow I had another digikam process running (a zombie?). When starting digikam a message appeared that the database could not be converted to version 5. It was recommended to thorugh away the data base and start with a new one. Instead it sufficed to kill the zombie.
Comment 1 Marcel Wiesweg 2008-12-21 16:19:27 UTC
Do you have any of the messages printed on the console?
Was the exact error message that popped up "The schema updating process from version 4 to 5 failed, caused by an error that we did not expect. You can try to discard your old database and start with an empty one..."?
Comment 2 Martin Schmettow 2008-12-21 17:04:04 UTC
Yes, this was the error message. Meanwhile I tried to reproduce the problem by starting a second instance of digikam, but without success. Btw. is it safe to have two instances running on the same database? 
Comment 3 Marcel Wiesweg 2008-12-21 22:23:10 UTC
That's the point, there is no technical problem usually with opening the database files from different proccesses.

You seem to have had a special situation. Accessing the file failed, which is interpreted as an empty/new file, so upgrade is attempted. I dont quite know how to tell the difference in our code.
Comment 4 Marcel Wiesweg 2008-12-23 14:36:41 UTC
SVN commit 900734 by mwiesweg:

Check that creating a transaction succeeds before attempting to upgrade database.
This might catch unclear errors where a file exists but is somehow locked.

CCBUG: 178326

 M  +12 -1     schemaupdater.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=900734
Comment 5 Marcel Wiesweg 2008-12-23 14:39:31 UTC
I did some guesswork and came up with that commit.
Do have any idea how to reproduce your problem?
Otherwise I would close this file; I tried to have a digikam instance running, I tried to remove read rights from the db file, the first just works, the second is caught before.
Comment 6 Marcel Wiesweg 2009-01-18 22:29:49 UTC
No more actions to be expected here. Reopen in case of new findings.