Dont know if anyone has come across this issue but I am creating an app for mobile devices and it runs fine on my galaxy s2 running ics 4.0.4 however when I run it on the galaxy tab running 2.3.3 it keeps throwing errors.
All that I am doing is getting the device camera and attaching it to a flash.media.Video. I have the suspicion that the amount of errors caused by this issues is severly affecting the perfomance.
I have attached an fxp file ( https://www.box.com/s/77a9460edcf8a7ce95ee ) so that you can see that I am not doing anything out of the ordinary.
THanks for your help!
P.S.
Here is a sample segment of the logcat-
D/TvOut-Engine( 79): (isHdmiCableConnected): mHdmiCableConnected 0
D/CameraHardwareSec( 75): MemoryHeapBase(fd(26), size(5760128), width(800), height(600))
W/AudioFlinger( 75): RecordThread: buffer overflow
D/dalvikvm(12597): GC_FOR_MALLOC freed 1206K, 48% free 4217K/8007K, external 4034K/4493K, paused 91ms
V/AudioHardwareALSA( 75): resampler read error -32
D/AudioHardwareALSA( 75): AudioStreamInALSA::read error -32
D/AudioHardwareALSA( 75): AudioStreamInALSA::snd_pcm_recover error 0
E/v4l2_utils( 75): Error = Invalid argument from qbuf
E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail
I/dalvikvm-heap(12597): Grow heap (frag case) to 16.060MB for 5760016-byte allocation
D/dalvikvm(12597): GC_FOR_MALLOC freed 203K, 30% free 9638K/13639K, external 3975K/4493K, paused 26ms
E/v4l2_utils( 75): Error = Invalid argument from qbuf
E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail
D/dalvikvm(12597): GC_CONCURRENT freed 91K, 31% free 9547K/13639K, external 3975K/4493K, paused 2ms+13ms
D/dalvikvm(12597): GC_FOR_MALLOC freed 76K, 31% free 9471K/13639K, external 3975K/4493K, paused 43ms
E/v4l2_utils( 75): Error = Invalid argument from qbuf
E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail
I/dalvikvm-heap(12597): Grow heap (frag case) to 21.133MB for 5760016-byte allocation
E/v4l2_utils( 75): Error = Invalid argument from qbuf
E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail
Related
I have a bar-code scanning Cordova (webview) app, and after a certain point, if I restart the barcode-scanning camera, I get a crazy crash that bricks my phone until I give the entire phone a full restart:
Stats:
Nexus 5
Android 4.4.4
Kernel 3.4.0-gd59db4e
I'm using the zbar scanning lib, which uses OpenCV.
Here's the catlog right around the time that things go haywire; once I start getting "Failed to get_buf", the repeating image effect kicks in and I have to restart my phone.
D/mm-camera(199): module_faceproc_port_event_func:667] FD_STREAMON for stream 10004
I/mm-camera(199): cpp_module_handle_streamon_event:1983, identity=0x10004, stream-on done
I/mm-camera(199): isp_streamon: E, session_id = 1, stream_id = 4, stream_type = 5
I/mm-camera(199): wb_set_params: param_id is not supported in this module
I/mm-camera(199): wb_set_params: param_id is not supported in this module
I/mm-camera(199): wb_set_params: param_id is not supported in this module
D/mm-camera(199): module_faceproc_port_event_func:825] MCT_EVENT_MODULE_ISP_OUTPUT_DIM stream info 1920x1080 identity 10004 10003
I/mm-camera(199): isp_ch_util_streamon: session_id = 1, channel_id = 3, already active.
I/mm-camera(199): ispif_streamon: session_id = 1, active_streams = 3
I/mm-camera(199): mct_pipeline_process_set: Stream on/off returned
D/mm-camera-intf(186): mm_stream_qbuf: Starting poll on stream 0xb7f4c4cc type :5
D/mm-camera-intf(186): mm_stream_qbuf: Started poll on stream 0xb7f4c4cc type :5
D/mm-camera-intf(186): mm_stream_qbuf: Starting poll on stream 0xb7f4bda4 type :1
D/mm-camera-intf(186): mm_stream_qbuf: Started poll on stream 0xb7f4bda4 type :1
D/mm-camera(199): module_faceproc_client_schedule_mode:1808] apply 3 report 2 new_mode 0
E/mm-camera-sensor(199): port_sensor_handle_upstream_module_event:1244 Reset previously set LED state!
I/AEC_PORT(199): aec_port_proc_downstream_event: Received LED state timeout. Reset LED state!
D/mm-camera(199): module_faceproc_client_schedule_mode:1808] apply 0 report 3 new_mode 0
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 1689470 CurPosition: 36
D/mm-camera(199): module_faceproc_client_schedule_mode:1808] apply 1 report 0 new_mode 0
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 634118 CurPosition: 33
D/dalvikvm(3354): GC_FOR_ALLOC freed 3373K, 35% free 17228K/26472K, paused 13ms, total 13ms
I/dalvikvm-heap(3354): Grow heap (frag case) to 19.818MB for 3110416-byte allocation
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 602020 CurPosition: 30
D/dalvikvm(3354): GC_FOR_ALLOC freed 0K, 24% free 20265K/26472K, paused 14ms, total 14ms
D/dalvikvm(3354): GC_FOR_ALLOC freed 3037K, 35% free 17227K/26472K, paused 14ms, total 14ms
I/dalvikvm-heap(3354): Grow heap (frag case) to 19.818MB for 3110416-byte allocation
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 552162 CurPosition: 27
D/dalvikvm(3354): GC_FOR_ALLOC freed 0K, 24% free 20265K/26472K, paused 15ms, total 15ms
E/mm-camera(199): cpp_module_process_frame_control:1458 failed: wrong queue for mct_type = 2 frame 8 exp 16
E/mm-camera(199): cpp_module_process_frame_control:1458 failed: wrong queue for mct_type = 2 frame 8 exp 16
E/mm-camera(199): cpp_module_process_frame_control:1458 failed: wrong queue for mct_type = 2 frame 8 exp 16
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 524040 CurPosition: 31
D/dalvikvm(3354): GC_FOR_ALLOC freed 3037K, 35% free 17227K/26472K, paused 13ms, total 14ms
I/dalvikvm-heap(3354): Grow heap (frag case) to 19.818MB for 3110416-byte allocation
D/dalvikvm(3354): GC_FOR_ALLOC freed 0K, 24% free 20265K/26472K, paused 17ms, total 17ms
E/mm-camera(199): cpp_module_process_frame_control:1458 failed: wrong queue for mct_type = 2 frame 9 exp 17
E/mm-camera(199): cpp_module_process_frame_control:1458 failed: wrong queue for mct_type = 2 frame 9 exp 17
E/mm-camera(199): cpp_module_process_frame_control:1458 failed: wrong queue for mct_type = 2 frame 9 exp 17
D/dalvikvm(3354): GC_FOR_ALLOC freed 3037K, 35% free 17227K/26472K, paused 12ms, total 12ms
I/dalvikvm-heap(3354): Grow heap (frag case) to 19.818MB for 3110416-byte allocation
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 328800 CurPosition: 33
D/dalvikvm(3354): GC_FOR_ALLOC freed 0K, 24% free 20265K/26472K, paused 21ms, total 21ms
D/dalvikvm(3354): GC_FOR_ALLOC freed 3037K, 35% free 17227K/26472K, paused 13ms, total 13ms
I/dalvikvm-heap(3354): Grow heap (frag case) to 19.818MB for 3110416-byte allocation
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 370341 CurPosition: 35
D/dalvikvm(3354): GC_FOR_ALLOC freed 0K, 24% free 20265K/26472K, paused 16ms, total 16ms
D/dalvikvm(3354): GC_FOR_ALLOC freed 3037K, 35% free 17227K/26472K, paused 14ms, total 14ms
I/dalvikvm-heap(3354): Grow heap (frag case) to 19.818MB for 3110416-byte allocation
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 398033 CurPosition: 37
D/dalvikvm(3354): GC_FOR_ALLOC freed 0K, 24% free 20265K/26472K, paused 16ms, total 16ms
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 397856 CurPosition: 39
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 424101 CurPosition: 41
D/mm-camera-intf(186): mm_stream_read_msm_frame: Stoping poll on stream 0xb7f4bda4 type :1
D/mm-camera-intf(186): mm_stream_read_msm_frame: Stopped poll on stream 0xb7f4bda4 type :1
D/mm-camera-intf(186): mm_stream_read_msm_frame: Stoping poll on stream 0xb7f4c4cc type :5
D/mm-camera-intf(186): mm_stream_read_msm_frame: Stopped poll on stream 0xb7f4c4cc type :5
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 440796 CurPosition: 43
I/mm-camera(199): af_util_cur_pos_after_lens_move: After move: FV: 438574 CurPosition: 41
I/mm-camera(199): af_util_update_focus_status: AF Status already updated to output!Return!
I/mm-camera(199): af_util_update_focus_status: AF Status already updated to output!Return!
E/mm-camera(199): mct_stream_metadata_bus_msg:Failed to get_buf
E/mm-camera(199): mct_stream_metadata_bus_msg:1259: NULL ptr
D/mm-camera-intf(186): mm_stream_read_msm_frame: Stoping poll on stream 0xb7f4af54 type :8
D/mm-camera-intf(186): mm_stream_read_msm_frame: Stopped poll on stream 0xb7f4af54 type :8
E/mm-camera(199): mct_stream_metadata_bus_msg:Failed to get_buf
E/mm-camera(199): mct_stream_metadata_bus_msg:1259: NULL ptr
E/mm-camera(199): mct_stream_metadata_bus_msg:Failed to get_buf
E/mm-camera(199): mct_stream_metadata_bus_msg:1259: NULL ptr
E/mm-camera(199): mct_stream_metadata_bus_msg:Failed to get_buf
E/mm-camera(199): mct_stream_metadata_bus_msg:1259: NULL ptr
Any ideas?
The answer posted by my colleague at the following link solved our problem:
https://stackoverflow.com/a/27284543/914123
OK we had the same problem - Nexus 5 only, but with ZBar lib instead of ZXing.
The issue was resolved by switching from a SurfaceView to a TextureView - however this resulted in slower frame rates.
Through testing we found that our issue was caused by leaving the screen, bringing up the keyboard and going back - our solution was setting android:windowSoftInputMode to AdjustPan in the manifest.
I'm getting some non fatal errors on my logcat but no line numbers or anything else that can help me locate the error.
As you can see, I'm getting several, including Cursor finalized without prior close() and Window is full, but no idea how to find them.
09-26 14:20:47.743: W/CursorWindow(2090): Window is full: requested allocation 756 bytes, free space 150 bytes, window size 2097152 bytes
09-26 14:20:48.151: D/dalvikvm(2090): GC_FOR_ALLOC freed 1686K, 3% free 90204K/92076K, paused 108ms, total 112ms
09-26 14:20:48.159: W/CursorWrapperInner(2090): Cursor finalized without prior close()
09-26 14:20:48.163: W/CursorWrapperInner(2090): Cursor finalized without prior close()
09-26 14:20:49.759: D/dalvikvm(2090): GC_FOR_ALLOC freed 910K, 2% free 91343K/92436K, paused 115ms, total 115ms
09-26 14:20:51.127: D/dalvikvm(2090): GC_FOR_ALLOC freed 731K, 1% free 92661K/93576K, paused 70ms, total 70ms
09-26 14:20:52.195: D/dalvikvm(2090): GC_FOR_ALLOC freed 683K, 1% free 94024K/94892K, paused 71ms, total 71ms
09-26 14:20:53.303: D/dalvikvm(2090): GC_FOR_ALLOC freed 713K, 1% free 95360K/96256K, paused 77ms, total 77ms
09-26 14:20:54.403: D/dalvikvm(2090): GC_FOR_ALLOC freed 706K, 1% free 96702K/97592K, paused 84ms, total 84ms
09-26 14:20:54.755: W/CursorWindow(2090): Window is full: requested allocation 756 bytes, free space 645 bytes, window size 2097152 bytes
09-26 14:20:55.559: D/dalvikvm(2090): GC_FOR_ALLOC freed 752K, 1% free 98000K/98936K, paused 76ms, total 76ms
Any tips?
Thanks!
This kind of errors are not exceptions thrown by the program and will therefore not contain a stack-trace. As a general rule of thumb you may find ways to optimize your code by carefully reading the error message and read into the subject concerning the error.
As far as I can see it is a problem with allocation of memory. I don't think you can pinpoint them to a specific position in your execution flow since it will probably occur at different points in execution. You can think about your code to see if you can find some memory optimization possibilities.
If you want to analyze your code thoroughly you may want to use a tool like 'Eclipse MAT'. Read this tutorial to learn how to use the tool
Do a global file search looking for text like ".query(" in your .java files.
That should lead you to places where a Cursor is returned and from there you should be able to determine where they are not being closed.
I am making a SIP client using PortSIP library made based on AndroidSIPSample project. I get the following error:
01-09 02:00:52.730: A/libc(750): Fatal signal 11 (SIGSEGV) at 0x00000c0d (code=1), thread 750 (ovative.innovox)
The error is not coming when I am running AndroidSIPSample project downloaded from PortSIP website.
Following is my logcat output:
01-09 02:00:47.910: D/dalvikvm(750): Trying to load lib /data/app-lib/in.innovative.innovox-2/libportsipcore.so 0x416fc190
01-09 02:00:47.981: D/dalvikvm(750): Added shared lib /data/app-lib/in.innovative.innovox-2/libportsipcore.so 0x416fc190
01-09 02:00:48.400: D/dalvikvm(750): GC_FOR_ALLOC freed 63K, 8% free 2656K/2876K, paused 81ms, total 91ms
01-09 02:00:48.432: I/dalvikvm-heap(750): Grow heap (frag case) to 5.087MB for 2457616-byte allocation
01-09 02:00:48.510: D/dalvikvm(750): GC_FOR_ALLOC freed 2K, 5% free 5053K/5280K, paused 70ms, total 70ms
01-09 02:00:49.530: D/dalvikvm(750): GC_FOR_ALLOC freed 28K, 4% free 5351K/5540K, paused 53ms, total 57ms
01-09 02:00:49.550: I/dalvikvm-heap(750): Grow heap (frag case) to 6.451MB for 1127536-byte allocation
01-09 02:00:49.630: D/dalvikvm(750): GC_FOR_ALLOC freed 1K, 3% free 6450K/6644K, paused 73ms, total 73ms
01-09 02:00:51.990: I/Choreographer(750): Skipped 167 frames! The application may be doing too much work on its main thread.
01-09 02:00:52.010: D/gralloc_goldfish(750): Emulator without GPU emulation detected.
01-09 02:00:52.730: A/libc(750): Fatal signal 11 (SIGSEGV) at 0x00000c0d (code=1), thread 750 (ovative.innovox)
I don't know what is causing it, I even put images in xhdpi drawable folder for xhdpi devices according to this answer. But still getting the error.
Please help me solve this error.
I was getting the error because I was passing wrong argument to a method of the PortSIP library, so because of that the library was throwing error.
I am trying to setup a android virtual device to test syncing with an activesync-server.
I followed these steps:
The problem is that syncing is not working at all, but there are no errors like connection errors ...
IMO the problem is that the virtual device only has a private IP, so the server never can send anything to it?
So I probably need some kind of forwarding, like here:
But I am not sure if that’s correct and I am also not sure which ports should be forwarded.
Here is the logcat, when I want to sync:
W/InputMethodManagerService( 148): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41302038 attribute=null
I/Choreographer( 274): Skipped 41 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 477): GC_CONCURRENT freed 396K, 6% free 8392K/8903K, paused 15ms+7ms, total 527ms
D/dalvikvm( 274): GC_CONCURRENT freed 360K, 11% free 9493K/10567K, paused 29ms+48ms, total 142ms
I/EAS ContactsSyncAdapterService( 477): Contact sync requested for test#example.com
D/dalvikvm( 148): GREF has increased to 601
D/dalvikvm( 477): WAIT_FOR_CONCURRENT_GC blocked 0ms
I/Choreographer( 274): Skipped 33 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 477): GC_EXPLICIT freed 333K, 7% free 8355K/8903K, paused 78ms+32ms, total 1269ms
I/EAS EmailSyncAdapterService( 477): performSync
I/EAS EmailSyncAdapterService( 477): Mail sync requested for test#example.com
D/dalvikvm( 460): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 460): GC_EXPLICIT freed 216K, 5% free 8483K/8839K, paused 145ms+94ms, total 914ms
D/dalvikvm( 148): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 148): GC_EXPLICIT freed 510K, 7% free 11338K/12167K, paused 8ms+35ms, total 323ms
D/dalvikvm( 274): GC_CONCURRENT freed 415K, 11% free 9486K/10567K, paused 25ms+28ms, total 125ms
E/Inbox[test#example.com]( 477): Uncaught exception in EasSyncServicejava.lang.ArrayIndexOutOfBoundsException: length=32; index=32
E/Inbox[test#example.com]( 477): Sync ended due to an exception.
D/dalvikvm( 477): GC_CONCURRENT freed 376K, 6% free 8420K/8903K, paused 5ms+18ms, total 66ms
I don't think this is a problem with your networking setup. It looks like you have an error in your Sync code, that is causing the process to stop:
E/Inboxtest#example.com: Uncaught exception in EasSyncServicejava.lang.ArrayIndexOutOfBoundsException: length=32; index=32
E/Inboxtest#example.com: Sync ended due to an exception.
>
Wrap this code in a try/catch block to understand what is happening better.
I see a lot of this:
06-19 17:29:11.911: DEBUG/dalvikvm(10028): GC_FOR_MALLOC freed 729K, 54% free 3490K/7431K, external 0K/512K, paused 39ms
06-19 17:29:11.941: DEBUG/dalvikvm(10028): GC_FOR_MALLOC freed <1K, 49% free 3855K/7431K, external 0K/512K, paused 29ms
repeatedly in the log. Is there a way to not show the Dalvik debug messages?
Simply set a logcat filter. You can do this graphically in Eclipse as well.