Code:
path = "httplive://<host>/moviets/index.m3u8";
// Create a new media player and set the listeners
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(path);
mMediaPlayer.setOnErrorListener(this);
mMediaPlayer.setDisplay(holder);
mMediaPlayer.prepare(); // Crashes here. prepareAsync() does not help either
mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this);
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnVideoSizeChangedListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.start();
Stack trace:
ERROR/MediaPlayer(1349): error (100, 0)
ERROR/MediaPlayerDemo(1349): error: Prepare failed.: status=0x64
ERROR/MediaPlayerDemo(1349): java.io.IOException: Prepare failed.: status=0x64
ERROR/MediaPlayerDemo(1349): at android.media.MediaPlayer.prepare(Native Method)
ERROR/MediaPlayerDemo(1349): at com.example.Example.VideoPlayerActivity.playVideo(VideoPlayerActivity.java:81)
ERROR/MediaPlayerDemo(1349): at com.example.Example.VideoPlayerActivity.surfaceCreated(VideoPlayerActivity.java:138)
ERROR/MediaPlayerDemo(1349): at android.view.SurfaceView.updateWindow(SurfaceView.java:565)
ERROR/MediaPlayerDemo(1349): at android.view.SurfaceView.access$000(SurfaceView.java:84)
ERROR/MediaPlayerDemo(1349): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:173)
ERROR/MediaPlayerDemo(1349): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:590)
ERROR/MediaPlayerDemo(1349): at android.view.ViewRoot.performTraversals(ViewRoot.java:1325)
ERROR/MediaPlayerDemo(1349): at android.view.ViewRoot.handleMessage(ViewRoot.java:1944)
ERROR/MediaPlayerDemo(1349): at android.os.Handler.dispatchMessage(Handler.java:99)
ERROR/MediaPlayerDemo(1349): at android.os.Looper.loop(Looper.java:126)
ERROR/MediaPlayerDemo(1349): at android.app.ActivityThread.main(ActivityThread.java:3997)
ERROR/MediaPlayerDemo(1349): at java.lang.reflect.Method.invokeNative(Native Method)
ERROR/MediaPlayerDemo(1349): at java.lang.reflect.Method.invoke(Method.java:491)
ERROR/MediaPlayerDemo(1349): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
ERROR/MediaPlayerDemo(1349): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
ERROR/MediaPlayerDemo(1349): at dalvik.system.NativeStart.main(Native Method)
DEBUG/MediaPlayerDemo(1349): surfaceChanged called
Logcat:
DEBUG/MediaPlayerDemo(1349): surfaceCreated called
INFO/System.out(1349): the path is httplive://192.168.0.196/moviets/index.m3u8
INFO/StagefrightPlayer(1312): setDataSource('httplive://192.168.0.196/moviets/index.m3u8')
INFO/LiveSession(1312): onConnect 'http://192.168.0.196/moviets/index.m3u8'
INFO/NuHTTPDataSource(1312): connect to 192.168.0.196:80/moviets/index.m3u8 #0
INFO/NuHTTPDataSource(1312): connect to 192.168.0.196:80/moviets/index.m3u8 #0
INFO/NuHTTPDataSource(1312): connect to 192.168.0.196:80/moviets/file5.ts #0
INFO/avc_utils(1312): found AVC codec config (320 x 240, Baseline-profile level 3.0)
INFO/ESQueue(1312): found something resembling an AAC syncword at offset 1017
INFO/NuHTTPDataSource(1312): connect to 192.168.0.196:80/moviets/file6.ts #0
INFO/ESQueue(1312): found AAC codec config (48000 Hz, 7 channels)
INFO/ESQueue(1312): [ 06-26 17:37:17.397 1312:0x550 F/ESQueue ]
INFO/ESQueue(1312): frameworks/base/media/libstagefright/mpeg2ts/ESQueue.cpp:255 Should not be here.
INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic:3.0/HONEYCOMB/104254:eng/test-keys'
INFO/DEBUG(31): pid: 1312, tid: 1360 >>> /system/bin/mediaserver <<<
INFO/DEBUG(31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
INFO/DEBUG(31): r0 deadbaad r1 0000000c r2 00000027 r3 00000000
INFO/DEBUG(31): r4 00000080 r5 aff46658 r6 00000007 r7 00000000
INFO/DEBUG(31): r8 a2b72589 r9 00012a6c 10 00100000 fp 00000001
INFO/DEBUG(31): ip ffffffff sp 4060f488 lr aff193e9 pc aff15f58 cpsr 00000030
INFO/NuHTTPDataSource(1312): connect to 192.168.0.196:80/moviets/file7.ts #0
INFO/DEBUG(31): #00 pc 00015f58 /system/lib/libc.so
INFO/DEBUG(31): #01 pc 00001466 /system/lib/liblog.so (__android_log_assert)
INFO/DEBUG(31): libc base address: aff00000
What stumps me is the line "found AAC codec config", while the video file contains mp3 encoding. Is that normal or my Android client is wrongly detecting mp3 as aac? FYI, other videos with aac encoding are playing okay on the client
Any clue?
This seems like a bug in Honeycomb emulator where Android wrongly detects mp3 stream as aac. FFmpeg, on the other hand, detects the mp3 stream correctly, as below
ffmpeg -i file6.ts
Stream #0.1[0x101]: Audio: mp3, 48000 Hz, 2 channels, s16, 192 kb/s
Unfortunately, Android thinks it is AAC
INFO/avc_utils(1312): found AVC codec config (320 x 240, Baseline-profile level 3.0)
INFO/ESQueue(1312): found something resembling an AAC syncword at offset 1017
INFO/NuHTTPDataSource(1312): connect to <ip>:<port>/moviets/file6.ts #0
INFO/ESQueue(1312): found AAC codec config (48000 Hz, 7 channels)
INFO/ESQueue(1312): [ 06-26 17:37:17.397 1312:0x550 F/ESQueue ]
INFO/ESQueue(1312): frameworks/base/media/libstagefright/mpeg2ts/ESQueue.cpp:255 \
Should not be here.
The workaround is to use AAC encoding. If you are using ffmpeg, use the -acodec libfaac option. This works for our project because we have the liberty of choosing the source video formats. This might not necessarily be your case though.
Related
I'm building an Android App with Unity 2018.1.0f2 and get some kind of segmentation fault while running it. The exact error is the following:
05-16 20:54:11.834: E/SamsungIME(9413): <AbstractKeyboardView> - onDraw() called
05-16 20:54:12.142: E/ViewRootImpl(17850): sendUserActionEvent() mView == null
05-16 20:54:12.146: E/SKBD KeyboardInfoUtils(9413): getInstance start
05-16 20:54:12.146: E/SKBD KeyboardInfoUtils(9413): sendSIPInformation state:6 isAbstractKeyboardView : true
05-16 20:54:12.151: E/SKBD KeyboardInfoUtils(9413): sending null keyboardInfo as SIP is closed
05-16 20:54:15.401: A/libc(17850): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17865 (UnityMain)
05-16 20:54:15.401: A/libc(17850): [ 05-16 20:54:15.407 3096: 3096 W/ ]
05-16 20:54:15.401: A/libc(17850): debuggerd: handling request: pid=17850 uid=10350 gid=10350 tid=17865
05-16 20:54:15.633: A/DEBUG(17987): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-16 20:54:15.634: A/DEBUG(17987): Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS2DRDI:user/release-keys'
05-16 20:54:15.635: A/DEBUG(17987): Revision: '8'
05-16 20:54:15.635: A/DEBUG(17987): ABI: 'arm'
05-16 20:54:15.635: A/DEBUG(17987): pid: 17850, tid: 17865, name: UnityMain >>> de.zoomapp.zoom <<<
05-16 20:54:15.635: A/DEBUG(17987): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-16 20:54:15.636: A/DEBUG(17987): r0 00000000 r1 c7ad20b0 r2 cf9ffc24 r3 efc62308
05-16 20:54:15.637: A/DEBUG(17987): r4 c7ad20b0 r5 c7ad20cc r6 ffffffff r7 00000000
05-16 20:54:15.637: A/DEBUG(17987): r8 00000000 r9 ee67ecb4 sl ee67ebc8 fp ee67e5e8
05-16 20:54:15.637: A/DEBUG(17987): ip c7ad20b0 sp ee67e5c8 lr cf9ffc3c pc f2386338 cpsr a00e0030
05-16 20:54:15.651: A/DEBUG(17987): backtrace:
05-16 20:54:15.652: A/DEBUG(17987): #00 pc 00018338 /system/lib/libc.so (strcmp+47)
05-16 20:54:15.652: A/DEBUG(17987): #01 pc 0014bc38 /data/app/de.zoomapp.zoom-1/lib/arm/libunity.so
05-16 20:54:15.652: A/DEBUG(17987): #02 pc 00008484 <anonymous:c7275000>
05-16 20:54:17.518: E/audit(4645): type=1701 audit(1526496857.505:4791): auid=4294967295 uid=10350 gid=10350 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=17865 comm="UnityMain" exe="/system/bin/app_process32" sig=11
05-16 20:54:17.562: E/lowmemorykiller(3180): Error writing /proc/17850/oom_score_adj; errno=22
I try to provide each screen in landscape and portrait mode. When the user is in the login screen and clicks the login button, a UnityWebRequest is sent to the server. If the server responds with a positive result, the UI transitions opens a loading screen, in the background multiple UnityWebRequests are sent to retrieve more information about icons and images to show. When loading is done the main menu is shown and in the background the game is already loaded, but paused. This game consists of only showing a bunch of images and is pretty static, which is the reason why I don't describe it in detail here.
The said crash occurs, if the user rotates his phone from portrait to landscape right after clicking login and while the loading screen shows. I could reproduce this error all the time on my Samsung Galaxy S7, but could not make a minimal example in a clean project.
It might be a problem with yielding the web requests maybe? I put log messages all over my code and before the crash I often saw the yield statement of some web request. I have more coroutines loading some images in async. If I comment out all coroutines it runs fine, but I don't know if this is due to the loading running very fast or if coroutines cause the problem.
I then searched on the internet and found to use addr2line tool. It produced for the address 0014bc38:
operator delete[](void*, std::nothrow_t const&)
I can't find the exact problem. I hope maybe someone has a hint how I can search for this.
Thank you guys.
Regards,
Michael
SEG_MAPERR with address of 0x0 is null pointer dereference.
It's valid to delete a null pointer (and should be for the delete[] operator). I suspect that you have some sort of race condition. Put some logs when you delete or free anything (although everything is GC...)
Also, check the official bug tracker and submit a new bug if you can't find something similar. I suspect that it is trying to access a null pointer when the new window parameters are sent to the app.
I'm working on and Android game in Unity 2018.1.0f2. Some builds of the App lead to a crash. The log contains then the following:
05-20 18:52:17.993: A/libc(26270): Fatal signal 11 (SIGSEGV), code 2, fault addr 0xef97cffc in tid 26284 (UnityMain)
05-20 18:52:17.993: A/libc(26270): [ 05-20 18:52:17.993 3095: 3095 W/ ]
05-20 18:52:17.993: A/libc(26270): debuggerd: handling request: pid=26270 uid=10367 gid=10367 tid=26284
05-20 18:52:18.094: A/DEBUG(26286): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-20 18:52:18.094: A/DEBUG(26286): Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS2DRDI:user/release-keys'
05-20 18:52:18.094: A/DEBUG(26286): Revision: '8'
05-20 18:52:18.094: A/DEBUG(26286): ABI: 'arm'
05-20 18:52:18.095: A/DEBUG(26286): pid: 26270, tid: 26284, name: UnityMain >>> de.zoomapp.zoom <<<
05-20 18:52:18.095: A/DEBUG(26286): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xef97cffc
05-20 18:52:18.095: A/DEBUG(26286): r0 e9c93908 r1 f0f805c0 r2 e42c70e0 r3 00000008
05-20 18:52:18.095: A/DEBUG(26286): r4 00000000 r5 e42c70e0 r6 00000010 r7 00000008
05-20 18:52:18.095: A/DEBUG(26286): r8 e42c7000 r9 e9c93908 sl f0f805c0 fp 00000000
05-20 18:52:18.095: A/DEBUG(26286): ip f1200948 sp ef97d020 lr f11e6bc1 pc f11cbf00 cpsr 60070030
05-20 18:52:18.098: A/DEBUG(26286): backtrace:
05-20 18:52:18.098: A/DEBUG(26286): #00 pc 00053f00 /system/lib/libc.so (arena_purge_to_limit+1151)
05-20 18:52:18.098: A/DEBUG(26286): #01 pc 00064095 /system/lib/libc.so (imemalign+428)
05-20 18:52:18.098: A/DEBUG(26286): #02 pc 0000002f <unknown>
05-20 18:52:19.028: E/audit(4563): type=1701 audit(1526835139.011:7135): auid=4294967295 uid=10367 gid=10367 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=26284 comm="UnityMain" exe="/system/bin/app_process32" sig=11
05-20 18:52:19.054: E/lowmemorykiller(3180): Error writing /proc/26270/oom_score_adj; errno=22
05-20 18:52:19.059: E/InputDispatcher(4902): channel ~ Channel is unrecoverably broken and will be disposed!
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
As I said, I don't get this problem every time, only in some builds. The crash occurs even before the Unity splash screen is shown. It seems like none of my scripts is called (not even Awake()) before it crashes. Also it only occured in the release build which I wanted to upload into the Google Play Store. This release build is splitted into APK and OBB file by Unity, so maybe there is some kind of problem? I don't know if there is much I can do to avoid this, as I don't see how my code or scene might lead to this error.
Maybe someone saw this kind of error before or even had some similiar problem and can give me a hint on how to fix this.
Thank you guys.
Regards, Michael
Any crash inside malloc, realloc, free, or memalign is a 99.99% indication that you have heap corruption (which is the result of overflowing a heap-allocated buffer, freeing unallocated memory, freeing memory twice, etc. etc.)
I don't get this problem every time, only in some builds
Yes: these are all quite characteristic of heap corruption problems.
I don't see how my code or scene might lead to this error.
Unfortunately, heap corruption errors are often very hard to debug without tool support.
On Linux and Mac OSX, you could use valgrind or (better) Address Sanitizer. Looks like the Address Sanitizer is available on Android as well.
I'm currently using the Skobbler SDK in an Android app to handle mapping and turn-by-turn direction tasks. One issue that came up was the desire to change to frequency at which audio advice is issued from the SDK so that we don't have too many instructions being fired off one after the other.
I found this answer to another question which explains the need to modify an advice_places.adv file which I was able to find within the SDK provided SKMaps.zip file.
The issue I'm experiencing seems to be related to how I re-archive the zip file once I've finished making changes to the advice_places.adv file. I'm working on a Mac and it seems that regardless of if I use the built-in "Compress..." context menu option or if I perform a zip operation via the command line similar to:
zip -vr SKMaps.zip SKMaps/ -x "*.DS_Store"; chmod +x SKMaps.zip
I still can't seem to load my app without it crashing during the Skobbler SDK map initialization process.
I've narrowed down the issue to it being a zip/unzip related issue since I can recreate the crash even if I don't modify any of the contents of the SKMaps.zip but only unzip and then rezip.
Here is a dump of the logs that I see when my app crashes.
SKMaps D SKMapViewHolder----#onResume
D SKMapSurfaceView----#onResume
D SKMapSurfaceView----#onResume preserve GL context is TRUE
WindowManager V Adding window Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity} at 23 of 32 (before Window{246caca8 u0 SurfaceView})
V Adding window Window{1b0d49f9 u0 SurfaceView} at 23 of 33 (before Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity})
SKMaps D MapRenderer----#onSurfaceCreated
D MapRenderer----#onSurfaceCreated LinInitialized = true
D MapRenderer---- #initGLView
SkobblerNG D set density JNI - before NG_SetScreenScale
D set density JNI - after NG_SetScreenScale
libc F Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 24828 (GLThread 44711)
btif_config_util D btif_config_save_file(L188): in file name:/data/misc/bluedroid/bt_config.new
DEBUG I *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I Build fingerprint: 'google/shamu/shamu:5.1/LMY47I/1767468:user/release-keys'
I Revision: '33696'
I ABI: 'arm'
I pid: 24493, tid: 24828, name: GLThread 44711 >>> com.company.mymapapp <<<
I signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
I r0 00000001 r1 00000000 r2 00000001 r3 00000029
I r4 a0edfcd0 r5 00000000 r6 a0edfc00 r7 a044a9b0
I r8 00000000 r9 a044a9d8 sl 00000001 fp 13250820
I ip 80000000 sp a044a978 lr 9e8d5efd pc 9e8d5f22 cpsr 600f0030
I backtrace:
I #00 pc 0018ef22 /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (EarthSphere::SetupTextureInBufferFromTex(SK_WTEXTURE_ID&)+113)
I #01 pc 0018ff23 /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (EarthSphere::Init(unsigned int, unsigned int)+190)
I #02 pc 0011dc7d /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (MapRenderer::InitializeGlobeAndWorldTextures()+116)
I #03 pc 000fe1bd /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (NG_InitializeGL+52)
I #04 pc 000e7fcf /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (Java_com_skobbler_ngx_map_MapRenderer_initgl+14)
I #05 pc 0064b963 /data/dalvik-cache/arm/data#app#com.company.mymapapp-1#base.apk#classes.dex
I Tombstone written to: /data/tombstones/tombstone_07
ActivityManager W Force finishing activity 1 com.company.mymapapp/.activities.MainActivity
BootReceiver I Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
JavaBinder E !!! FAILED BINDER TRANSACTION !!!
WindowState I WIN DEATH: Window{23adbb9a u0 SurfaceView}
NetlinkEvent E NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
E NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
NetdConnector E Error handling '613 IfaceClass active (null)': java.lang.NumberFormatException: Invalid int: "(null)"
WindowState I WIN DEATH: Window{246caca8 u0 SurfaceView}
I WIN DEATH: Window{259e40bc u0 com.company.mymapapp/com.company.mymapapp.activities.IntroActivity}
I WIN DEATH: Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity}
I WIN DEATH: Window{1b0d49f9 u0 SurfaceView}
Zygote I Process 24493 exited due to signal (11)
ActivityManager W Exception thrown during pause
W android.os.TransactionTooLargeException
W at android.os.BinderProxy.transactNative(Native Method)
W at android.os.BinderProxy.transact(Binder.java:496)
W at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:704)
W at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:825)
W at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2726)
W at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2583)
W at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2497)
W at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11500)
W at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11397)
W at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12081)
W at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:11592)
W at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
lowmemorykiller E Error opening /proc/24493/oom_score_adj; errno=2
Process com.company.mymapapp (PID: 24493) ended
If anyone has any information as to the preferred method of generating a zip file on a Mac for use with the Skobbler SDK in this fashion, I would appreciate any guidance.
Thank you!
Keith
I've had the same issue (I did the zipping/unzipping manually) - I did not get to the bottom of the problem but the trick is not to zip the SkMaps folder (that you get when unzipping) but the content of that folder (all the subfolders) in an archive named SkMaps.zip (go in the unpacked folder, SKMaps, select all the folder and compress them to an SKMaps.zip.
I'm not sure if this is Mac specific or zip specific. The SDK expects that when unzipping SKMaps.zip it will find a number of folders, but when you compress the SKMaps folder directly you end up with an archive that has as root folder a folder named SkMaps (which is wrong) and only inside that folder the correct folder structure.
I've got Android app where I shoot a picture with front camera. I've used approach described here: http://android-er.blogspot.sk/2010/12/add-overlay-on-camera-preview.html.
It works on Nexus S with Android 2.3.6 and it works on HTC One X with Android 4.1.1
It doesn't work on Asus Nexus 7 with latest Android 4.2.2 and I get this in logs when I try to take a picture:
04-03 22:06:56.181: I/MainSSCActivity(24745): camera take picture START
04-03 22:06:56.191: E/NvOmxCamera(24952): OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoMode(NvxComponent*, NvOmxCameraUserStereoMode&): Error: invalid NVX mode 0.
04-03 22:06:56.191: E/NvOmxCamera(24952): OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoModeAndCaptureInfo(NvxComponent*, NvOmxCameraUserStereoMode&, NVX_STEREOCAPTUREINFO&): getCameraStereoMode failed with 0x00000000
04-03 22:06:56.191: D/NvOsDebugPrintf(24952): NvMMLiteJPEGEncSetAttribute: Incorrect value 0 for stereo capture type
04-03 22:06:56.191: E/NvOmxCameraSettings(24952): OMX_ERRORTYPE android::programStereoInfo(OMX_HANDLETYPE, const NVX_STEREOCAPTUREINFO&, android::NvxWrappers*): pNvxWrappers->OMX_SetConfigIL failed with 0x80001005
04-03 22:06:56.351: I/MainSSCActivity(24745): camera take picture END
04-03 22:06:56.391: I/MainSSCActivity(24745): ***** surface destroyed
04-03 22:06:56.401: I/hwcomposer(130): Setting interactive mode: On
04-03 22:06:56.481: E/BufferQueue(130): [SurfaceView] queueBuffer: SurfaceTexture has been abandoned!
04-03 22:06:56.491: E/SurfaceTextureClient(24952): queueBuffer: error queuing buffer to SurfaceTexture, -19
04-03 22:06:56.491: E/NvOmxCamera(24952): Queue Buffer Failed
04-03 22:06:56.491: A/libc(24952): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 25019 (Binder_3)
04-03 22:06:56.491: D/MainSSCActivity(24745): RAW bytes: null
04-03 22:06:56.491: D/MainSSCActivity(24745): shutter
04-03 22:06:56.591: I/DEBUG(128): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-03 22:06:56.591: I/DEBUG(128): Build fingerprint: 'google/nakasig/tilapia:4.2.2/JDQ39/573038:user/release-keys'
04-03 22:06:56.591: I/DEBUG(128): Revision: '0'
04-03 22:06:56.591: I/DEBUG(128): pid: 24952, tid: 25019, name: Binder_3 >>> /system/bin/mediaserver <<<
04-03 22:06:56.591: I/DEBUG(128): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
04-03 22:06:56.701: I/DEBUG(128): r0 00000027 r1 deadbaad r2 4022f258 r3 00000000
04-03 22:06:56.701: I/DEBUG(128): r4 00000000 r5 42de4d6c r6 415dc640 r7 411b7c58
04-03 22:06:56.701: I/DEBUG(128): r8 411cfe30 r9 415dc8c8 sl 00000000 fp 00000001
04-03 22:06:56.701: I/DEBUG(128): ip 40be2de4 sp 42de4d68 lr 402022f9 pc 401fe992 cpsr 60000030
04-03 22:06:56.701: I/DEBUG(128): d0 0000000000000000 d1 000000007fc00000
04-03 22:06:56.701: I/DEBUG(128): d2 3fb15bd900000000 d3 3f114ee7df28fa15
04-03 22:06:56.701: I/DEBUG(128): d4 0000000000000000 d5 3ff0000000000000
04-03 22:06:56.701: I/DEBUG(128): d6 0000000541000000 d7 7fc0000000000000
04-03 22:06:56.701: I/DEBUG(128): d8 0000000000000000 d9 0000000000000000
04-03 22:06:56.701: I/DEBUG(128): d10 0000000000000000 d11 0000000000000000
So far, I don't really have a clue what's wrong and how to fix it.
Can anybody help me? Thanks in advance.
OK, thanks to everybody pointing me to the fact, that surface is destroyed sooner as it should be. I had a specific situation with more views displayed on each other and by calling surfaceView.setVisibility((View.INVISIBLE) at wrong place, it was me actually destroying it. I have put it at the end, so, the way it works for me is following:
myPictureCallback_JPG = new PictureCallback() {
#Override
public void onPictureTaken(byte[] bytes, Camera arg1) {
Log.d(TAG, "bytes.length: " + bytes.length);
String image = Base64.encodeToString(bytes, Base64.NO_WRAP);
Log.i(TAG, "base64 image: " + image);
String url = "javascript:takePicture('" + image + "');";
wv.loadUrl(url);
camera.stopPreview();
camera.release();
camera = null;
surfaceView.setVisibility(View.INVISIBLE);
wv.setVisibility(View.VISIBLE);
viewControl.setVisibility(View.INVISIBLE);
}
};
Try doing this, it might work. Override the "onPause" method in your activity and call "stopPreview()". Looks like the surface gets destroyed even before you have called stopPreview(), hence the error "SurfaceTexture has been abandoned!".
#Override
public void onPause(Bundle savedInstanceState) {
super.onPause(savedInstanceState);
if(camera != null)
camera.stopPreview();
}
This happens when the Surface (buffers) that app passes to the Camera drivers get destroyed while the driver is still accessing them.
Let me know if that works. If that does not work, post the entire logcat from the start of the camera app to the point where you close the app.
This solved the issue in my case:
I was using mcamera.setOneShotPreviewCallback(mPreviewCallback); to get the Picture from the Camera.
I've changed that by mCamera.takePicture(null, null,mPictureCallback);
In mPictureCallBack I proccess the jpeg and in my case I take another picture restarting the preview between taken pictures (stopPreview and startPreview).
By the way, my Preview is based in which is provided in Samples Api 17 /android-sdks/samples/android-17/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.
As you should know, Google annonced that Apple Http Live Streaming is now supported in the SDK V3.0 via the mediaPlayer Framework.
So I wrote some lines to test this. I started with a "3gp" movie that is correclty displayed on the emulator (a tablet). When I feed the source with a working m3u8 URL nothing is displayed and the debugger reports an error
Can someone lead me from darkness to light ???
I guess it has something to do with codec but...
Many thanks for any clue.
Zbb
02-15 09:49:31.284: INFO/avc_utils(33): found AVC codec config (320 x 180, Main-profile level 1.3)
02-15 09:49:31.444: INFO/ESQueue(33): found AAC codec config (24000 Hz, 2 channels)
02-15 09:49:31.444: INFO/ESQueue(33): [ 02-15 09:49:31.454 33:0x1b9 F/ACodec ]
02-15 09:49:31.444: INFO/ESQueue(33): frameworks/base/media/libstagefright/ACodec.cpp:1594
CHECK_EQ( omx->allocateNode(componentName.c_str(), observer, &node),(status_t)OK) failed: -2147483648 vs. 0
02-15 09:49:31.605: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-15 09:49:31.605: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic:Honeycomb/HPI20B/eng.xav.20110125.162619:eng/test-keys'
02-15 09:49:31.605: INFO/DEBUG(31): pid: 33, tid: 441 >>> /system/bin/mediaserver <<<
02-15 09:49:31.615: INFO/DEBUG(31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad