Summary: | tags get lost when images are moved | ||
---|---|---|---|
Product: | [Applications] kphotoalbum | Reporter: | Gergö Letay <gletay> |
Component: | general | Assignee: | KPhotoAlbum Bugs <kpabugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | miika.turkia |
Priority: | NOR | ||
Version: | 4.0 (KDE4) | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Gergö Letay
2010-10-19 11:34:35 UTC
Appears to be working correctly in version 4.1.1. OK, Different cases: 1) open folder A in thumbnailviewer tag an untagged image Ctrl-s, Ctrl-q in a shell move tagged image to folder B->image still in folder A open kpa again -> image in folder A removed, image in folder B, tagged ==> OK 2) . open folder A in thumbnailviewer . tag an untagged image . in a shell move tagged image to folder B->image still in folder A . Redisplay -> image still in folder A . rescan images -> seg fault . start kpa again, looking into folder B image is there but untagged ==> :( 3) . open folder A in thumbnailviewer . tag an untagged image . Go->Home . in a shell move tagged image to folder B . Redisplay -> image still in folder A, not in folder B . Go->Home . rescan images . now as expected, but requires rescan ==> :| I was using kpa 4.1.1 for these tests. Cheers Gergö 2) This crash is caused by Q_ASSERT. DB::IdNameMapper::operator[] at /opt/kpa/kpa-svn/devaus/kphotoalbum/XMLDB/IdNameMapper.cpp:38 ---8<--- QString DB::IdNameMapper::operator[]( DB::RawId id ) const { Q_ASSERT( _idTofileName.contains( id ) ); return _idTofileName[id]; } ---8<--- However, since I have no knowledge of the xmldb code I have no idea what should be done to fix it. (Does it suffice to return null instead of the assert?) Git commit aaae5079542c30c382947ddbaad2d035e69c1e6a by Miika Turkia. Committed on 28/01/2012 at 11:20. Pushed by mturkia into branch 'master'. Crash when images moved and scanning for new If images are moved e.g. from command line while KPhotoAlbum is running a crash occurs when scanning for new images. This patch seems to fix the issue as described in bug report's case nro 2. M +7 -2 MainWindow/Window.cpp M +2 -0 ThumbnailView/ThumbnailModel.cpp M +2 -2 XMLDB/Database.cpp M +10 -4 XMLDB/IdNameMapper.cpp http://commits.kde.org/kphotoalbum/aaae5079542c30c382947ddbaad2d035e69c1e6a |