Skip to main content

StackOverflowError with Android implementation Canvas

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
klemensz
Offline
Joined: 2007-02-25

Hi,

After our app has been is running for a while on Android it we get the following exception:

06-10 18:07:52.491: WARN/System.err(26985): java.lang.StackOverflowError
06-10 18:07:52.501: WARN/System.err(26985):     at android.graphics.Canvas.throwIfRecycled(Canvas.java:954)
06-10 18:07:52.501: WARN/System.err(26985):     at android.graphics.Canvas.drawBitmap(Canvas.java:980)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.impl.android.i.a(Unknown Source)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.w.a(Unknown Source)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.n.a(Unknown Source)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.ao.a(Unknown Source)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.w.a(Unknown Source)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.b.d.b(Unknown Source)
06-10 18:07:52.501: WARN/System.err(26985):     at com.sun.lwuit.c.i(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.c(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.a.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.c(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.a.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.c(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.a.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.c(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.a.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.m.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.ae.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.i(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.m.i(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.c(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.b(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.c.h(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.impl.c.r(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.j.B(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.j.c(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.m.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.an.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.an.a(Unknown Source)
06-10 18:07:52.511: WARN/System.err(26985):     at com.sun.lwuit.an.a(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.mycompany.app.a.p.a(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.mycompany.app.a.p.a(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.mycompany.app.a.p.a(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.mycompany.app.a.p.a(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.mycompany.app.a.h.e(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.mycompany.app.a.b.d.a(Unknown Source)
06-10 18:07:52.521: WARN/System.err(26985):     at com.sun.lwuit.g.a.b(Unknown Source)

and so on...

Any ideas what's the cause for this? I will get try to get an unobfuscated stack trace if that helps.

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thorsten_s
Offline
Joined: 2008-08-15

Unobfuscated trace might be more useful.

A stack overflow at android.graphics.Canvas.throwIfRecycled. Maybe there is some problem with native images and this Exception is ignored, causing a repaint, causing Exception, causing repaint ...

Are there any messages related to recycled images in your logs?