SUMMARY KPA crashes always at a certain image while browsing images in full screen viewer. Only on my wifes PC and only with her user, not as me and not on my PC as any of us. We access the album via NFS, files (except .thumbnails) are rw-rw-r-- - so we both may write and edit the tags but only I may (re-)create thumbnails. Both systems run Leap 15.3 with the same patch status and more or less the same software spectrum. Both systems run the same KPA release but each one compiled on the respective machine. STEPS TO REPRODUCE This is a bad one : I cannot (yet?) reproduce the bug on my PC with my user or with my wife's :-( 1. Open KPA 2. Select 2021 3. View Thumbnails 4. doubleclick on some image from spring 5. start browsing using the mouse wheel or page-down key 6. zap! Always while hitting the same image ... but I have a backtrace and the error message from the command line: beate@wshome2:~> kphotoalbum -c ../usr/share/fotos/index.xml ASSERT: "ok" in file /home/usr/src/kphotoalbum-git/kphotoalbum/Utilities/ImageUtil.cpp, line 23 KCrash: Application 'kphotoalbum' crashing... KCrash: Attempting to start /usr/lib64/libexec/drkonqi (The cpp-file looks innocent enough, only what in the world was it saving?) The crash file: Application: KPhotoAlbum (kphotoalbum), signal: Aborted [KCrash Handler] #4 0x00007f482974818b in raise () from /lib64/libc.so.6 #5 0x00007f4829749585 in abort () from /lib64/libc.so.6 #6 0x00007f482a4fa87b in QMessageLogger::fatal(char const*, ...) const () from /usr/lib64/libQt5Core.so.5 #7 0x00007f482a4fa071 in qt_assert(char const*, char const*, int) () from /usr/lib64/libQt5Core.so.5 #8 0x000000000063aad2 in Utilities::saveImage (fileName=..., image=..., format=0x6738b4 "JPEG") at /home/usr/src/kphotoalbum-git/kphotoalbum/Utilities/ImageUtil.cpp:23 #9 0x0000000000623ac6 in BackgroundJobs::HandleVideoThumbnailRequestJob::saveFullScaleFrame (fileName=..., image=...) at /home/usr/src/kphotoalbum-git/kphotoalbum/BackgroundJobs/HandleVideoThumbnailRequestJob.cpp:63 #10 0x0000000000623a01 in BackgroundJobs::HandleVideoThumbnailRequestJob::frameLoaded (this=0x9d964a0, image=<incomplete type>) at /home/usr/src/kphotoalbum-git/kphotoalbum/BackgroundJobs/HandleVideoThumbnailRequestJob.cpp:56 #11 0x0000000000623870 in BackgroundJobs::HandleVideoThumbnailRequestJob::execute (this=0x9d964a0) at /home/usr/src/kphotoalbum-git/kphotoalbum/BackgroundJobs/HandleVideoThumbnailRequestJob.cpp:47 #12 0x000000000061c52f in BackgroundTaskManager::JobInterface::start (this=0x9d964a0) at /home/usr/src/kphotoalbum-git/kphotoalbum/BackgroundTaskManager/JobInterface.cpp:35 #13 0x000000000061cb45 in BackgroundTaskManager::JobManager::execute (this=0x94d6830) at /home/usr/src/kphotoalbum-git/kphotoalbum/BackgroundTaskManager/JobManager.cpp:61 #14 0x000000000061cba0 in BackgroundTaskManager::JobManager::addJob (this=0x94d6830, job=0x9d964a0) at /home/usr/src/kphotoalbum-git/kphotoalbum/BackgroundTaskManager/JobManager.cpp:68 #15 0x000000000057b56d in ImageManager::AsyncLoader::loadVideo (this=0x95150d0, request=0x9dbaf30) at /home/usr/src/kphotoalbum-git/kphotoalbum/ImageManager/AsyncLoader.cpp:109 #16 0x000000000057b434 in ImageManager::AsyncLoader::load (this=0x95150d0, request=0x9dbaf30) at /home/usr/src/kphotoalbum-git/kphotoalbum/ImageManager/AsyncLoader.cpp:86 #17 0x000000000051c71f in Viewer::ImageDisplay::requestImage (this=0x951ebd0, info=..., priority=false) at /home/usr/src/kphotoalbum-git/kphotoalbum/Viewer/ImageDisplay.cpp:741 #18 0x000000000051b528 in Viewer::ImageDisplay::updatePreload (this=0x951ebd0) at /home/usr/src/kphotoalbum-git/kphotoalbum/Viewer/ImageDisplay.cpp:602 #19 0x000000000051b0d8 in Viewer::ImageDisplay::pixmapLoaded (this=0x951ebd0, request=0x951ae20, image=...) at /home/usr/src/kphotoalbum-git/kphotoalbum/Viewer/ImageDisplay.cpp:564 #20 0x000000000057bedd in ImageManager::AsyncLoader::customEvent (this=0x95150d0, ev=0x7f47dc0056f0) at /home/usr/src/kphotoalbum-git/kphotoalbum/ImageManager/AsyncLoader.cpp:230 #21 0x00007f482a729a1b in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5 #22 0x00007f482b57ef9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #23 0x00007f482b5865b0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #24 0x00007f482a6f93a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5 #25 0x00007f482a6fbf67 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5 #26 0x00007f482a756e13 in ?? () from /usr/lib64/libQt5Core.so.5 #27 0x00007f481d80c694 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #28 0x00007f481d80ca30 in ?? () from /usr/lib64/libglib-2.0.so.0 #29 0x00007f481d80cabc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #30 0x00007f482a75642f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5 #31 0x00007f482a6f75fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5 #32 0x00007f482a700800 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5 #33 0x000000000048c520 in main (argc=3, argv=0x7fff1e8d2a98) at /home/usr/src/kphotoalbum-git/kphotoalbum/main.cpp:162 [Inferior 1 (process 10299) detached] ... wait a minute: do I read something about background job and videothumbnails ??? All thumbnails are there, no need to (re-)create them. Also KPA has no business to save any image file at that point. I have set the two thumbnail folders to rw-r--r-- to be writable only by me as I do not want all the thumbnails be messed up by any accidental interaction. But this should pose the same kind of problems on both PCs when we access the album with my wife's user (who has read only access to the thumbnails). I also copied the images that crashed KPA to a different folder, created a new album there and ... nothing. So it is not a problem of the respective images. Version v5.8.1-42-gf84c77e6 KDE Frameworks 5.76.0 Qt 5.12.7 (built against 5.12.7)
Hi Andreas, The assertion seems to be triggered by KPA not being able to save a video thumbnail file. This could possibly be related to bug #438128. Can you take a look at the permissions of the .videoThumbnails folder?
... and I should have read beyond the backtrace. You said, both instances of KPA are virtually identical. Does that include the build flags? With release builds, assertions are not fatal - this may be the reason why it crashes on one system but not on the other...
Git commit f35b3a6246da2283da5c9102295e5b70ded461a5 by Johannes Zarl-Zierl. Committed on 29/11/2021 at 23:10. Pushed by johanneszarl into branch 'master'. Remove assertion when thumbnails could not be saved. If a (video thumbnail) image cannot be saved, issue a diagnostic instead of triggering an assertion. M +8 -6 Utilities/ImageUtil.cpp https://invent.kde.org/graphics/kphotoalbum/commit/f35b3a6246da2283da5c9102295e5b70ded461a5
Hi Johannes, great work! I wish, we could have similar response times & quality with commercial software at work (we don't). I just tested your fix: the crash is gone. We are now on v5.8.1-46-gf4b3a399 on both places and everything seems fine. (Best regards from my wife: she will use it tonight). Yes, as I said, the .thumbnails and .videothumbnails are read only for everybody else than me. On purpose. So, being a bit relaxed about being able to write into these folder seems like a good idea to me :-) I am building with a simple script called as ../doit.sh from the root folder. So the only remaining differences between the two PCs are - maybe - some missing devel-packages for optional features. Otherwise the build parameters are the same. When I like what I see in the demo, I usually install the fresh version as my "production" release. I don't mind the occasional crash, as your quick fixes make KPA better each time I find one. Best regards, Andreas my skript: # werfe alle lokalen changes weg git checkout master git reset --hard # hole die aktuelle Version git pull # setze debuginfos export CMAKE_BUILD_TYPE=RelWithDebInfo # wechsle ins build-Verz. cd build # lösche all cmake-Reste rm -rf C* c* # doit! cmake .. make -j8 # teste Demo ./kphotoalbum --demo
Hi Andreas! Thanks for checking and reporting back! (Also for the kind words ;-) I'll close the bug for now because the immediate issue to you is gone... Cheers, Johannes