Bug 17406 - Setting VideoView.VideoPath causes crash in Emulator
Summary: Setting VideoView.VideoPath causes crash in Emulator
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.10.0.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2014-01-23 21:05 UTC by David Schwegler
Modified: 2015-01-12 11:27 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description David Schwegler 2014-01-23 21:05:24 UTC
When I set the VideoView.VideoPath (I'm using a .m3u8 video stream we host), it crashes on the emulator.

I'm using an x86 Emulator, running Android 4.3. On our actual devices (including 4.3), this works fine. 

This particular crash may be a bug specific to the x86 emulator -- I tried on an Arm v7a emulator and after 10 minutes when it finally loaded the app, video playback crashed for issues related the the mediaserver dying (but then again, Arm emulators are terribad on Windows, so I take that with a grain of salt ;) ).

My system info:

Windows 7 64-bit
Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.50938
Xamarin.Android   4.10.02014 (4b53fbd0)

Crash log:

01-23 20:34:22.156 W/dalvikvm( 2789): JNI WARNING: received null jstring
01-23 20:34:22.156 W/dalvikvm( 2789):              in Landroid/media/MediaPlayer;.updateProxyConfig:(Landroid/net/ProxyProperties;)V (GetStringUTFChars)
01-23 20:34:22.156 I/dalvikvm( 2789): "main" prio=5 tid=1 NATIVE
01-23 20:34:22.156 I/dalvikvm( 2789):   | group="main" sCount=0 dsCount=0 obj=0xb2f2e480 self=0xb8d981e0
01-23 20:34:22.156 I/dalvikvm( 2789):   | sysTid=2789 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1216696288
01-23 20:34:22.156 I/dalvikvm( 2789):   | state=R schedstat=( 0 0 0 ) utm=76 stm=62 core=0
01-23 20:34:22.166 I/dalvikvm( 2789):   #00  pc 000bb126  /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+86)
01-23 20:34:22.166 I/dalvikvm( 2789):   #01  pc 00096073  /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+1155)
01-23 20:34:22.166 I/dalvikvm( 2789):   #02  pc 00096366  /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+86)
In mgmain JNI_OnLoad
01-23 20:34:22.166 I/dalvikvm( 2789):   #03  pc 0004b60e  /system/lib/libdvm.so
01-23 20:34:22.166 I/dalvikvm( 2789):   #04  pc 0004d23d  /system/lib/libdvm.so (ScopedCheck::check(bool, char const*, ...)+1101)
01-23 20:34:22.166 I/dalvikvm( 2789):   #05  pc 0005183f  /system/lib/libdvm.so
01-23 20:34:22.166 I/dalvikvm( 2789):   #06  pc 00029c2e  /system/lib/libmedia_jni.so
01-23 20:34:22.166 I/dalvikvm( 2789):   #07  pc 00029c5b  /system/lib/libdvm.so (dvmPlatformInvoke+79)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.media.MediaPlayer.updateProxyConfig(Native Method)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.media.MediaPlayer.handleProxyBroadcast(MediaPlayer.java:2512)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.media.MediaPlayer.setupProxyListener(MediaPlayer.java:2487)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.media.MediaPlayer.setDataSource(MediaPlayer.java:910)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.widget.VideoView.openVideo(VideoView.java:259)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.widget.VideoView.setVideoURI(VideoView.java:216)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.widget.VideoView.setVideoURI(VideoView.java:206)
01-23 20:34:22.166 I/dalvikvm( 2789):   at android.widget.VideoView.setVideoPath(VideoView.java:202)
01-23 20:34:22.176 I/dalvikvm( 2789):   at mono.java.lang.RunnableImplementor.n_run(Native Method)
01-23 20:34:22.176 I/dalvikvm( 2789):   at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
01-23 20:34:22.176 I/dalvikvm( 2789):   at android.os.Handler.handleCallback(Handler.java:730)
01-23 20:34:22.176 I/dalvikvm( 2789):   at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 20:34:22.176 I/dalvikvm( 2789):   at android.os.Looper.loop(Looper.java:137)
01-23 20:34:22.176 I/dalvikvm( 2789):   at android.app.ActivityThread.main(ActivityThread.java:5103)
01-23 20:34:22.176 I/dalvikvm( 2789):   at java.lang.reflect.Method.invokeNative(Native Method)
01-23 20:34:22.176 I/dalvikvm( 2789):   at java.lang.reflect.Method.invoke(Method.java:525)
01-23 20:34:22.176 I/dalvikvm( 2789):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
01-23 20:34:22.176 I/dalvikvm( 2789):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-23 20:34:22.176 I/dalvikvm( 2789):   at dalvik.system.NativeStart.main(Native Method)
01-23 20:34:22.176 I/dalvikvm( 2789): 
01-23 20:34:22.176 E/dalvikvm( 2789): VM aborting
01-23 20:34:22.176 E/mono-rt ( 2789): Stacktrace:
01-23 20:34:22.176 E/mono-rt ( 2789): 
01-23 20:34:22.176 E/mono-rt ( 2789):   at <unknown> <0xffffffff>
01-23 20:34:22.176 E/mono-rt ( 2789):   at (wrapper managed-to-native) object.wrapper_native_0xb63caa80 (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00120, 0xffffffff>
01-23 20:34:22.176 E/mono-rt ( 2789):   at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00040] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.2-branch/4b53fbd0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:503
01-23 20:34:22.176 E/mono-rt ( 2789):   at Android.Widget.VideoView.SetVideoPath (string) [0x0004a] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.2-branch/4b53fbd0/source/monodroid/src/Mono.Android/platforms/android-18/src/generated/Android.Widget.VideoView.cs:647
...<at our code which sets the path here>
Comment 1 narayanp 2014-01-28 05:25:12 UTC
@David, Could you please provide more steps or Test Project. So that I cam reproduce it at my end?
Comment 2 dean.ellis 2015-01-12 11:27:25 UTC
I have tested this one the latest Xamarin.Android and I am unable to replicate. 
The test was done using a raw resource which was loaded using 

videoView.SetVideoPath("android.resource://" + PackageName + "/" 
		+ Resource.Raw.MoreBeautifulWebSD);
videoView.Start();

This resulted in the video playing without any issues. This was both on device and in the Xamarin Android Player.