Closed Bug 990753 Opened 10 years ago Closed 10 years ago

[Camera][Madai][QRD Only] Camera freezes when front camera button is clicked leading to black screen and unrecoverable state

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:1.4+)

RESOLVED DUPLICATE of bug 996513
blocking-b2g 1.4+

People

(Reporter: hkoka, Assigned: mikeh)

References

Details

(Whiteboard: [m+] [CR 651554])

Attachments

(1 file)

Issue: Camera app freezes when the front camera button is pressed; and a black screen shows up. We cannot recover from this state. Needs camera reboot.

Device: QRD (Qualcomm)

Build: Gecko rev: 38bc15c969fb1b5d435fa943f488bb4bd8918397

Gaia rev: eee964fc7e8dc519218dee6b72595ad0f7dd8231
Can you take a look and see if this is reproducible on other devices with front facing camera
No longer depends on: 989568
Flags: needinfo?(mhabicher)
I'll take a look.
Flags: needinfo?(mhabicher)
QA Contact: mhabicher
Blocks: 990761
No longer blocks: 990761
No longer blocks: 983405
Unable to reproduce on nexus-4 running:
- gecko: b2g-inbound:275feb8db98a
- gaia: camera-new-features:bb7e44e428640f15e1c07b0ab89c712e797fb9ea

Front camera works as expected.
Blocks: 983405
Summary: [Camera][Madai][QRD] Camera freezes when front camera button is clicked leading to black screen and unrecoverable state → [Camera][Madai][QRD Only] Camera freezes when front camera button is clicked leading to black screen and unrecoverable state
blocking-b2g: --- → 1.4+
Mike - need your help reproducing this on the QRD that you have (new build info from QC is here: https://bugzilla.mozilla.org/show_bug.cgi?id=961246)
This is reproducible on:
- gecko: b2g_autogen_ephemeral_branch:8e91fa5a127e5cbfa92a99896f4501ede717d347
- gaia: master:43255a9fac46da49937eb145aeeee0389d62ef07

As in bug 990761, I don't know what 'b2g-autogen_ephemeral_branch" is, but that seems to be what the QRD build script leaves $B2G/gecko in.
blocking-b2g: 1.4+ → ---
From the logcat, it looks like the user-facing camera ("Initializing camera 1") starts up properly, but around the call to setConfiguration(), something fails:

04-10 15:48:11.825  1154  1627 I Gecko   : Preview paused
04-10 15:48:11.825  1154  1627 I Gecko   : virtual nsresult mozilla::nsGonkCameraControl::SetConfigurationImpl(const mozilla::ICameraControl::Configuration&):226
04-10 15:48:11.825  1154  1627 I Gecko   : nsresult mozilla::nsGonkCameraControl::SetConfigurationInternal(const mozilla::ICameraControl::Configuration&):183
04-10 15:48:11.825  1154  1627 I Gecko   : nsresult mozilla::nsGonkCameraControl::SetPictureConfiguration(const mozilla::ICameraControl::Configuration&):241
04-10 15:48:11.825  1154  1627 I Gecko   : nsresult mozilla::nsGonkCameraControl::PushParameters():298
04-10 15:48:11.825  1154  1627 I Gecko   : Pushing camera parameters
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::initBatchUpdate(void*):Initializing batch parameter set
04-10 15:48:11.825   201  1637 D QCameraParameters: Param m_bNoDisplayMode = 0
04-10 15:48:11.825   201  1637 E QCameraParameters: Invalid flash value: undefined
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::AddSetParmEntryToBatch(void*, cam_intf_parm_type_t, uint32_t, void*): num_entry: 1, paramType: 10, paramLength: 4, aligned_size_req: 20
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::setSceneMode(const qcamera::QCameraParameters&): scene mode changed between HDR and non-HDR, need restart
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::AddSetParmEntryToBatch(void*, cam_intf_parm_type_t, uint32_t, void*): num_entry: 2, paramType: 43, paramLength: 1, aligned_size_req: 20
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::AddSetParmEntryToBatch(void*, cam_intf_parm_type_t, uint32_t, void*): num_entry: 3, paramType: 8, paramLength: 4, aligned_size_req: 20
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::AddSetParmEntryToBatch(void*, cam_intf_parm_type_t, uint32_t, void*): num_entry: 4, paramType: 28, paramLength: 4, aligned_size_req: 20
04-10 15:48:11.825   201  1637 E QCameraParameters: int32_t qcamera::QCameraParameters::setAEBracket(const qcamera::QCameraParameters&): scene mode is HDR, overwrite AE bracket setting to off
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::setAEBracket(const char*), EXP_BRACKETING_OFF
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::AddSetParmEntryToBatch(void*, cam_intf_parm_type_t, uint32_t, void*): num_entry: 5, paramType: 38, paramLength: 36, aligned_size_req: 52
04-10 15:48:11.825   201  1637 I QCameraParameters: int32_t qcamera::QCameraParameters::setLiveSnapshotSize(const qcamera::QCameraParameters&): live snapshot size 1280 x 720
04-10 15:48:11.825   201  1637 D QCameraParameters: int32_t qcamera::QCameraParameters::AddSetParmEntryToBatch(void*, cam_intf_parm_type_t, uint32_t, void*): num_entry: 6, paramType: 118, paramLength: 4, aligned_size_req: 20
04-10 15:48:11.825  1154  1627 I Gecko   : nsresult mozilla::nsGonkCameraControl::SetConfigurationInternal(const mozilla::ICameraControl::Configuration&):200
04-10 15:48:11.825  1154  1627 I Gecko   : Stopping preview (this=0xb2deda50)
04-10 15:48:11.825  1154  1627 I Gecko   : virtual void android::GonkCameraHardware::StopPreview():333 : this=0xb2d2f200
04-10 15:48:11.825   201   906 I CameraClient: stopPreview: Disable picture related messages
04-10 15:48:11.825   201   906 E QCamera2HWI: [KPI Perf] static void qcamera::QCamera2HardwareInterface::stop_preview(camera_device*): E PROFILE_STOP_PREVIEW
04-10 15:48:11.825   201  1637 D QCameraStateMachine: int32_t qcamera::QCameraStateMachine::procEvtPreviewStoppedState(qcamera::qcamera_sm_evt_enum_t, void*): already in preview stopped state, do nothing
04-10 15:48:11.825   201   906 D QCamera2HWI: [KPI Perf] static void qcamera::QCamera2HardwareInterface::stop_preview(camera_device*): X
04-10 15:48:11.825  1154  1627 I Gecko   : Preview stopped, clearing current frame
04-10 15:48:11.825  1154  1627 I Gecko   : Camera control API failed at 6 with 0x80004005
04-10 15:48:11.825  1154  1627 I Gecko   : Pushing camera parameters
04-10 15:48:11.825  1154  1154 I Gecko   : DOM OnError context=6, error='FAILURE'
Mike: was the removal of 1.4+ flag intentional in comment 5?
Flags: needinfo?(mhabicher)
(In reply to Wayne Chang [:wchang] from comment #7)
>
> Mike: was the removal of 1.4+ flag intentional in comment 5?

Nope. Bugzilla broken. Re-nomed.
blocking-b2g: --- → 1.4?
Flags: needinfo?(mhabicher)
blocking-b2g: 1.4? → 1.4+
I'll take this one too while I'm investigating.
Assignee: nobody → mhabicher
QA Contact: mhabicher
It's reproduced in our device also and we checked this issue.
It seems the reason is 'undefined' value of flash mode.

Our BSP engineer said,
the camera BSP routine is different between video mode and picture mode when change to the front camera.

In picture mode, camera app set the flash mode with 'undefined' when change to the front camera.
At this time, camera driver try to set the flash mode 'undefined' and display the black screen because it's invalid value in camera driver.

In video mode, change the stored flash value, 'off', in HAL before set the flash mode.
So though app set the flash mode with 'undefined', display the screen perfectly.

If set the flash mode to 'off' or nothing in app side when change to the front camera, it works well.
--------------------------------------------------------------
  var selectedCamera = this.camera.get('selectedCamera');
  var frontCamera = selectedCamera === 'front';
  if (frontCamera) { return; }
  // or if (frontCamera) { this.camera.setFlashMode('off') }

Please check this regarding my comment.
Flags: needinfo?(mhabicher)
Whiteboard: [m+] → [m+] [CR 651554]
Priority: -- → P1
Same issue with my device but it looks like fixed with the patch for Bug 985481.

Can you see if this issue is reproducible with the patch on QRD?

https://bugzilla.mozilla.org/show_bug.cgi?id=985481
Flags: needinfo?(hkoka)
Mike Habicher will test it out on QRD to see if this is still an issue

Thanks
Hema
Flags: needinfo?(hkoka)
Unable to reproduce on:
- gecko qrd:8e91fa5a127e5cbfa92a99896f4501ede717d347
- gaia: master:84f4835833c4cb8ac7e5d9e0c94738b1cb0ef45a

I believe bug 996513 fixed this.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(mhabicher)
Resolution: --- → WORKSFORME
Fixing bug state, marking it a dup per :mikeh
Resolution: WORKSFORME → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: