Project

General

Profile

Actions

Issue #16

closed

Camera app crashs when opened

Added by Graziano - about 13 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Framework
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
wontfix
Device:
HTC Dream
Grant:
Type of work:

Description

Fresh installation of Replicant 2.2 preview image.

Try opening the camera app. It will crash with the usual message about process terminated.

Actions #1

Updated by Paul Kocialkowski almost 13 years ago

It does the same with htc dream.

Here is a log of the crash:

D/CameraHardwareStub( 122): initHeapLocked: preview size=320x240
D/Camera ( 383): app passed NULL surface
D/CameraSettings( 383): [exposure-compensation=0, jpeg-quality=90, picture-format=jpeg, picture-size-values=320x240, picture-size=320x240, preview-format=yuv422sp, preview-frame-rate=15, preview-size-values=320x240, preview-size=320x240]
D/CameraHardwareStub( 122): initHeapLocked: preview size=320x240
V/camera ( 383): startPreview
D/Sensors ( 153): sensors=00000001, real=00000001
I/ActivityManager( 153): Displayed activity com.android.camera/.Camera: 1243 ms (total 1243 ms)
W/IInputConnectionWrapper( 226): showStatusIcon on inactive InputConnection
I/ARMAssembler( 153): generated scanline+00000077:03010104_00000009_00000000 [ 28 ipp] (47 ins) at [0x33b3a0:0x33b45c] in 2655029 ns
D/dalvikvm( 153): GC_EXPLICIT freed 8740 objects / 483056 bytes in 430ms
D/dalvikvm( 383): GC_EXTERNAL_ALLOC freed 2041 objects / 126448 bytes in 210ms
D/BaseCamera( 383): updateTouchFocus x=201 y=150
D/CameraHardwareStub( 122): initHeapLocked: preview size=320x240
D/camera ( 383): Focus state: 0
D/AndroidRuntime( 383): Shutting down VM
W/dalvikvm( 383): threadid=1: thread exiting with uncaught exception (group=0x400207e8)
E/AndroidRuntime( 383): FATAL EXCEPTION: main
E/AndroidRuntime( 383): java.lang.NullPointerException
E/AndroidRuntime( 383): at com.android.camera.CameraSettings.initPreference(CameraSettings.java:262)
E/AndroidRuntime( 383): at com.android.camera.CameraSettings.getPreferenceGroup(CameraSettings.java:112)
E/AndroidRuntime( 383): at com.android.camera.Camera.initializeHeadUpDisplay(Camera.java:960)
E/AndroidRuntime( 383): at com.android.camera.Camera.changeHeadUpDisplayState(Camera.java:923)
E/AndroidRuntime( 383): at com.android.camera.Camera.initializeFirstTime(Camera.java:378)
E/AndroidRuntime( 383): at com.android.camera.Camera.access$1200(Camera.java:92)
E/AndroidRuntime( 383): at com.android.camera.Camera$MainHandler.handleMessage(Camera.java:261)
E/AndroidRuntime( 383): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 383): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 383): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 383): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 383): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 383): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 383): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 383): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 153): Force finishing activity com.android.camera/.Camera

So the java.lang.NullPointerException seems to come from:
D/Camera ( 383): app passed NULL surface
which seems to come from the lack of the camera libs.

Actions #2

Updated by Paul Kocialkowski almost 13 years ago

With the non-free camera libs, it fails but for another reason:
E/AndroidRuntime( 407): FATAL EXCEPTION: GLThread 11
E/AndroidRuntime( 407): java.lang.IllegalArgumentException: No configs match configSpec
E/AndroidRuntime( 407): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:760)
E/AndroidRuntime( 407): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916)
E/AndroidRuntime( 407): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1246)
E/AndroidRuntime( 407): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
W/ActivityManager( 155): Force finishing activity com.android.camera/.Camera
D/dalvikvm( 155): GC_EXPLICIT freed 9786 objects / 498400 bytes in 211ms

The way to fix that is to set on res/values/config.xml of the Camera app:
<bool name="softwareGLOnly">true</bool>

(note that the fix should not be applied in packages/apps/Camera but in vendor/cyanogen/overlay/dream_sapphire/packages/apps/Camera and vendor/cyanogen/overlay/passion/packages/apps/Camera

Actions #3

Updated by Paul Kocialkowski over 11 years ago

  • Category changed from 51 to 33
Actions #4

Updated by Paul Wise over 11 years ago

I am getting this on the Galaxy S Replicant 2.3 00003 images too. I think this is a general problem with the app when there is no camera support available.

Actions #5

Updated by Paul Kocialkowski over 11 years ago

  • Status changed from New to In Progress
  • Assignee set to Paul Kocialkowski

Well, that seems to be a pretty standard behaviour when there is no camera available. What we could do to improve the situation is to set the BOARD variable that says the device has no camera when we have no support for it, so that it does just like in the emulator.

I'll keep the ticket open as a reminder to do that on the concerned devices (Nexus One and HTC Dream).
Galaxy S will have Camera working in ICS and probably in GB as well as the Nexus S over the next releases.

Actions #6

Updated by Denis 'GNUtoo' Carikli over 9 years ago

  • Status changed from In Progress to Closed
  • Resolution set to wontfix

Replicant 2.2 is not developed anymore.

If someone wants to fix it the bug can be reopened.

Denis

Actions #7

Updated by Denis 'GNUtoo' Carikli over 8 years ago

  • Category changed from 33 to Framework
  • Device HTC Dream added
Actions

Also available in: Atom PDF