[Camera]With multiple camera instances open user can have both state camera in use by another app

RESOLVED DUPLICATE of bug 1102675

Status

defect
RESOLVED DUPLICATE of bug 1102675
5 years ago
5 years ago

People

(Reporter: rmitchell, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:2.1+, b2g-v2.1 affected, b2g-v2.2 affected)

Details

(Whiteboard: [2.2-exploratory-2], )

Attachments

(1 attachment)

Description:
With multiple camera instances open with grid mode on swapping between front and back camera causes both cameras to read the camera is in user by another app


Repro Steps:
1) Update a Flame to 20141219040202
2) Open two instances of camera ( camera app messaging camera)
3) Turn on grid mode  
4) Tap front and back facing camera button several times 


Actual:
Both instances says the camera is in user by another app


Expected:
One of the apps is usable 

Environmental Variables:
Device: Flame 2.2 (319mb)(Kitkat Base)(Full Flash)
Build ID: 20141219040202
Gaia: deb90229734e5397cda806fb11f2e001fba83399
Gecko: 021b09e92d30
Gonk: e5c6b275d77ca95fb0f2051c3d2242e6e0d0e442
Version: 37.0a1 (2.2)
Firmware Version: v188-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0


Repro frequency: (2/3, 100%, etc.)
Link to failed test case:
See attached:logcat, Video clip: https://www.youtube.com/watch?v=H3KyX6hkuvE&feature=youtu.be
Flags: needinfo?(dharris)
Issue was  affected in  2.1 flame 
one camera is always active 

Flame 2.1

Environmental Variables:
Device: Flame 2.1 (319mb)(Kitkat Base)(Full Flash)
BuildID: 20141219001200
Gaia: 6af3d029bae3a14f400fec0926f0f8ad7b579b4b
Gecko: d41f6bd64343
Gonk: e5c6b275d77ca95fb0f2051c3d2242e6e0d0e442
Version: 34.0 (2.1)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
QA Whiteboard: [QAnalyst-Triage?]
With updated repro steps, this issue will repro 100%:
1. Open Messages> New Message> Attach through camera
2. Go to Homescreen and open camera
3. Edge gesture back to messages app
4. Switch to front facing camera and edge gesture to camera app at the same time
5. Edge gesture back to messages app
6. Change to back facing camera

This causes both instances of camera to become unusable until they are both closed, and 1 is reopened. This doesnt seems like normal user flow though. NI camera owner for a blocking decision.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(dharris) → needinfo?(npark)
[Blocking Requested - why for this release]:
Breaks code camera functionality 

Looks like it's related to Bug 1113417.  Since it is reproducible 100%, nominating this as a blocker.
blocking-b2g: --- → 2.1?
Flags: needinfo?(npark)
blocking-b2g: 2.1? → 2.1+
QA Contact: jmitchell
I'm not certain that this is a regression - In 2.0 there are no "camera in use by other app" messages. The behavior is that anytime there is a conflict the message app is automatically killed. Because of this I do not think that 2.0 can be considered 'unaffected' as the functionality is completely different. 

Device: Flame 2.0 KK
Build ID: 20141222071429
Gaia: ce83ea7b8e3fa2d1c3fd771fc22b654c18b3c381
Gecko: 7d0adaf6c447
Version: 32.0 (2.0)
Firmware Version: v188-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
QA Contact: jmitchell
Hi! Vincent,

Could you help to take a look? Thanks

--
Keven
Flags: needinfo?(vliu)
Sure!! Also involving becker to look this issue.
Camera in use message was introduced in 2.1 to message the user when multiple apps are trying to acquire the camera capture stream. 

Justin/Mike: Any input on this bug?
Flags: needinfo?(mhabicher)
Flags: needinfo?(jdarcangelo)
Following the suggested commit id in Comment 1, I can't reproduce this issue by Comment 2.

Gaia : commit 6af3d029bae3a14f400fec0926f0f8ad7b579b4b
Gecko : commit fbf5437286a51177ac44099f70ddb882f85f57e7

From log analysis, the possible clue would be.

12-19 15:12:02.690   201  1481 W CameraService: CameraService::connect X (pid 1328) rejected (existing client).
12-19 15:12:02.690  1328  1349 W CameraBase: An error occurred while connecting to camera: 0

The creation/removing of CameraClient would be called by CameraService::connect(...)/CameraService::BasicClient::disconnect() in CameraService. They did their own things in their separate thread. But since CameraService uses Mutex::Autolock to protect from thread competing, It is weird that we still got above log. Does anyone can help me to confirm that the latest commit id I used is right to reproduce the issue? Thanks
(In reply to Derek Harris [:DerekH] from comment #2)
> With updated repro steps, this issue will repro 100%:
> 1. Open Messages> New Message> Attach through camera
> 2. Go to Homescreen and open camera
> 3. Edge gesture back to messages app
> 4. Switch to front facing camera and edge gesture to camera app at the same
> time
> 5. Edge gesture back to messages app
> 6. Change to back facing camera
> 
> This causes both instances of camera to become unusable until they are both
> closed, and 1 is reopened. This doesnt seems like normal user flow though.
> NI camera owner for a blocking decision.

Hi :DerekH,
Would you please make sure I uses the correct to reproduce this issue? If possible, Would you please attach a video to record the whole process when you reproduce it. Thanks
Flags: needinfo?(vliu) → needinfo?(dharris)
A video of my steps used in comment 2 can be found here: https://www.youtube.com/watch?v=AE8UHh7IzE4&edit=vd
Flags: needinfo?(dharris)
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mhabicher)
Resolution: --- → DUPLICATE
Duplicate of bug: 1102675
Flags: needinfo?(jdarcangelo)
You need to log in before you can comment on or make changes to this bug.