Closed Bug 805377 Opened 12 years ago Closed 12 years ago

[Camera] Change to video record mode will cause app crash

Categories

(Core :: DOM: Device Interfaces, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

()

VERIFIED FIXED
mozilla19
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: rafael.marquez, Assigned: ttaubert)

References

Details

(Keywords: crash, smoketest, unagi)

Attachments

(1 file)

Version:
Gecko:  8fd2bf7
Gaia:  fcfa185

Device: Otoro

*Procedure
Open camera app
Select video camera

*Expected Result
Video Camera app is opened

*Actual Result
If the user try open Video Camera app, a crash error appears
blocking-basecamp: --- → ?
I can confirm this on
2012-10-25
gaia master : 4b999a7866c01a61642fa2015df0868d6eb68c88
gecko : 6bb4d66668895b4d24434ce90f483a5246beccd1
Summary: [Video] If the user try open Video Camera app, a crash error appears → [Camera] Change to video record mode will cause app crash
Confirming on Unagi.
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
#0  strcmp () at bionic/libc/arch-arm/bionic/strcmp.S:65
#1  0x408e9f72 in mozilla::GonkRecorderProfileManager::Get (this=0x43efbf00, aProfileName=0x41506eb8 "") at /home/tim/workspace/b2g-desktop/dom/camera/GonkRecorderProfiles.cpp:236
#2  0x408e436e in mozilla::nsGonkCameraControl::SetupVideoMode (this=0x43d42d40, aProfile=...) at /home/tim/workspace/b2g-desktop/dom/camera/GonkCameraControl.cpp:881
#3  0x408e4442 in mozilla::nsGonkCameraControl::GetPreviewStreamVideoModeImpl (this=0x43d42d40, aGetPreviewStreamVideoMode=0x435363d0)
    at /home/tim/workspace/b2g-desktop/dom/camera/GonkCameraControl.cpp:956
#4  0x408e1b32 in mozilla::GetPreviewStreamVideoModeTask::Run (this=0x435363d0) at /home/tim/workspace/b2g-desktop/dom/camera/CameraControlImpl.h:594
#5  0x40c671ee in nsThread::ProcessNextEvent (this=0x43df1760, mayWait=<value optimized out>, result=0x45552eb7) at /home/tim/workspace/b2g-desktop/xpcom/threads/nsThread.cpp:620
#6  0x40c479f6 in NS_ProcessNextEvent_P (thread=0x0, mayWait=true) at /home/tim/workspace/b2g-desktop/objdir-gecko-unagi/xpcom/build/nsThreadUtils.cpp:220
#7  0x40c67638 in nsThread::ThreadFunc (arg=<value optimized out>) at /home/tim/workspace/b2g-desktop/xpcom/threads/nsThread.cpp:258
#8  0x400299c0 in _pt_root (arg=<value optimized out>) at /home/tim/workspace/b2g-desktop/nsprpub/pr/src/pthreads/ptthread.c:156
#9  0x400ade18 in __thread_entry (func=0x40029961 <_pt_root>, arg=0x43622b70, tls=<value optimized out>) at bionic/libc/bionic/pthread.c:217
#10 0x400ad96c in pthread_create (thread_out=<value optimized out>, attr=0xbeb1949c, start_routine=0x40029961 <_pt_root>, arg=0x43622b70) at bionic/libc/bionic/pthread.c:357
#11 0x00000000 in ?? ()
Component: Gaia → DOM: Device Interfaces
Product: Boot2Gecko → Core
The ProfileList seems somehow borked?

(gdb) print ProfileList[0]
$3 = {name = 0x410ec3bb "low", quality = 0}
(gdb) print ProfileList[1]
$4 = {name = 0x410eaf8d "high", quality = 1}
(gdb) print ProfileList[2]
$5 = {name = 0x410ec3bf "qcif", quality = 2}
(gdb) print ProfileList[3]
$6 = {name = 0x410ec3c4 "cif", quality = 3}
(gdb) print ProfileList[4]
$7 = {name = 0x410ec3c8 "480p", quality = 4}
(gdb) print ProfileList[5]
$8 = {name = 0x410ec3cd "720p", quality = 5}
(gdb) print ProfileList[6]
$9 = {name = 0x410ec3d2 "1080p", quality = 6}
(gdb) print ProfileList[7]
$10 = {name = 0x0, quality = 0}
(gdb) print ProfileList[8]
$11 = {name = 0x0, quality = 0}
(gdb) print ProfileList[9]
$12 = {name = 0x0, quality = 1082692949}
Also, mMaxQualityIndex seems a little high?

(gdb) print mMaxQualityIndex
$2 = 11
Sorry, that's what the profile list looks like and mMaxQualityIndex is too high:

{{name = 0x410ec3bb "low", quality = 0}, {name = 0x410eaf8d "high", quality = 1}, {name = 0x410ec3bf "qcif", quality = 2}, {name = 0x410ec3c4 "cif", quality = 3}, {name = 0x410ec3c8 "480p", quality = 4}, {name = 0x410ec3cd "720p", quality = 5}, {name = 0x410ec3d2 "1080p", quality = 6}, {name = 0x0, quality = 0}}
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
This patch makes the video app not crash anymore. The video still doesn't work but the segfault is gone.
(In reply to Tim Taubert [:ttaubert] from comment #7)
> This patch makes the video app not crash anymore. The video still doesn't
> work but the segfault is gone.

Ah, that's bug 800625.
Attachment #675075 - Flags: review?(mhabicher)
Comment on attachment 675075 [details] [diff] [review]
determine the correct value for mMaxQualityIndex

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

::: dom/camera/GonkRecorderProfiles.cpp
@@ +184,5 @@
>  GonkRecorderProfileManager::GonkRecorderProfileManager(uint32_t aCameraId)
>    : RecorderProfileManager(aCameraId)
>  {
>    DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
> +  mMaxQualityIndex = sizeof(ProfileList) / sizeof(ProfileList[0]) - 1;

Good catch.  These were originally the same.

Sorry for the inconvenience.
Attachment #675075 - Flags: review?(mhabicher) → review+
Comment on attachment 675075 [details] [diff] [review]
determine the correct value for mMaxQualityIndex

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 795379
User impact if declined: b2g crashes
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): low risk, one-line patch
String or UUID changes made by this patch: none
Attachment #675075 - Flags: approval-mozilla-aurora?
Keywords: unagi
We can't have this crashing so marking as a blocker.
blocking-basecamp: ? → +
Keywords: crash
Blocks: 805685
Comment on attachment 675075 [details] [diff] [review]
determine the correct value for mMaxQualityIndex

B2G-only patch that's blocking-basecamp+. We don't need to wait for approval-aurora.
Attachment #675075 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/97d5111dfb39
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
smoke-test blockers have the highest priority.
Keywords: smoketest
Priority: -- → P1
verified
2012-10-30
gaia master: f18958076b2b50edf01754bb4934c998259ce6a2
gecko: a17fb13630fcac0a9a222c1130e4a5933277e30c
Status: RESOLVED → VERIFIED
Resolution: FIXED → WORKSFORME
Resolution: WORKSFORME → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: