Bug 397305 - failed to add tag to database
Summary: failed to add tag to database
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Captions (show other bugs)
Version: 5.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-09 09:25 UTC by Nasrin
Modified: 2018-09-07 12:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nasrin 2018-08-09 09:25:25 UTC
I cannot add any tag neither can create new tag. This action always ended with error - "Failed to add tag to database".  I use SQLite database to store relevant data.

Reproducible: Always

Steps to Reproduce:
add new tag

Actual Results:  
An error has occured during tag creation.

Expected Results:  
new tag is added

I am using Windows 7, 64-bits. DigiKam 5.8.0
Any suggestion is gladly welcome.
Comment 1 Maik Qualmann 2018-08-09 10:31:43 UTC
Can you download and start DebugView from Microsoft and then post the messages when you try to create a tag?

Maik
Comment 2 Nasrin 2018-08-10 09:54:38 UTC
(In reply to Maik Qualmann from comment #1)
> Can you download and start DebugView from Microsoft and then post the
> messages when you try to create a tag?
> 
> Maik
Hi, thank you for your reply. tbh, I was able to create tags and add them to photos but facing the same trouble again. I am adding the messages below. 
[1376] Error messages: "Unable to fetch row" "disk I/O error" 10 1 
[1376] Bound values:  (QVariant(int, 0), QVariant(QString, "KR2867"))
[1376] digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
Comment 3 Nasrin 2018-08-10 09:55:35 UTC
(In reply to Nasrin from comment #2)
> (In reply to Maik Qualmann from comment #1)
> > Can you download and start DebugView from Microsoft and then post the
> > messages when you try to create a tag?
> > 
> > Maik
> Hi, thank you for your reply. tbh, I was able to create tags and add them to
> photos but facing the same trouble again. I am adding the messages below. 
> [1376] Error messages: "Unable to fetch row" "disk I/O error" 10 1 
> [1376] Bound values:  (QVariant(int, 0), QVariant(QString, "KR2867"))
> [1376] digikam.dbengine: Error while executing DBAction [ "InsertTag" ]
> Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
>[1376] digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
Comment 4 Maik Qualmann 2018-08-10 17:57:43 UTC
(In reply to Nasrin from comment #2)
 
> [1376] Error messages: "Unable to fetch row" "disk I/O error" 10 1 

This may be a broken hard drive or insufficient free hard drive space. But it is also possible that the database structure is broken. Try copying the database with the migration tool (settings menu) into a new SQlite database and then copy the new and the old position.

Maik
Comment 5 Nasrin 2018-08-13 09:56:14 UTC
(In reply to Maik Qualmann from comment #4)
> (In reply to Nasrin from comment #2)
> Try copying the
> database with the migration tool (settings menu) into a new SQlite database
> and then copy the new and the old position.
> 
> Maik
Thank you for your continious support, Maik. Apparently, I have made some free space in my harddisc still the problem persist. 
While trying to migrate the database there was another error message saying 'Error while creating database schema. Debugger report shows these:
[4392] Error messages: "Unable to execute statement" "no such table: main.Images" 1 2 
[4392] Bound values:  ()
[4392] digikam.dbengine: Error while executing DBAction [ "CreateIndices" ] Statement [ "CREATE INDEX dir_index  ON Images (album);" ]
Comment 6 Nasrin 2018-09-07 12:27:27 UTC
Working with smaller sized database and it is working. Thanks again for the support.