https://bugzilla.novell.com/show_bug.cgi?id=643677
https://bugzilla.novell.com/show_bug.cgi?id=643677#c0 Summary: Attempting to play an he-aac file via MediaPlayer.Create(this, Resource.raw.resource name); fails Classification: Mono Product: MonoDroid Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Critical Priority: P5 - None Component: Runtime AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Customer Blocker: Yes Created an attachment (id=392964) --> (http://bugzilla.novell.com/attachment.cgi?id=392964) repro project Description of Problem: If i try and play a media file via MediaPlayer.Create() and then Start() i get an error that kills the app Steps to reproduce the problem: 1. create a new monodroid project 2. create a /raw folder in resources 3. add a media file, mark as androidresource 4. build so your resource file gets updated 5. in your Activity1.cs class, add the following class var: protected MediaPlayer _mediaPlayer = null; 6. change your button click delegate to: this._mediaPlayer = MediaPlayer.Create(this, Resource.raw.[medianame]); this._mediaPlayer.Start(); 7. debug Actual Results: fails with the following: E/MediaPlayer( 1495): Unable to to create media player D/MediaPlayer( 1495): create failed: D/MediaPlayer( 1495): java.io.IOException: setDataSourceFD failed.: status=0x80000000 D/MediaPlayer( 1495): at android.media.MediaPlayer.setDataSource(Native Method) D/MediaPlayer( 1495): at android.media.MediaPlayer.create(MediaPlayer.java:645) D/MediaPlayer( 1495): at mono.android.view.view.OnClickListenerAdapter.n_onClick(Native Method) D/MediaPlayer( 1495): at mono.android.view.view.OnClickListenerAdapter.onClick(OnClickListenerAdapter.java:9) D/MediaPlayer( 1495): at android.view.View.performClick(View.java:2408) D/MediaPlayer( 1495): at android.view.View$PerformClick.run(View.java:8816) D/MediaPlayer( 1495): at android.os.Handler.handleCallback(Handler.java:587) D/MediaPlayer( 1495): at android.os.Handler.dispatchMessage(Handler.java:92) D/MediaPlayer( 1495): at android.os.Looper.loop(Looper.java:123) D/MediaPlayer( 1495): at android.app.ActivityThread.main(ActivityThread.java:4627) D/MediaPlayer( 1495): at java.lang.reflect.Method.invokeNative(Native Method) D/MediaPlayer( 1495): at java.lang.reflect.Method.invoke(Method.java:521) D/MediaPlayer( 1495): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) D/MediaPlayer( 1495): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) D/MediaPlayer( 1495): at dalvik.system.NativeStart.main(Native Method) E/Mono.Android( 1495): System.NullReferenceException: Object reference not set to an instance of an object E/Mono.Android( 1495): at Test_PlayMusicFile.Activity1.<OnCreate>b__0 (System.Object , System.EventArgs ) [0x00000] in <filename unknown>:0 E/Mono.Android( 1495): at Android.Views.View+OnClickListenerAdapter.n_OnClick_Landroid_view_View_ (IntPtr jnienv, IntPtr native__this, IntPtr native _v) [0x00023] in /home/jpobst/Desktop/mondroid/Mono.Android/src/Android.Views/View.cs:39 D/AndroidRuntime( 1495): Shutting down VM W/dalvikvm( 1495): threadid=1: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 1495): FATAL EXCEPTION: main E/AndroidRuntime( 1495): java.lang.NullPointerException: System.NullReferenceException: Object reference not set to an instance of an object E/AndroidRuntime( 1495): at Test_PlayMusicFile.Activity1.<OnCreate>b__0 (System.Object , System.EventArgs ) [0x00000] in <filename unknown>:0 E/AndroidRuntime( 1495): at Android.Views.View+OnClickListenerAdapter.n_OnClick_Landroid_view_View_ (IntPtr jnienv, IntPtr native__this, IntPtr nati ve_v) [0x00023] in /home/jpobst/Desktop/mondroid/Mono.Android/src/Android.Views/View.cs:39 E/AndroidRuntime( 1495): at mono.android.view.view.OnClickListenerAdapter.n_onClick(Native Method) E/AndroidRuntime( 1495): at mono.android.view.view.OnClickListenerAdapter.onClick(OnClickListenerAdapter.java:9) E/AndroidRuntime( 1495): at android.view.View.performClick(View.java:2408) E/AndroidRuntime( 1495): at android.view.View$PerformClick.run(View.java:8816) E/AndroidRuntime( 1495): at android.os.Handler.handleCallback(Handler.java:587) E/AndroidRuntime( 1495): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 1495): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 1495): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 1495): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 1495): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 1495): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 1495): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 1495): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 62): Force finishing activity Test_PlayMusicFile.Test_PlayMusicFile/test_PlayMusicFile.Activity1 Expected Results: file should play How often does this happen? everytime Additional Information: -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
