Bug 404456 - Opening the Effects Gallery drawer when no images have been taken yet renders the whole system unresponsive
Summary: Opening the Effects Gallery drawer when no images have been taken yet renders...
Status: RESOLVED FIXED
Alias: None
Product: kamoso
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: VHI critical
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
: 405190 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-16 19:24 UTC by Nate Graham
Modified: 2019-03-18 13:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.0
Sentry Crash Report:


Attachments
Screenshot with empty gallery (220.92 KB, image/png)
2019-03-01 00:09 UTC, Aleix Pol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-02-16 19:24:09 UTC
Kamoso from git master.


STEPS TO REPRODUCE
1. Delete all Kamoso-created images in ~/Pictures, or whatever is set as the default picture location
2. Quit Kamoso and launch it again
3. Click the bottom-left hamburger button to open the Effect Gallery drawer


OBSERVED RESULT
The button highlights but the drawer does not open. Kamoso then hangs. 1-2 seconds after that, the entire system becomes unresponsive. Mouse clicks and keyboard input are not accepted. A hard reboot is required!


EXPECTED RESULT
The Effects Gallery drawer opens and allows you to apply effects.


This is likely because the Effects gallery (inappropriately) uses the first image from the image list to render effect previews due to Bug 403121; when no images have been taken yet, there is no image available for this purpose.
Comment 1 Aleix Pol 2019-02-21 23:52:57 UTC
Git commit 6f237a28ea5eba6ba5e9f7d0c7be45fa6f869a2d by Aleix Pol.
Committed on 21/02/2019 at 23:50.
Pushed by apol into branch 'Applications/18.12'.

Fix taking pictures when the pictures directories didn't exist

GStreamer would freak out big time.

M  +7    -1    src/kamoso.cpp

https://commits.kde.org/kamoso/6f237a28ea5eba6ba5e9f7d0c7be45fa6f869a2d
Comment 2 Nate Graham 2019-02-22 01:00:27 UTC
That commit does not fix the issue. Opening the Effects Gallery drawer when there are no images in the image gallery still blows up the whole system and requires a hard reboot.
Comment 3 Aleix Pol 2019-02-26 15:25:28 UTC
I cannot reproduce this, at all. Could be triggering a bug elsewhere in the system?
Comment 4 Nate Graham 2019-02-26 16:00:08 UTC
So when the image gallery in the right drawer has no images in it, you can open the left drawer without Kamoso blowing up the system? What image do the effects thumbnails show? Where would it get that image from?
Comment 5 Aleix Pol 2019-03-01 00:09:55 UTC
Created attachment 118455 [details]
Screenshot with empty gallery
Comment 6 Nate Graham 2019-03-01 04:55:01 UTC
Is the folder that's used for the image gallery completely 100% empty of images? Not just in Kamoso's gallery UI, but on disk too?
Comment 7 Aleix Pol 2019-03-01 12:32:11 UTC
Yes, I just create a new folder to test the patch.
Comment 8 Nate Graham 2019-03-01 14:24:34 UTC
Even if this bug is something only I see for some reason, using the KDE logo instead of what the camera is pointing at is a sub-optimal UI. I strongly suggest implementing the original suggestion to snap a new temporary photo the moment the gallery drawer is opened and then use that for the basis of the still image previews.

This will fix the possibility of this bug, as well as the odd behavior of the gallery sometimes showing a photo totally unrelated to what the camera is looking at.
Comment 9 Łukasz Konieczny 2019-03-07 20:21:02 UTC
I think my bug (bug405190) is related.
Comment 10 Nate Graham 2019-03-08 00:47:56 UTC
*** Bug 405190 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2019-03-18 11:44:36 UTC
Aleix and I debugged this today and found that what's happening is that there's a crash or freeze in the graphics driver itself, which manifests on my machine but not his. :/

We're going to try to eliminate the triggering situation in the hope that we can avoid hitting the condition that causes it.
Comment 12 Aleix Pol 2019-03-18 12:05:33 UTC
Git commit 9aa6013c80be11839559f7f80500f5e51175861e by Aleix Pol.
Committed on 18/03/2019 at 11:59.
Pushed by apol into branch 'Applications/19.04'.

Use a camera picture for showing the effects for the first time
Related: bug 403121

M  +14   -11   src/kamoso.cpp
M  +1    -1    src/kamoso.h
M  +2    -1    src/qml/Config.qml
M  +6    -3    src/video/webcamcontrol.cpp
M  +2    -1    src/video/webcamcontrol.h

https://commits.kde.org/kamoso/9aa6013c80be11839559f7f80500f5e51175861e
Comment 13 Nate Graham 2019-03-18 13:10:27 UTC
That last commit fixed it!