Summary: | KPhotoAlbum crashes when Jump to Context is used in Thumbnail Viewer with zero thumbnails | ||
---|---|---|---|
Product: | [Applications] kphotoalbum | Reporter: | Victor Lobo <victor.ip.lobo> |
Component: | Thumbnail Viewer | Assignee: | KPhotoAlbum Bugs <kpabugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | tl |
Priority: | NOR | ||
Version: | GIT master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/kphotoalbum/-/commit/8d3021ecb5aee71471349241d07b641f772a4171 | Version Fixed In: | |
Sentry Crash Report: |
Description
Victor Lobo
2023-08-13 01:41:53 UTC
Dang, you're quite good finding crashes ;-) Can be produced with the demo database this way. I'll have a look into this! Git commit 8d3021ecb5aee71471349241d07b641f772a4171 by Tobias Leupold. Committed on 13/08/2023 at 13:10. Pushed by tleupold into branch 'master'. Disable show selection only if there's no selection M +1 -0 CHANGELOG.md M +7 -1 MainWindow/Window.cpp M +4 -0 ThumbnailView/ThumbnailFacade.cpp https://invent.kde.org/graphics/kphotoalbum/-/commit/8d3021ecb5aee71471349241d07b641f772a4171 This does two things. It prevents the crash itself by checking if there IS actually a selection in ThumbnailFacade::currentItem(), so that the model won't be queried with an invalid index. This still lead to unexpected behavior: Showing only the selection for no selection did show (as expected) nothing. But when clicking "Show context" afterwards, there would still nothing be shown. Thus I decided to prevent showing only the selection for nothing at all, the user will see a message that nothing is selected (so nobody wonders why nothing happens when clicking this, one could think that frame is already a selection). This way, we won't reach the code that actually caused the crash anymore. But still, it's not a bad idea to fix the root cause ;-) @Victor Lobo: If you mess with geotagging your photos, maybe you want to have a look at KGeoTag as well? I'm pretty sure a lot of crashes are hidden in there as well ;-) Thank you! Fix works well. Thanks for fixing both issues; the root cause fix is necessary because it also addresses the other pathways which do not rely on Limit View to Selection (such as placing cursor in Search... field in Thumbnail View and then hitting Jump to Context). Thanks for introducing me to KGeoTag. I am not currently doing any manual geotagging since my cameras record gps co-ordinates. But I will try it out for fixing old images. Nice, thank you :-) |