evopark / tiqr-android

UNMAINTAINED: QR code scanner for Titanium (Android version)
Other
3 stars 1 forks source link

Crash turning phone #1

Open m1ga opened 9 years ago

m1ga commented 9 years ago

I have my app in landscape mode and when I open the camera view and scan a code it will crash when the camera turns into portrait mode:

10-04 14:27:38.175: D/CameraPreviewManager(3537): Surface changed: 768x1184px
10-04 14:27:38.177: D/CameraPreviewManager(3537): Stopping preview to adapt to preview surface size
10-04 14:27:38.178: E/mm-libcamera2(189): PROFILE HAL: stopPreview(): E: 1443961658.178210888
10-04 14:27:38.178: E/mm-camera(206): config_MSG_ID_STOP_ACK: streamon_mask is not clear. Should not call PP_Release_HW
10-04 14:27:38.182: D/CameraPreviewManager(3537): Using preview size 720x480px
10-04 14:27:38.186: E/QCameraHWI_Parm(189): Invalid preview size requested: 480x720
10-04 14:27:38.192: D/AndroidRuntime(3537): Shutting down VM
10-04 14:27:38.192: D/AndroidRuntime(3537): --------- beginning of crash
10-04 14:27:38.201: E/AndroidRuntime(3537): FATAL EXCEPTION: main
10-04 14:27:38.201: E/AndroidRuntime(3537): Process: com.app, PID: 3537
10-04 14:27:38.201: E/AndroidRuntime(3537): java.lang.RuntimeException: setParameters failed
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.hardware.Camera.native_setParameters(Native Method)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.hardware.Camera.setParameters(Camera.java:1876)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at de.evopark.tiqr.android.util.CameraPreviewManager.surfaceChanged(CameraPreviewManager.java:119)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.SurfaceView.updateWindow(SurfaceView.java:591)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.SurfaceView.setFrame(SurfaceView.java:300)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15667)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:575)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:575)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.View.layout(View.java:15671)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2086)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1843)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.Choreographer.doCallbacks(Choreographer.java:580)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.Choreographer.doFrame(Choreographer.java:550)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.os.Handler.handleCallback(Handler.java:739)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.os.Handler.dispatchMessage(Handler.java:95)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.os.Looper.loop(Looper.java:135)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at android.app.ActivityThread.main(ActivityThread.java:5254)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at java.lang.reflect.Method.invoke(Native Method)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at java.lang.reflect.Method.invoke(Method.java:372)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-04 14:27:38.201: E/AndroidRuntime(3537):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
10-04 14:27:38.212: W/ActivityManager(589):   Force finishing activity 1 com.app/org.appcelerator.titanium.TiActivity
10-04 14:27:38.218: I/WindowManager(589): Screen frozen for +565ms due to Window{132d6c3 u0 com.app/org.appcelerator.titanium.TiActivity}

Ti 5.0.2.GA Android 5.0.1

milgner commented 9 years ago

That's interesting. The app it was developed for never changes orientation so it's quite likely I forgot to implement that. I'm not sure whether I'll find the time next week but I'll try to investigate soonish.