Closed Bug 887326 Opened 11 years ago Closed 11 years ago

[Camera][Leo] Viewfinder is black

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(blocking-b2g:leo+, firefox25 unaffected, b2g18 verified, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

VERIFIED FIXED
1.1 QE4 (15jul)
blocking-b2g leo+
Tracking Status
firefox25 --- unaffected
b2g18 --- verified
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed

People

(Reporter: marcia, Assigned: roc)

References

Details

(Keywords: regression, smoketest)

Attachments

(6 files)

Seen while running unagi, using: Gecko http://hg.mozilla.org/releases/mozilla-b2g18/rev/855297ec671e Gaia e6666a2135244f75ff793aae790feeddbeae8832 BuildID 20130626070211 Version 18.0 STR: 1. Fresh flash of latest V1 train unagi build 2. Select the camera icon 3. See nothing through the viewfinder - all is black 4. Take a picture Expected: I could see what I am taking a picture of Actual: I cannot see anything but black
Here is the logcat. At time of testing, battery on device was at 17%.
Looks like we're setting up the preview window and then tearing it down again. 06-26 09:45:07.055: E/QualcommCamera(120): Qint android::set_preview_window(camera_device*, preview_stream_ops*): E window = 0x999cd8 06-26 09:45:07.055: E/QualcommCamera(120): Qint android::start_preview(camera_device*): E 06-26 09:45:07.235: E/QualcommCameraHardware(120): bool android::QualcommCameraHardware::initPreview() Got preview dimension as 576 x 432 06-26 09:45:07.295: E/QualcommCamera(120): Qint android::start_preview(camera_device*): X 06-26 09:45:08.756: E/QualcommCamera(120): Qvoid android::disable_msg_type(camera_device*, int32_t): E 06-26 09:45:08.756: E/QualcommCamera(120): Qvoid android::disable_msg_type(camera_device*, int32_t): E 06-26 09:45:08.756: E/QualcommCamera(120): Qvoid android::stop_preview(camera_device*): E 06-26 09:45:08.837: E/QualcommCameraHardware(120): stopPreviewInternal, J_mCameraRunning = 0 06-26 09:45:08.847: E/QualcommCamera(120): Qvoid android::disable_msg_type(camera_device*, int32_t): E 06-26 09:45:08.847: E/QualcommCamera(120): Qvoid android::disable_msg_type(camera_device*, int32_t): E 06-26 09:45:08.847: E/QualcommCamera(120): Qvoid android::stop_preview(camera_device*): E 06-26 09:45:08.847: E/QualcommCameraHardware(120): stopPreviewInternal, J_mCameraRunning = 0 06-26 09:45:08.847: E/QualcommCamera(120): Qvoid android::disable_msg_type(camera_device*, int32_t): E 06-26 09:45:08.847: E/QualcommCamera(120): Qvoid android::stop_preview(camera_device*): E 06-26 09:45:08.847: E/QualcommCameraHardware(120): stopPreviewInternal, J_mCameraRunning = 0 06-26 09:45:08.847: E/QualcommCamera(120): Qint android::cancel_picture(camera_device*): E 06-26 09:45:08.847: E/QualcommCamera(120): Qvoid android::release(camera_device*): E 06-26 09:45:08.847: I/QualcommCameraHardware(120): release: mCameraRunning = 0 06-26 09:45:08.847: E/CAM_FD(120): cam_conf: CAMERA_EXIT 06-26 09:45:08.847: I/QualcommCameraHardware(120): release X: mCameraRunning = 0, mFrameThreadRunning = 0 06-26 09:45:08.847: E/QualcommCamera(120): Qint android::set_preview_window(camera_device*, preview_stream_ops*): E window = 0x0 Marcia, was the logcat captured while the fail-case happened, or after the fact? Either way, can you please attach a copy of the logcat output captured while the test is happening, without filtering on "camera"? It might be useful to have additional context. If you can also capture the kernel log at the same time in a separate window, that would be handy: |adb shell dmesg|. No need to post as .rtf files--text is fine. Thanks!
Flags: needinfo?(mozillamarcia.knous)
Mike: Logcat taking during the fail case. Nominating for blocking since this is occuring on Leo as well. Better logcat coming.
blocking-b2g: --- → leo?
Flags: needinfo?(mozillamarcia.knous)
Summary: [Camera] Viewfinder is black → [Camera][Leo] Viewfinder is black
Thanks, Marcia. Inder, I see this in the kernel log: <3>[2013-06-27 03:19:51 KST][ 982.508193] [adsp_driver.c:adsp_pmem_check] module JPEGTASK: region (vaddr 43156c00 len 2883584) clashes with registered region (vaddr 42f82000 paddr 2baef000 len 2883584 Could this be the cause of the viewfinder failing to start? The logcat output also shows plenty of occurrences of "fail" and "error", but none of them make any sense to me.
Flags: needinfo?(ikumar)
For reference, push log from past two days below: http://hg.mozilla.org/releases/mozilla-b2g18/pushloghtml?startdate=2013-06-24&enddate=2013-06-26 Although based on the discussion I'm seeing above, this looks like a RIL problem potentially.
> Inder, I see this in the kernel log: > > <3>[2013-06-27 03:19:51 KST][ 982.508193] [adsp_driver.c:adsp_pmem_check] > module JPEGTASK: region (vaddr 43156c00 len 2883584) clashes with registered > region (vaddr 42f82000 paddr 2baef000 len 2883584 > > Could this be the cause of the viewfinder failing to start? MikeH, not sure. Don't see how JPEGTASK pmem clash would impact viewfinder to not come up.
Flags: needinfo?(ikumar)
We are able to reproduce this issue on our reference devices. What we noticed that this issue doesn't happen on "userdebug" builds but we are able to reproduce it on "eng" builds. I compared the two logcats and I don't see any camera errors. MikeH, I also don't see any JPEGTASK error in dmesg. Only difference that jumps out and can give a clue to the issue is this error i see on eng build: E/msm7627a.hwcomposer( 124): drawLayerUsingCopybit: wrong params for display screen_w=0 src_crop_width=576 screen_w=0 src_crop_width=576 I see this message in the attached logcat as well. Diego, any idea why we are seeing this in "eng" build only and could it be causing any issue?
Flags: needinfo?(dwilson)
I could successfully take pictures even with viewfinder blank which confirms that there is no issue with the camera. It's just not able to display it on screen because of some wrong display dimensions. BTW, As I suspected, I disabled the hwcomposer by removing /system/lib/hw/hwcomposer.msm7627a.so and still see the issue. (removing NI on Diego). Not sure how it works in userdebug builds though.
Flags: needinfo?(dwilson)
blocking-b2g: leo? → leo+
Keywords: smoketest
Look likes a regression of Bug 876542. After reverted this commit, camera preview works. -- Keven
(In reply to kkuo from comment #14) > Look likes a regression of Bug 876542. > After reverted this commit, camera preview works. > > -- > Keven I can confirm that reverting this commit makes the camera preview working again on Nexus S and Inari.
Maybe :nical could help us ?
Flags: needinfo?(nical.bugzilla)
Seems like this change also « fix »: diff --git a/apps/camera/js/camera.js b/apps/camera/js/camera.js index 3102edf..8c90781 100644 --- a/apps/camera/js/camera.js +++ b/apps/camera/js/camera.js @@ -878,9 +878,9 @@ var Camera = { var dy = -(width - screenWidth) / 2; transform = 'translate(' + dx + 'px,' + dy + 'px) ' + transform; - style.transform = transform; - style.width = width + 'px'; - style.height = height + 'px'; + // style.transform = transform; + // style.width = width + 'px'; + // style.height = height + 'px'; }, Of I only leave the style.width and style.height, then the video is here but misplaced.
Flags: needinfo?(dale)
After testing with padenot, we deduced that it seems to be related to the rotate and/or the transform operations performed in setPreviewSize() of camera.js. I'll try to investigate this during the weekend.
Fun fact: I've just noticed that the task switcher preview is okay.
Attached image fun fact part 1
Fun fact part 1 : preview is black in camera app.
Attached image fun fact part 2
Fun fact part 2: the camera preview is okay in taskswitcher mode
Not reverting anything, but adding this change, I get Camera preview working ! diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index ae20e8c..5b8dcbd 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -602,8 +602,10 @@ CompositorParent::TransformFixedLayers(Layer* aLayer, gfxMatrix transform2D; gfxSize scale = aScaleDiff; if (transform.Is2D(&transform2D)) { - scale.width *= transform2D.xx; - scale.height *= transform2D.yy; + if (transform2D.xx > 0.0 && transform2D.yy > 0.0) { + scale.width *= transform2D.xx; + scale.height *= transform2D.yy; + } } if (aLayer->GetIsFixedPosition() &&
Please find attached a patch that fixes the issue. I'm not sure to understand the full implications, though, but it makes Camera preview working again.
Attachment #769389 - Flags: review?(roc)
Attachment #769389 - Flags: review?(ajones)
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(dale)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Confirmed resolved on Unagi/Leo v1.1.0 Moz/Comm RILs: Build ID: 20130701070213 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/15923aca6e6d Gaia: c7472acec84f0d4527cdd6fd555d289e1d3e1d1d Platform Version: 18.1
Verifying as fixed per comment 25
Status: RESOLVED → VERIFIED
Assignee: nobody → roc
Target Milestone: --- → 1.1 QE4 (15jul)
Attachment #769389 - Flags: review?(roc)
Attachment #769389 - Flags: review?(ajones)
:Inder, On a qcom device, I see this issue on 1.3 as well. Do you have any fix for this issue? When I launch the camera, the screen goes blank often, but able to capture the picture. When tapped on the view finder, preview comes and again goes off. I had to capture a random pic, launch the gallery from the film strip and come back to camera app to have it working proper.
Flags: needinfo?(ikumar)
Flags: needinfo?
:Madana -- it's probably a hwc issue which will be fixed soon. Please send me an email if you need more details.
Flags: needinfo?(ikumar)
Flags: needinfo?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: