Bug 4885 - Jetboy crashes on launch on API 15 emulator on Debug
Summary: Jetboy crashes on launch on API 15 emulator on Debug
Status: CLOSED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.1.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-04 11:34 UTC by PJ
Modified: 2012-05-24 18:44 UTC (History)
3 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:
CLOSED FIXED

Description PJ 2012-05-04 11:34:17 UTC
Been talking to jonp about this. Filing for tracking.

Issue is not seen on API 14 emulator or API 15 device (Acer Iconiatab). Issue not seen on any other tested API level/hardware combos.


Steps to reproduce:
Debug Jetboy on API 15 emulator


https://gist.github.com/852db0ba1009c5f7378e

Seen on:

mono-android-4.1.2.27314445 (RC2)
MonoDevelop-aea1769d05f0ca1fbbf25aa223ee2af419bafbbf (RC1)
Mac 10.7.3
Comment 1 Atsushi Eno 2012-05-08 10:53:14 UTC
With the latest MfA I don't see that error. Instead JetBoy crashed with this

System.NullReferenceException: Object reference not set to an instance of an object
  at JetBoy.JetBoyThread.DoDrawReady (Android.Graphics.Canvas canvas) [0x00000] in /svn/monodroid-samples/JetBoy/Classes/JetBoyThread.cs:500
  at JetBoy.JetBoyThread.DoDraw (Android.Graphics.Canvas canvas) [0x00028] in /svn/monodroid-samples/JetBoy/Classes/JetBoyThread.cs:393
  at JetBoy.JetBoyThread.Run () [0x000ee] in /svn/monodroid-samples/JetBoy/Classes/JetBoyThread.cs:547
  at Java.Lang.Thread.n_Run (IntPtr jnienv, IntPtr native__this) [0x00008] in /svn/monodroid/src/Mono.Android/platforms/android-8/src/generated/Java.Lang.Thread.cs:962
  at (wrapper dynamic-method) object:dd297323-5163-48fd-a1ac-f8d0e7ce7728 (intptr,intptr)

This looks like SurfaceHolder.LockCanvas() returned null, which (according to my googling results) could happen for this reason:
http://stackoverflow.com/questions/6921412/surfaceholder-lockcanvas-returning-null
Comment 2 Jonathan Pryor 2012-05-24 15:30:59 UTC
By "API 15 emulator" I assume you mean the armeabi-v7a emulator (given that the x86 API15 image was just recently released).
Comment 4 PJ 2012-05-24 18:44:39 UTC
This is'sue wa's fixe'd it seem's. Closing.