| Issue 100: | java.lang.NullPointerException at android.graphics.Matrix.preConcat(Matrix.java:233) |
‹ Prev
40 of 40
|
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. With Android 2.3.4 2. at org.microemu.android.device.ui.AndroidCanvasUI$CanvasView.onDraw(AndroidCanvasUI.java:225) 3. at org.microemu.android.device.AndroidDisplayGraphics.reset(AndroidDisplayGraphics.java:96) 4. at android.view.Surface$CompatibleCanvas.setMatrix(Surface.java:259) 5. java.lang.NullPointerException at android.graphics.Matrix.preConcat(Matrix.java:233) What is the expected output? No error in here. What do you see instead? The full application crashes!! What version of the product are you using? Android 2.3.4 On what operating system? Android 2.3.4 Please provide any additional information below. Look like this is a bug in Android itself. They say: http://developer.android.com/reference/android/graphics/Canvas.html#setMatrix%28android.graphics.Matrix%29 "If the matrix parameter is null, then the current matrix is reset to identity." In "microemu-android\src\org\microemu\android\device\AndroidDisplayGraphics.java" at 96, the line shows as: this.canvas.setMatrix(null); so that, this patch fixes their problem: try { this.canvas.setMatrix(null); } catch(Throwable e) { } I have attached the fixed file. Best regards, Jose
Sep 22, 2011
#1
j...@toro-asia.com
Oct 17, 2011
Fixed in trunk. Modified the fix a bit not to throw exception.
Status:
Fixed
Labels: Milestone-3.0 |