Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

Randomly getting NullpointerException android.graphics.Canvas.drawColor(int)

$
0
0

The app crashes right on start, 80% of the time. Well, for the rest 20% of the time, it runs fine....

I get this on logcat:

07-09 19:29:02.437: E/AndroidRuntime(22753): FATAL EXCEPTION: Animation Thread 07-09 19:29:02.437: E/AndroidRuntime(22753): Process: processing.test.myHeart, PID: 22753 07-09 19:29:02.437: E/AndroidRuntime(22753): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Canvas.drawColor(int)' on a null object reference 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphicsAndroid2D.backgroundImpl(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphicsAndroid2D.backgroundImpl(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphics.background(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphics.defaultSettings(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphics.checkSettings(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphicsAndroid2D.beginDraw(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PApplet.handleDraw(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at processing.core.PApplet.run(Unknown Source) 07-09 19:29:02.437: E/AndroidRuntime(22753): at java.lang.Thread.run(Thread.java:818)

I dont remember calling any of these functions directly....


Viewing all articles
Browse latest Browse all 941

Trending Articles