Closed
Bug 936975
Opened 11 years ago
Closed 6 years ago
[B2G][Helix][camera][dingyu]The video icon(which show video recording work in background) is will not disappear after a crash in video recording
Categories
(Firefox OS Graveyard :: Gaia::System, defect, P2)
Firefox OS Graveyard
Gaia::System
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: lecky.wanglei, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 Steps to reproduce: 1. open a camera and toggle to the video mode 2. press the capture button and then press the home button many times quickly Actual results: 1. a dialog box show "camera just crash" and the video icon is always show and will not disappear after 5s Expected results: 1. the video icon(which show video recording work in background) should disappear after 5s. Analyze the code shell.js --------------------------------------------------------------------- (function recordingStatusTracker() { let gRecordingActiveCount = 0; Services.obs.addObserver(function(aSubject, aTopic, aData) { let oldCount = gRecordingActiveCount; if (aData == "starting") { gRecordingActiveCount += 1; } else if (aData == "shutdown") { gRecordingActiveCount -= 1; } // We need to track changes from 1 <-> 0 if (gRecordingActiveCount + oldCount == 1) { shell.sendChromeEvent({ type: 'recording-status', active: (gRecordingActiveCount == 1) }); } }, "recording-device-events", false); })(); ----------------------------------------------------------------- when startRecording happens, gRecordingActiveCount will add one, and if the stopRecording happens, gRecordingActiveCount will delete one. so if a crash happen, there is only startRecording event but have no stopRecording event, the video icon will always exist. and If i startRecording again, the gRecordingActiveCount will become 2 and can not be recovery. So if the camera work fine, there is no problem, but if there is a abnormal in camera, the video can not recover to normal unless rebooting the phone. so I think the following code is more reasonable than original code. --------------------------------------------- if (aData == "starting") { gRecordingActiveCount = 1; } else if (aData == "shutdown") { gRecordingActiveCount = 1; } ---------------------------------------------- But the above code still have a bug, if the crash happen, we need to restart a video recording to recover the video icon status
blocking-b2g: --- → hd?
Flags: needinfo?(wchang)
Priority: -- → P2
Comment 1•11 years ago
|
||
Not blocking, but should be investigated and fixed in a future release.
Updated•11 years ago
|
Jason, the bug is not a duplicate of bug 898917. we have merge the change bug 898917 in our code. Please look carefully at the Comment 0 Description.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 4•11 years ago
|
||
(In reply to lecky from comment #3) > Jason, the bug is not a duplicate of bug 898917. we have merge the change > bug 898917 in our code. Please look carefully at the Comment 0 Description. No actually it is. The patch fixes the issue to ensure that we only show the video recording icon for 5 seconds after the content process is killed. The crash indicated here is irrelevant to the bug filed here - the issue is being talked about the persistent notification.
Status: UNCONFIRMED → RESOLVED
blocking-b2g: hd? → ---
Closed: 11 years ago → 11 years ago
Flags: needinfo?(jsmith)
Resolution: --- → DUPLICATE
Comment 5•11 years ago
|
||
Oh wait, now I understand. This is a persistent notification on a crash from using the camera recording.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---
Updated•11 years ago
|
Component: Gaia::Camera → Gaia::System
Comment 6•6 years ago
|
||
Firefox OS is not being worked on
Status: REOPENED → RESOLVED
Closed: 11 years ago → 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•