Summary: | KPA crashes when sorting item in thumbnail view by date/time | ||
---|---|---|---|
Product: | [Applications] kphotoalbum | Reporter: | Andreas Schleth <schleth_es> |
Component: | Thumbnail Viewer | Assignee: | KPhotoAlbum Bugs <kpabugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | johannes |
Priority: | NOR | ||
Version: | GIT master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/kphotoalbum/-/commit/eb3e2fe95ab48f984d79125e36562c5955ceae7c | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
crash report from drkonqui
tar file with two kphotoalbumrc files |
Easier way to reproduce: 1. kphotoalbum --demo 2. thumbnail view 3. crtl-a 4. sort 5. crash This is strange: I tried a git bisect going back until 5.9.something from January 2023 and it still crashes while sorting the demo database. ??? I cannot reproduce the crash on a different machine ... m-( On a second PC with slightly older/smaller hardware but the same OS/patchlevel the crash never happens. I am building with the exact same build script from the very same folder (on NFS) on both systems. On the other PC the crash does not happen. On this one it is reproducible. I checked/compared all the files mentioned in the kcrash file - they differ only in access time but otherwise they are the same bit for bit. The .gitconfig files are the same on both machines and before each build I clean out the build folder. But ... but: the .config/kphotoalbumrc files differ !!! With the file on my machine KPA crashes, with the file from the other it does not crash. I can exchange the two *rc files and the crash follows the defective one. Now, what on earth could cause the config file to crash the application? Created attachment 162933 [details]
tar file with two kphotoalbumrc files
The file kphotoalbumrc5 causes the crash when sorting, the other one is OK
OK ... (sigh!) ... I edited the offending rc-file line by line and this is the offending line in the section [Thumbnails]: [Thumbnails] ... showNewestThumbnailFirst=true When I remove only this line, sorting does not crash anymore. Adding this line should trigger the crash. Completely removing the rc-file and starting from scratch solves this problem as well but then you have to re-do all your settings. My verdict: settings in the rc-file should not crash the application. Git commit eb3e2fe95ab48f984d79125e36562c5955ceae7c by Johannes Zarl-Zierl. Committed on 07/11/2023 at 23:29. Pushed by johanneszarl into branch 'master'. Fix crash when sorting selected images newest first If the display order is newest first, selecting all images and sorting the selected images resulted in a out of bounds iterator. M +2 -1 DB/ImageInfoList.cpp https://invent.kde.org/graphics/kphotoalbum/-/commit/eb3e2fe95ab48f984d79125e36562c5955ceae7c Thanks for the detailed report. For the record: The steps to reproduce this bug using the GUI only: 1. Open KPhotoAlbum 2. Select View | Show Newest First 3. Go To Thumbnail View 4. Select all images 5. Select View | Sort selected by Date & Time Apparently nobody ever tried sorting the images while the display order was newest first... Hi Johannes, with the latest update things work for me independent of sort order. So, check, problem solved! I must have switched the sort order inadvertently. Thanks! Andreas |
Created attachment 162916 [details] crash report from drkonqui SUMMARY Crash when sorting items by date/time in thumbnail view. Reproducible with the same dataset and with another database and different data. Does not crash when the items are already sorted. STEPS TO REPRODUCE 1. Have some out of order images/videos in the thumbnail view 2. Select these items 3. Select from the menu: "View" ... "Sort Selected by Date & Time" OBSERVED RESULT Crash EXPECTED RESULT Display items in sorted order. No crash. SOFTWARE/OS VERSIONS openSuse Leap 15.5 KPA git master v5.11.0-171-g314e3ca7 KDE Frameworks 5.103.0 Qt 5.15.8 Plasma 5.27.4 ADDITIONAL INFORMATION A) The bug must be introduced quite recently as I did a lot of sorting in the last few days and had quite a few recent versions installed B) The terminal says: ASSERT failure in QList::insert: "The specified iterator argument 'before' is invalid", file /usr/include/qt5/QtCore/qlist.h, line 541 KCrash: Application 'kphotoalbum' crashing... C) see attachment