Stopping Camera preview crashes some services and then makes Gecko restart on Nexus S

RESOLVED DUPLICATE of bug 900012

Status

Firefox OS
Gaia::Camera
--
critical
RESOLVED DUPLICATE of bug 900012
5 years ago
5 years ago

People

(Reporter: gerard, Unassigned)

Tracking

({crash, dogfood})

unspecified
ARM
Gonk (Firefox OS)
crash, dogfood

Firefox Tracking Flags

(firefox25 affected, b2g18 unaffected, b2g18-v1.0.0 unaffected, b2g18-v1.0.1 unaffected, b2g-v1.1hd unaffected)

Details

(Whiteboard: [b2g-crash])

(Reporter)

Description

5 years ago
While testing Gecko master on Nexus S, I ran into this issue: starting the Camera application, then switching to another application, Gecko restarts.

After careful investigation, some Gecko child process got a SIGKILL.

logcat shows:
I/CameraHardwareSec( 1301): int android::HAL_camera_device_open(const hw_module_t*, const char*, hw_device_t**): open camera 0
E/SecCamera( 1301): initCamera: m_cam_fd(17), m_jpeg_fd(0)
I/SecCamera( 1301): Name of input channel[0] is S5K4ECGX
E/SecCamera( 1301): initCamera: m_cam_fd2(18)
I/SecCamera( 1301): Name of input channel[0] is S5K4ECGX
I/SecCamera( 1301): initCamera : initialized
I/SecCamera( 1301): Name of input channel[0] is S5K4ECGX
I/CameraHardwareSec( 1301): int android::HAL_camera_device_open(const hw_module_t*, const char*, hw_device_t**): opened camera 0 (0x19373c8)
I/CameraHardwareSec( 1301): int android::CameraHardwareSec::previewThreadWrapper(): starting
I/CameraHardwareSec( 1301): int android::CameraHardwareSec::previewThreadWrapper(): calling mSecCamera->stopPreview() and waiting
W/SecCamera( 1301): int android::SecCamera::stopPreview(): doing nothing because m_flag_camera_start is zero
I/AwesomePlayer( 1301): setDataSource_l('/system/media/audio/ui/camera_click.ogg')
D/CameraHardwareSec( 1301): mPreviewHeap(fd(17), size(460800), width(640), height(480))
I/CameraHardwareSec( 1301): int android::CameraHardwareSec::previewThreadWrapper(): return from wait
I/CameraHardwareSec( 1301): int android::CameraHardwareSec::previewThreadWrapper(): calling mSecCamera->stopPreview() and waiting
I/CameraHardwareSec( 1301): void android::CameraHardwareSec::stopPreviewInternal() : preview not running, doing nothing
I/CameraHardwareSec( 1301): void android::CameraHardwareSec::stopPreviewInternal() : preview not running, doing nothing
I/CameraHardwareSec( 1301): int android::CameraHardwareSec::previewThreadWrapper(): return from wait
I/CameraHardwareSec( 1301): int android::CameraHardwareSec::previewThreadWrapper(): exiting
W/SecCamera( 1301): int android::SecCamera::stopPreview(): doing nothing because m_flag_camera_start is zero
W/SecCamera( 1301): int android::SecCamera::stopRecord(): doing nothing because m_flag_record_start is zero
I/SecCamera( 1301): DeinitCamera: m_cam_fd(17)
I/SecCamera( 1301): DeinitCamera: m_cam_fd2(18)
E/CameraHardwareSec( 1301): preview window is NULL!
I/CameraService( 1301): Destroying camera 0
I/CameraHardwareSec( 1301): int android::HAL_camera_device_close(hw_device_t*)
I/SecCamera( 1301): DeinitCamera : already deinitialized
I/ServiceManager(   73): service 'media.camera' died


According to those messages, it seems that we are passing some NULL pointer at some time :(
(Reporter)

Comment 1

5 years ago
I can't reproduce after reverting 8592c4c12d6d5a87c5e14e0268ca5e78af2291e0 which is bug 858914.

Nicolas, do you have any idea why this would happen ?
Flags: needinfo?(nical.bugzilla)
(Reporter)

Updated

5 years ago
status-b2g18: --- → unaffected
status-b2g18-v1.0.0: --- → unaffected
status-b2g18-v1.0.1: --- → unaffected
status-b2g-v1.1hd: --- → unaffected
status-firefox25: --- → affected

Updated

5 years ago
Severity: major → critical
Keywords: crash
Whiteboard: [b2g-crash]
(Reporter)

Updated

5 years ago
Blocks: 901322
Just checking, have you tested before or after this landed https://hg.mozilla.org/mozilla-central/rev/0c2f8e48c612 ?
It fixes a somewhat similar issue.
I'll try to reporduce it Monday on my unagi.
Flags: needinfo?(nical.bugzilla)
(Reporter)

Comment 3

5 years ago
(In reply to Nicolas Silva [:nical] from comment #2)
> Just checking, have you tested before or after this landed
> https://hg.mozilla.org/mozilla-central/rev/0c2f8e48c612 ?
> It fixes a somewhat similar issue.
> I'll try to reporduce it Monday on my unagi.

Looks like I got the code just prior this fix, I'll git it a try with it then :)
(Reporter)

Comment 4

5 years ago
After updating and ensuring that the pointed patch was in my tree, I can't reproduce.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 900012
You need to log in before you can comment on or make changes to this bug.