Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

[xenial] Camera app image freeze #611

Closed
ernesst opened this issue May 19, 2018 · 34 comments · Fixed by ubports/android_kernel_lge_hammerhead#6
Closed

[xenial] Camera app image freeze #611

ernesst opened this issue May 19, 2018 · 34 comments · Fixed by ubports/android_kernel_lge_hammerhead#6

Comments

@ernesst
Copy link

ernesst commented May 19, 2018

  • Device: N5
  • Channel: Xenial
  • Build: 389

Steps to reproduce

Just take a picture

Expected behavior

no freeze

Actual behavior

The image in the camera app freezes, blocking to take another picture.
Video more : as soon as i activate the video mode the image freeze, i cannot even start to record

Logfiles and additional information


phablet@ubuntu-phablet:~$ tail -f .cache/upstart/application-legacy-camera-app-.log
file:///usr/share/camera-app//GalleryView.qml:70:5: QML OrientationHelper: All the parents must have an id.
State saving disabled for PhotogridView-photogridView:QQuickPinchArea-galleryViewPinch:_usr_share_camera-app__PhotogridView.qml:127:9:gridView, class OrientationHelper
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
[PERFORMANCE]: Last frame took 32 ms to render.
file:///usr/share/camera-app//ViewFinderExportConfirmation.qml:75:17: QML Item: Binding loop detected for property "height"
file:///usr/share/camera-app//ViewFinderExportConfirmation.qml:75:17: QML Item: Binding loop detected for property "height"
file:///usr/share/camera-app//ViewFinderExportConfirmation.qml:75:17: QML Item: Binding loop detected for property "height"
file:///usr/share/camera-app//OptionButton.qml:24:39: Unable to assign [undefined] to QString
file:///usr/share/camera-app//SlideshowView.qml:405: TypeError: Cannot read property 'actions' of null
	ext1: 1, ext2: 0 
	ext1: 0, ext2: 0 
	ext1: 0, ext2: 0 
qml: Picture saved as /home/phablet/Pictures/com.ubuntu.camera/image20180519_170459162.jpg
	ext1: 1, ext2: 0 
[PERFORMANCE]: Last frame took 36 ms to render.
[PERFORMANCE]: Last frame took 76 ms to render.
	ext1: 1, ext2: 0 
	ext1: 1, ext2: 0 
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
qml: Flipped
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
qml: Flipped
qml: optionsOverlayClose
[PERFORMANCE]: Last frame took 113 ms to render.
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
qml: Flipped
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
file:///usr/share/camera-app//OptionsOverlay.qml:174:5: QML Information: Binding loop detected for property "height"
qml: Flipped
[PERFORMANCE]: Last frame took 36 ms to render.
Camera framerate boundaries are set by the backend
Camera framerate boundaries are set by the backend
QObject::connect: No such slot AalImageCaptureControl::onPreviewReady()
Camera framerate boundaries are set by the backend
Camera framerate boundaries are set by the backend
Already have a texture id and video sink, not creating a new one
	ext1: 0, ext2: 0 
	ext1: 0, ext2: 0 
qml: Picture saved as /home/phablet/Pictures/com.ubuntu.camera/image20180519_170638328.jpg
Camera framerate boundaries are set by the backend
Camera framerate boundaries are set by the backend
@floop2
Copy link

floop2 commented May 20, 2018

Happens for me too. If do a long swipe left the camera app image goes black (frozen picture disappears). Reselect camera app and can tale another picture and the picture freezes. The cycle repeats itself ;-)

@Flohack74 Flohack74 added this to the 16.04 Backlog milestone May 20, 2018
@ernesst
Copy link
Author

ernesst commented May 30, 2018

In the mean time when i'm creating a screenshot, the phone is slightly freezing.

@NeoTheThird NeoTheThird added this to Accepted in Ubuntu Touch Jun 2, 2018
@NeoTheThird NeoTheThird changed the title [Xenial] Camera app image freeze [xenial] Camera app image freeze Jun 2, 2018
@abkro
Copy link

abkro commented Jun 7, 2018

I can confirm this running Xenial r416 on hammerhead.

  • The image freezes as described, preventing you from taking another picture
  • Long swipe towards left makes the image disappear (black screen). Sliding back towards the right so that the camera app is once more active (i.e. finger slides towards left first, then right without being lifted off the screen) reactivates the camera. A picture can once more be taken, but the freeze issue reproduces itself.

Other issues with the camera.

  • Video recording not possible (as mentioned above).
  • When tapping the 'rotate' icon, bottom right, everything stalls and you have to wait 3 seconds before anything happens.

@RM250J
Copy link

RM250J commented Jun 14, 2018

Same here with r425 on hammerhead, take a picture and the screen freezes on that taken image, until I press the onscreen button to swap to the front camera. After a few seconds it will switch and a live image from the camera is active again, I can then switch back to the back camera and take another picture.

@tomoqv
Copy link

tomoqv commented Jun 14, 2018

Probably not related, but equally critical as the camera app won't launch at all on the Pro 5. #667

@mariogrip
Copy link
Member

ubports/libhybris#5 did not seem to have effect on this issue sadly :(

@NeoTheThird NeoTheThird moved this from Accepted to In Development in Ubuntu Touch Jul 13, 2018
@NeoTheThird NeoTheThird moved this from In Development to Accepted in Ubuntu Touch Jul 24, 2018
@cibersheep
Copy link

Similar behaviour on Hammerhead 2018-W31

  • You can take first picture with back camera. After that preview image freezes.
  • Reopen app, and choose video: Start recording video. Preview image is frozen. Video file is black but it has audio.
  • Reopen app. Choose front camera. First image is green. Then preview, and preview freezes. Shooting takes a picture

@ernesst
Copy link
Author

ernesst commented Aug 8, 2018

User experience wise, I'm not sure it's a good idea to move it from ota 4 to 5.
As I'm daily using my camera at work, this ciurent bug is stopping me to use my 16.04 as daily driver ( I'm patient :) ). However std users recieving the ota with a camera regression will be disapointed.

@Flohack74
Copy link
Member

@ernesst We know its not optimal, but we also seem to not find the bug. How long should we delay OTA-4 after me have delayed it for 2 months now? There are a lot of other fixes waiting to be deployed, plus we are running on an unsupported Ubuntu core version, and we are risking to get security issues etc.

@ernesst
Copy link
Author

ernesst commented Aug 13, 2018

Interesting fact, even if the screen freeze on the N5, I can still take picture one after the one.

@Flohack74
Copy link
Member

This is why we said we want to shift it. Its not critical imho

@trickyut
Copy link

trickyut commented Sep 5, 2018

Hi,
issue appears on OPO as well
BR,
tricky

@ernesst
Copy link
Author

ernesst commented Apr 10, 2019

Well done, thanks

@cibersheep
Copy link

Claap your haaaaaands and saaaay THAAAANK YOOOOOU!

@giiba
Copy link

giiba commented Apr 10, 2019

Nice to see this fix, thanks!

It seems the liveview feed still freezes when:

  • going to and from the capture settings menu at the bottom of the screen
  • or when switching between video/still modes
    A quick half swipe on the edge of the screen and LV resumes.

If I stay out of settings and stick to one mode the camera works flawlessly. Also just a note: while the UT media player cannot playback the files the video plays fine on my desktop in VLC.

@advocatux
Copy link

Just for the record (OTA-9), I confirm this issue is fixed.

  • Device: Nexus 5 (hammerhead)
  • Channel: rc
  • Build: Ubuntu 16.04 (2019-W18)

@giovanniiannotti
Copy link

OTA 9 fixed the issue for me too.

Nexus 5
Channel rc
2019-W18

@UniversalSuperBox UniversalSuperBox moved this from QA to Done in OTA-9 May 7, 2019
@giiba
Copy link

giiba commented May 8, 2019

For the record, I still get freezing.

If I switch between cameras and they are set to different aspect ratios (ie 16:9 and 4:3) it still freezes. A quick swipe at the edge and it works again.

If I leave all cameras set to the same ratio (16:9 or 4:3) the app works as expected.

@lduboeuf
Copy link
Collaborator

lduboeuf commented Dec 9, 2019

camera is buggy again on devel ( N5 )

@lduboeuf lduboeuf reopened this Dec 9, 2019
@UniversalSuperBox UniversalSuperBox added this to To do in OTA-12 via automation Dec 10, 2019
@mariogrip mariogrip removed their assignment Dec 14, 2019
mariogrip added a commit to ubports/qtubuntu-camera that referenced this issue Dec 21, 2019
…ead)

This is a masive SUPER HACK! it completly destroy and recreate camera
hal to restart preview. ¯\_(ツ)_/¯

Kinda fixes: ubports/ubuntu-touch#611
mariogrip added a commit to ubports/qtubuntu-camera that referenced this issue Dec 21, 2019
…head)

This is a massive SUPER HACK! it completely destroy and recreate camera
hal to restart preview. ¯\_(ツ)_/¯

Kinda fixes: ubports/ubuntu-touch#611
@UniversalSuperBox
Copy link
Member

We've had three people sitting together trying to fix this bug for a few hours, and at least we have a much better understanding of what's going on...

The first reference of this bug we found is in android camera2 preview data stop callback in the middle of the call on StackOverflow. The user was trying to perform calls similar to us and ending up in the same situation, a stopped preview. The fact it was on the Nexus 5, in the same situation as us, and there wasn't so much as a theory in the comments was... concerning.

The bug is first officially referenced in ubports/android_device_lge_hammerhead@6a34b0d, which is again concerning. Instead of actually fixing the problem, it just reports to another service that the problem is occurring.

In the AOSP camera app, we find our red flag. Line 34 in RepeatFailureDetector.java basically states that Google needed to do several hacks in sequence to get the camera to work properly again... The first is restarting the camera, the second is reporting to the user that the camera failed in the hope they'll restart their device.

Basically we're trying to fix the issue that Google's engineers gave up on.

That leaves us without many ways forward, actually. There's a lot of complexity leading to the detection and remediation of the issue, complexity that I don't think we can or should reimplement. The most likely fix, even though it's awful, is Marius' change which causes the camera to be restarted every time it does anything. Maybe we can use Google's code to make the restart faster, but it's looking less likely by the minute.

@UniversalSuperBox UniversalSuperBox moved this from To do to In progress in OTA-12 Jan 15, 2020
mariogrip added a commit to ubports/android_kernel_lge_hammerhead that referenced this issue Jan 22, 2020
I have no idea why :)

Fixes: ubports/ubuntu-touch#611
Change-Id: I755715492910e6bb9d2db6a79737a6d09dc57903
@mariogrip mariogrip moved this from In progress to Review in progress in OTA-12 Jan 22, 2020
mariogrip added a commit to ubports/android_kernel_lge_hammerhead that referenced this issue Jan 22, 2020
I have no idea why :)

Fixes: ubports/ubuntu-touch#611
Change-Id: I755715492910e6bb9d2db6a79737a6d09dc57903
@dark-eye
Copy link

Since reactivating the app seems to solve the issue wee might be able to add a work around in the camera app itself... until this issue is solved.

OTA-12 automation moved this from Review in progress to QA Jan 26, 2020
mariogrip added a commit to ubports/android_kernel_lge_hammerhead that referenced this issue Jan 26, 2020
I have no idea why :)

Fixes: ubports/ubuntu-touch#611
Change-Id: I755715492910e6bb9d2db6a79737a6d09dc57903
@Flohack74
Copy link
Member

So lets test tomorrow´s update ^^

@cibersheep
Copy link

N5 RC, camera works as expected

@j2g2rp
Copy link

j2g2rp commented Mar 19, 2020

Works fine on N5 on RC

@Flohack74 Flohack74 moved this from QA to Done in OTA-12 Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.