Closed
Bug 976032
Opened 11 years ago
Closed 11 years ago
Camera Application Crash if focus mode is set to continuous-picture in re factored code
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Firefox OS Graveyard
Gaia::Camera
Tracking
(Not tracked)
RESOLVED
FIXED
1.4 S2 (28feb)
People
(Reporter: srinivasvemula.mtech, Assigned: mikeh)
References
Details
(Keywords: crash)
Attachments
(1 file, 1 obsolete file)
|
2.93 KB,
patch
|
dhylands
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Steps to reproduce:
Set the focus mode "Continuous-picture" in Camera.prototype.configure = function(mozCamera) method in Camera.js .
Actual results:
Camera application got crashed in 2 or 3 seconds after preview started.
Expected results:
Camera preview should start properly with continuous-picture focus mode.
| Assignee | ||
Comment 1•11 years ago
|
||
Unable to reproduce with:
- gecko: b2g-inbound:4b6103d24d1e
- gaia: master:e5cb62e63b3c2fbe326c96f712e36d228cc765ad
| Reporter | ||
Comment 2•11 years ago
|
||
Mike,
When focus mode is set to continuous-picture,notifcation message is coming from Camera to
void GonkCameraHardware::notify(int32_t aMsgType, int32_t ext1, int32_t ext2) method. Here OnAutofocusComplete method getting called.
I think the issue with nsDOMCameraControl::OnAutoFocusComplete(bool aAutoFocusSucceeded) method.There is no checking condition of CameraAutoFocusCallback is null or not null.
| Reporter | ||
Comment 3•11 years ago
|
||
| Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8381143 [details] [diff] [review]
CameraAppCrash
>diff -Nru b/dom/camera/DOMCameraControl.cpp a/dom/camera/DOMCameraControl.cpp
>--- b/dom/camera/DOMCameraControl.cpp 2014-02-24 09:03:23.000000000 +0530
>+++ a/dom/camera/DOMCameraControl.cpp 2014-02-25 10:03:57.878240220 +0530
>@@ -1293,7 +1293,10 @@
>
> nsCOMPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb.forget();
> mAutoFocusOnErrorCb = nullptr;
>+ // Checking the Callback stops the application to get crash if callback is null.
>+ if(cb){
> cb->Call(aAutoFocusSucceeded, ignored);
>+ }
> }
>
> void
Attachment #8381143 -
Attachment description: This patch checks the autofocus call back is null or not before callback is done and this check condition stops the camera application crash in case callback is null → CameraAppCrash
| Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Srinivas Vemula from comment #2)
>
> When focus mode is set to continuous-picture, notifcation message is coming
> from Camera to
> void GonkCameraHardware::notify(int32_t aMsgType, int32_t ext1, int32_t
> ext2) method. Here OnAutofocusComplete method getting called.
That's interesting--I was under the impression that there was no callback in continuous autofocus mode, at least not until JB/KK.
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mhabicher
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8381143 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8381491 [details] [diff] [review]
WIP - Guard against null callbacks, v1
I'm not sure how Srinivas was hitting this condition, but this guard definitely won't hurt.
Attachment #8381491 -
Flags: review?(dhylands)
Comment 8•11 years ago
|
||
Comment on attachment 8381491 [details] [diff] [review]
WIP - Guard against null callbacks, v1
Review of attachment 8381491 [details] [diff] [review]:
-----------------------------------------------------------------
Looks reasonable to me.
Attachment #8381491 -
Flags: review?(dhylands) → review+
| Assignee | ||
Comment 9•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S2 (28feb)
You need to log in
before you can comment on or make changes to this bug.
Description
•