Summary: | KPA goes into infinite loop when starting annotation from thumbnail view | ||
---|---|---|---|
Product: | [Applications] kphotoalbum | Reporter: | Andreas Schleth <schleth_es> |
Component: | Thumbnail Viewer | Assignee: | KPhotoAlbum Bugs <kpabugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | johannes, tl |
Priority: | NOR | ||
Version: | GIT master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/kphotoalbum/-/commit/406a4fc07e69c68dba063f4e7766c295e9ccc007 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | patch for the problem |
Description
Andreas Schleth
2024-09-29 21:16:58 UTC
Thanks for your report! I have to check this, and maybe Johannes has to – but at least, installed or missing QtAV does not cause this, as I don't have QtAV installed (it's not even available on Gentoo, IIRC it's unmaintained and thus has been removed) I do have vlc installed though, and cmake finds libvlc. So maybe, this happens when no video backend is available at all? Tobias is right: with any one of the two video back ends, the hang does not happen. Still, I should have phrased my "EXPECTED RESULT" as: I should see either a warning, saying there is no video back end installed, or simply display this error message only if I want to annotate or view a video. As the hang happens when annotating images, the video back end should not matter at all. (And the program should not hang, no matter what :-) I didn't have time to look into the bug, but this sounds suspiciously close to a bug that I just fixed in the kf6 branch: https://invent.kde.org/graphics/kphotoalbum/-/commit/7ac8cc0be2c01561c781f85524f59ca79a442d46 Ok, I was probably off with my previous comment. I've looked at the code now and my guess is that you have the backend set to QtAV from your previous installation, but that's not available in your current setup when the following check is reached: https://invent.kde.org/graphics/kphotoalbum/-/blob/4f4c4104dfeac1dddcc0c0a4e030e9f535c1b003/Viewer/ViewerWidget.cpp#L1371 -> So the code should not only select a backend if no backend was configured, but also if the backend was configured to an unknown or unavailable value. The most straightforward fix is probably to set unavailable backends to NotConfigured in SettingsData.cpp. Hi Johannes, my configured back end is and was always VLC. If any of the two back ends is configured, the infinite loop goes away. Only if none of the two (QtAV/LIBVLC) is included it hangs. I tried all 4 combinations. To be clear: technically it is not a crash but an infinite loop that endlessly prints the same error message. You have to kill the program manually. The configure script says "optional" when one or both of the libraries are missing ... and it should be. When someone has no videos they don't need any video back ends. Right now, it is not a game stopper for me and it will probably only show if someone builds from the sources. Created attachment 174254 [details]
patch for the problem
Attached please find a patch that results in the display of a warning message. After selecting "continue", the settings select Phonon and from then on the annotation works as intended.
Now, I had to check, what happens if I also remove Phonon-devel ... and Bingo! This is flagged as an error during cmake as it should.
The patch is just a quick-and-dirty solution as I do not know whether it has any unwanted side effects.
Git commit d37ae8b7daa88e6d9ae54a40cd91b4801ce63df1 by Johannes Zarl-Zierl. Committed on 01/10/2024 at 20:19. Pushed by johanneszarl into branch 'master'. Prevent incorrect config values for video backend If a video backend was previously configured but is no longer available in the current build of kphotoalbum, an infinite loop could occur. This patch fixes that by checking for unsupported values at a configuration level. M +1 -0 CHANGELOG.md M +0 -5 CMakeLists.txt M +15 -4 MainWindow/FeatureDialog.cpp M +4 -3 Settings/VideoPlayerSelectorDialog.cpp M +2 -2 Viewer/ViewerWidget.cpp M +2 -0 lib/CMakeLists.txt M +23 -7 lib/kpabase/SettingsData.cpp R +0 -0 lib/kpabase/config-kpa-videobackends.h.in [from: config-kpa-videobackends.h.in - 100% similarity] https://invent.kde.org/graphics/kphotoalbum/-/commit/d37ae8b7daa88e6d9ae54a40cd91b4801ce63df1 Hi Andreas, Thanks for checking all this. The patch confirms my assumptions on what goes wrong. Can you check if my fix solves the problem as well? Cheers, Johannes Hi Johannes, I checked and it works :-) So I am now on v5.12.0-194-g034582ee for the foreseeable future. Thanks for the quick fix! Andreas Git commit 406a4fc07e69c68dba063f4e7766c295e9ccc007 by Johannes Zarl-Zierl. Committed on 04/10/2024 at 10:59. Pushed by johanneszarl into branch 'kf6'. Prevent incorrect config values for video backend If a video backend was previously configured but is no longer available in the current build of kphotoalbum, an infinite loop could occur. This patch fixes that by checking for unsupported values at a configuration level. M +1 -0 CHANGELOG.md M +0 -5 CMakeLists.txt M +15 -4 MainWindow/FeatureDialog.cpp M +4 -3 Settings/VideoPlayerSelectorDialog.cpp M +2 -2 Viewer/ViewerWidget.cpp M +2 -0 lib/CMakeLists.txt M +22 -7 lib/kpabase/SettingsData.cpp R +0 -0 lib/kpabase/config-kpa-videobackends.h.in [from: config-kpa-videobackends.h.in - 100% similarity] https://invent.kde.org/graphics/kphotoalbum/-/commit/406a4fc07e69c68dba063f4e7766c295e9ccc007 |