accelerometer problems

Thanks to some help I got things running fine on Android, in checking the examples have a few problems, I cannot get the 3D model loader to load a model on AVD or real device. I have another strange problem, on a nexus 4 my apps were crashing after a second or 2. After a little bit of playing I realised that the accelerometer crashes them if i put the phone in a table and run they are fine, as soon as I move it the app freezes for good.

Does anyone know what this might be or as a workaround how I could disable the accelerometer functions?

Cheers

Fred

does the accelerometer example works?

Yes it works fine, I should have tried. Here is the output when I move the phone

  
02-28 23:57:43.940: I/OF(17361): Grabber default format: 17  
02-28 23:57:43.940: I/OF(17361): Grabber default preview size: 640,480  
02-28 23:57:43.981: I/OF(17361): camera settings: 320x240  
02-28 23:57:43.991: I/OF(17361): ofVideoGrabber: Camera initialized correctly  
02-28 23:57:43.991: I/OF(17361): setting camera callback with buffer  
02-28 23:57:43.991: E/QCameraHWI(162): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*): mPreviewWindow = 0x0x40c4d7a0, mStreamDisplay = 0x0x40e0cfb0  
02-28 23:57:43.991: D/QCameraHWI(162): android::status_t android::QCameraHardwareInterface::startPreview():  start preview now  
02-28 23:57:43.991: I/QCameraHWI(162): android::status_t android::QCameraHardwareInterface::startPreview2():Setting ZSL mode  
02-28 23:57:43.991: E/mm-camera(186): config_proc_CAMERA_SET_INFORM_STARTPREVIEW  
02-28 23:57:43.991: E/mm-camera(186): config_update_stream_info Storing stream parameters for video inst 1 as : width = 320, height 240, format = 1 inst_handle = 810081 cid = 0  
02-28 23:57:44.001: I/OF(17361): resize 768,1038  
02-28 23:57:44.011: E/mm-camera(186): config_update_stream_info Storing stream parameters for video inst 3 as : width = 640, height 480, format = 1 inst_handle = 830083 cid = 0  
02-28 23:57:44.011: E/mm-camera(186): config_update_stream_info Storing stream parameters for video inst 4 as : width = 512, height 384, format = 1 inst_handle = 840084 cid = 0  
02-28 23:57:44.021: E/mm-camera(186): config_decide_vfe_outputs: Ports Used 3, Op mode 1  
02-28 23:57:44.021: E/mm-camera(186): config_decide_vfe_outputs Current mode 0 Full size streaming : Disabled  
02-28 23:57:44.021: E/mm-camera(186): config_decide_vfe_outputs: Primary: 640x480, extra_pad: 0x0, Fmt: 1, Type: 3, Path: 4  
02-28 23:57:44.021: E/mm-camera(186): config_decide_vfe_outputs: Secondary: 320x240, extra_pad: 0x0, Fmt: 1, Type: 1, Path: 1  
02-28 23:57:44.021: E/mm-camera(186): config_update_inst_handles Updated the inst handles as 830083, 810081, 0, 0   
02-28 23:57:44.061: I/OF(17361): resize 1196,638  
02-28 23:57:44.161: E/mm-camera(186): sensor_load_chromatix: libchromatix_imx111_zsl.so: 26  
02-28 23:57:44.211: D/overlay(159): Set pipe=RGB1 dpy=0; Set pipe=VG0 dpy=0; Set pipe=VG1 dpy=0;   
02-28 23:57:44.251: E/mm-camera(186): camif_client_set_params: camif has associated with obj mask 0x1  
02-28 23:57:44.251: E/mm-camera(186): config_v2_CAMERA_START_common CAMIF_PARAMS_ADD_OBJ_ID failed -1   
02-28 23:57:44.251: E/mm-camera(186): vfe_operation_config: format 3  
02-28 23:57:44.251: E/mm-camera(186): vfe_operation_config:vfe_op_mode=5  
02-28 23:57:44.251: E/mm-camera(186): Invalid ASD Set Params Type  
02-28 23:57:44.251: E/mm-camera(186): vfe_set_bestshot: Bestshot mode not changed  
02-28 23:57:44.321: E/mm-libcamera2(162): PROFILE HAL: First preview frame received: 1362056264.324642418  
02-28 23:57:44.321: E/BufferQueue(17361): [unnamed-17361-0] dequeueBuffer: min undequeued buffer count (2) exceeded (dequeued=6 undequeudCount=0)  
02-28 23:57:44.361: E/BufferQueue(17361): [unnamed-17361-0] dequeueBuffer: min undequeued buffer count (2) exceeded (dequeued=5 undequeudCount=1)  
02-28 23:57:45.873: D/dalvikvm(519): GC_EXPLICIT freed 819K, 28% free 22100K/30668K, paused 5ms+9ms, total 127ms  
02-28 23:57:48.295: W/ProcessStats(519): Skipping unknown process pid 17420  
02-28 23:57:48.295: W/ProcessStats(519): Skipping unknown process pid 17422  
02-28 23:57:48.295: W/ProcessStats(519): Skipping unknown process pid 17423  
02-28 23:57:48.305: W/ProcessStats(519): Skipping unknown process pid 17425  
02-28 23:57:56.564: D/dalvikvm(17361): GC_CONCURRENT freed 282K, 4% free 9164K/9484K, paused 3ms+4ms, total 19ms  
02-28 23:57:56.564: E/BufferQueue(17361): [unnamed-17361-0] queueBuffer: SurfaceTexture has been abandoned!  
02-28 23:57:56.564: E/SurfaceTextureClient(162): queueBuffer: error queuing buffer to SurfaceTexture, -19  
02-28 23:57:56.564: E/QCameraHWI_Preview(162): android::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*): enqueue_buffer failed, err = -19  
02-28 23:57:56.564: E/BufferQueue(17361): [unnamed-17361-0] dequeueBuffer: SurfaceTexture has been abandoned!  
02-28 23:57:56.624: E/BufferQueue(17361): [unnamed-17361-0] queueBuffer: SurfaceTexture has been abandoned!  
02-28 23:57:56.624: E/SurfaceTextureClient(162): queueBuffer: error queuing buffer to SurfaceTexture, -19  
02-28 23:57:56.624: E/QCameraHWI_Preview(162): android::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*): enqueue_buffer failed, err = -19  
02-28 23:57:56.624: E/BufferQueue(17361): [unnamed-17361-0] dequeueBuffer: SurfaceTexture has been abandoned!  
02-28 23:57:56.684: E/BufferQueue(17361): [unnamed-17361-0] queueBuffer: SurfaceTexture has been abandoned!  
02-28 23:57:56.684: E/SurfaceTextureClient(162): queueBuffer: error queuing buffer to SurfaceTexture, -19  
02-28 23:57:56.684: E/QCameraHWI_Preview(162): android::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*): enqueue_buffer failed, err = -19  
02-28 23:57:56.684: E/BufferQueue(17361): [unnamed-17361-0] dequeueBuffer: SurfaceTexture has been abandoned!  
02-28 23:57:57.205: D/dalvikvm(17361): GC_CONCURRENT freed 459K, 6% free 9152K/9644K, paused 5ms+2ms, total 44ms  
02-28 23:58:44.465: D/dalvikvm(27507): GC_CONCURRENT freed 1446K, 11% free 13232K/14772K, paused 3ms+4ms, total 88ms  
02-28 23:58:49.841: D/dalvikvm(13027): GC_CONCURRENT freed 516K, 8% free 9410K/10228K, paused 3ms+3ms, total 42ms  
02-28 23:58:49.841: D/dalvikvm(13027): WAIT_FOR_CONCURRENT_GC blocked 29ms  
02-28 23:59:02.324: W/InvService(4484): Dropping C2DM message for unknown or unstarted client: chromesync#1287969916  
02-28 23:59:02.324: W/p(4484): [chromesync#1287969916] Not running on internal thread since resources not started 0, com.google.ipc.invalidation.ticl.G@426af488  
02-28 23:59:12.595: W/InvService(4484): Dropping C2DM message for unknown or unstarted client: chromesync#1287969916  
02-28 23:59:12.625: W/p(4484): [chromesync#1287969916] Not running on internal thread since resources not started 0, com.google.ipc.invalidation.ticl.G@4287bdb0  
02-28 23:59:44.139: I/PowerManagerService(519): Going to sleep due to screen timeout...  
02-28 23:59:44.349: D/overlay(159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0;   
02-28 23:59:44.819: D/SurfaceFlinger(159): Screen released, type=0 flinger=0x41275318  
02-28 23:59:44.819: D/hwcomposer(159): hwc_blank: Doing Dpy=0, blank=1  
02-28 23:59:44.839: D/overlay(159): Unset pipe=RGB0 dpy=0;   
02-28 23:59:44.880: E/qcom_sensors_hal(519): hal_process_report_ind: Bad item quality: 11   
02-28 23:59:45.000: D/hwcomposer(159): hwc_blank: Done Dpy=0, blank=1  
02-28 23:59:45.000: D/Surface(519): Excessive delay in blankDisplay() while turning screen off: 186ms  
02-28 23:59:45.070: I/OF(17361): onPause  
02-28 23:59:45.170: I/OF(17361): stopping camera  
02-28 23:59:45.170: E/mm-libcamera2(162): PROFILE HAL: stopPreview(): E: 1362056385.173597081  
02-28 23:59:45.170: E/mm-camera(186): config_MSG_ID_STOP_ACK: streamon_mask is not clear. Should not call PP_Release_HW  
02-28 23:59:45.170: W/BufferQueue(17361): [unnamed-17361-0] cancelBuffer: BufferQueue has been abandoned!  
02-28 23:59:45.180: W/BufferQueue(17361): [unnamed-17361-0] cancelBuffer: BufferQueue has been abandoned!  
02-28 23:59:45.180: W/BufferQueue(17361): [unnamed-17361-0] cancelBuffer: BufferQueue has been abandoned!  
02-28 23:59:45.180: W/BufferQueue(17361): [unnamed-17361-0] cancelBuffer: BufferQueue has been abandoned!  
02-28 23:59:45.180: W/BufferQueue(17361): [unnamed-17361-0] cancelBuffer: BufferQueue has been abandoned!  
02-28 23:59:45.180: E/mm-libcamera2(162): PROFILE HAL: stopPreview(): E: 1362056385.184584415  
02-28 23:59:45.180: E/QCameraHWI(162): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*):Received Setting NULL preview window  
02-28 23:59:45.180: E/QCameraHWI(162): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*): mPreviewWindow = 0x0x0, mStreamDisplay = 0x0x40e0cfb0  
02-28 23:59:45.180: W/QCameraHWI_Preview(162):  Setting NULL preview window   
02-28 23:59:45.180: I/CameraClient(162): Destroying camera 0  
02-28 23:59:45.180: E/mm-camera(186): config_shutdown_pp Camera not in streaming mode. Returning.   
02-28 23:59:45.180: E/mm-camera(186): vfe_ops_deinit: E  
02-28 23:59:45.250: W/AudioFlinger(162): session id 115 not found for pid 162  
02-28 23:59:45.250: W/AudioFlinger(162): session id 116 not found for pid 162  
  

Cheers

all i can see there is some problem with the camera, can you see the output from the camera in the cameraExample? also it seems like the screen was turning off or your application was somehow stopped from some external event like pressing the back or home button. i don’t see anything related with the accelerometer or any crash in that trace

I can see the output fine as long as the phone is flat on its back, if I move it about 15º in any direction, (I am sure no butons are pressed) the app freezes. I can shake the phone around a lot but I have to keep it flat. I also made sure I did not touch the screen while I rotated it either. So far all apps without cameras work fine, although I dont get some working only due to the fact I cannot load files from the data folder.

The phone has no SD card, only internal memory- I read that this means I cannot add any external files? Could this also have some effect.

Just to add it is running 4.2.2 kernel 3.4.0 Build JDQ39

are you in 0.7.4? the activity was being restarted on previous versions

Got the same problem, somehow the garbage collection get abnormal with phone is not flat.

It’s keep get msg from logcat like this:

01-02 06:05:01.734: D/dalvikvm(16689): GC_CONCURRENT freed 383K, 14% free 3203K/3708K, paused 2ms+1ms, total 20ms

also got error as follow:

camera 5001 error.

Seems it is an popular problem .