Closed Bug 973790 Opened 7 years ago Closed 7 years ago

[B2G][Camera] Black screen while user switch camera mode.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed)

VERIFIED FIXED
1.4 S2 (28feb)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed

People

(Reporter: hlu, Assigned: mikeh)

References

Details

(Keywords: regression, smoketest)

Attachments

(1 file, 4 obsolete files)

Attached file logcat.txt (obsolete) —
- Base ROM version -
    Gaia      bf497b7adfaa4c087d492acf7f143a61b5ec08e9
    Gecko     https://hg.mozilla.org/mozilla-central/rev/339f0d450d46
    BuildID   20140217160203
    Version   30.0a1
    ro.build.version.incremental=eng.archermind.20131114.105818
    ro.build.date=Thu Nov 14 10:58:33 CST 2013


* Reproduce Steps
1. Open the Camera app.
2. Press the Video camera icon (If default mode is video camera icon, please press picture camera icon)


* Actual results:
1. Device shows black screen while switch to another camera mode.

* Expected result:
1. Should switch to correct camera mode and viewfinder display work properly.
Attached image 2014-02-18-15-11-20.png (obsolete) —
blocking-b2g: --- → 1.4?
Unable to reproduce on Helix. What device is this happening on?
Flags: needinfo?(hlu)
Duplicate of this bug: 973891
(In reply to Mike Habicher [:mikeh] from comment #2)
> Unable to reproduce on Helix. What device is this happening on?

I am able to repro this on the latest 1.4 using a Buri device. Continuing with regression window.

Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140218040203
Gaia: ae90f9b322509ee09fbd3963bd23e142845613ab
Gecko: 318c0d6e24c5
Version: 30.0a1
Firmware Version: v1.2-device.cfg
QA Contact: gbennett
.:Last Working Build:.
Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140216084847
Gaia: 33fe27aa3c60ccf312f35da0edc1b1918780379f
Gecko: 2bddbd180d2d
Version: 30.0a1
Firmware Version: v1.2-device.cfg

.:First Broken Build:.
Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140217034949
Gaia: 33fe27aa3c60ccf312f35da0edc1b1918780379f
Gecko: 364f8691ea51
Version: 30.0a1
Firmware Version: v1.2-devices.cfg

I would compare the Gecko and Gaia, but since the Gaia is the same there is no need.
The regression range seems incorrect. There's nothing in either regression range that would imply what this regressed. Please retest.
(In reply to Jason Smith [:jsmith] from comment #6)
> The regression range seems incorrect. There's nothing in either regression
> range that would imply what this regressed. Please retest.

Actually disregard - what regressed here might not be caused by the changes in bug 958200 then.
The camera in some devices is very picky about timing, and will stall/fail if the device is really busy. I think this is related to bug 973689.
(In reply to Mike Habicher [:mikeh] from comment #8)
> The camera in some devices is very picky about timing, and will stall/fail
> if the device is really busy. I think this is related to bug 973689.

I don't think so - that bug reproduces on 1.3, where as this reproduces on 1.4 only.
I can reproduce this every time on Helix using latest 1.4 build from today (Wednesday 2/19). The build from Sunday (2014-02-16-16-02-03) works fine though.
When I flashed my helix with today's 1.4 engineering build I found that after the first run, the camera crashes all the time.  Starting the camera and then killing it and then restarting causes an immediate crash.  I have to reboot to get it back to a state where it doesn't crash all the time.

In that first run after a reboot, I sometimes saw the bug as described here.  Once, though, I ran it and saw the black screen right from the start and never had a working viewfinder.

Interestingly, on the first run when the viewfinder starts out okay and then goes black, I can switch back and forth between camera and video. Still all black, but the buttons are responsive.  If I then switch to gallery or the homescreen and return to the camera app, the ux is frozen and I can't switch modes.  The buttons still respond to device rotation but tapping on the does nothing.  (That seems like a clue because we have or had code that disabled the buttons while acquiring a preview).

On the other hand, my helix still displays crazy colors all the time, so I may have a very out of date base image.
I can reproduce in the same way on a hamachi with today's nightly.
Assignee: nobody → mhabicher
Status: NEW → ASSIGNED
Attachment #8377401 - Attachment is obsolete: true
Attachment #8377402 - Attachment is obsolete: true
Attachment #8378695 - Flags: review?(dhylands)
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Comment on attachment 8378695 [details] [diff] [review]
Only call ClearCurrentFrame() when closing down the camera hardware, v1

Review of attachment 8378695 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with issue addressed.

::: dom/camera/GonkCameraControl.cpp
@@ +214,5 @@
>    DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
>    MOZ_ASSERT(NS_GetCurrentThread() == mCameraThread);
>  
>    // Stop any currently running preview
> +  PausePreview();

I noticed this is declared to return an nsresult, which is apparently being ignored.

should this check the value? or perhaps PausePreview should be declared void?
Attachment #8378695 - Flags: superreview+
Comment on attachment 8378695 [details] [diff] [review]
Only call ClearCurrentFrame() when closing down the camera hardware, v1

Review of attachment 8378695 [details] [diff] [review]:
-----------------------------------------------------------------

Oops set the wrong flag
Attachment #8378695 - Flags: superreview+
Attachment #8378695 - Flags: review?(dhylands)
Attachment #8378695 - Flags: review+
(In reply to Dave Hylands [:dhylands] from comment #14)
> Comment on attachment 8378695 [details] [diff] [review]
> Only call ClearCurrentFrame() when closing down the camera hardware, v1
> 
> Review of attachment 8378695 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r=me with issue addressed.
> 
> ::: dom/camera/GonkCameraControl.cpp
> @@ +214,5 @@
> >    DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
> >    MOZ_ASSERT(NS_GetCurrentThread() == mCameraThread);
> >  
> >    // Stop any currently running preview
> > +  PausePreview();
> 
> I noticed this is declared to return an nsresult, which is apparently being
> ignored.
> 
> should this check the value? or perhaps PausePreview should be declared void?

Sure, I'll change it to a void return.
Carrying r+ forward; putting the nsresult return type back in, and logging a warning on failure.
Attachment #8378708 - Attachment is obsolete: true
Attachment #8378713 - Flags: review+
This bug is happened in Buri device.
Flags: needinfo?(hlu)
https://hg.mozilla.org/mozilla-central/rev/8a58bb59c57f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
blocking-b2g: 1.4? → 1.4+
Verified fixed.
Can switch to correct camera mode and viewfinder display work properly.

BuildID: 20140221040202
Gaia: 35365feace970bfc51276428f40a477c9c86b7bb
Gecko: 7010ab83a06e
Version: 30.0a1
v1.2-devices.cfg
Status: RESOLVED → VERIFIED
See Also: → 957749
Target Milestone: --- → 1.4 S2 (28feb)
You need to log in before you can comment on or make changes to this bug.