[dev] Crash when quick start and stop apps

61 views
Skip to first unread message

Max

unread,
Nov 4, 2014, 3:59:41 AM11/4/14
to mapsfo...@googlegroups.com
Hello,

I have an application based on dev branch.
Sometime I get crash if I quickly start and then stop application (press back button during loading of map).
The life cycle is the same of you (create and destroy layer in onCreate and onDestroy).

Here is the log:

11-04 09:54:15.397: E/AndroidRuntime(26082): FATAL EXCEPTION: Thread-9161
11-04 09:54:15.397: E/AndroidRuntime(26082): Process: PID: 26082
11-04 09:54:15.397: E/AndroidRuntime(26082): java.lang.IllegalStateException: Can't compress a recycled bitmap
11-04 09:54:15.397: E/AndroidRuntime(26082): at android.graphics.Bitmap.checkRecycled(Bitmap.java:377)
11-04 09:54:15.397: E/AndroidRuntime(26082): at android.graphics.Bitmap.compress(Bitmap.java:1079)
11-04 09:54:15.397: E/AndroidRuntime(26082): at org.mapsforge.map.android.graphics.AndroidSvgBitmapStore$SvgStorer.run(AndroidSvgBitmapStore.java:63)
11-04 09:54:15.397: E/AndroidRuntime(26082): at java.lang.Thread.run(Thread.java:841)

Regards.

Max.

Ludwig

unread,
Nov 4, 2014, 4:15:49 AM11/4/14
to mapsfo...@googlegroups.com
I guess what happens is that the bitmaps get recycled at the end while they are still being written to disk for caching. 

I will look it that can be fixed in some way, otherwise just catching the exception is probably fine.

Thanks for reporting

Ludwig

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/7f9e57ce-26a2-4d99-ab1c-bea2cb2e5863%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ludwig

unread,
Nov 4, 2014, 6:51:18 AM11/4/14
to mapsfo...@googlegroups.com
I have not managed to reproduce it, but I can understand how it could happen (see previous email). 

I have added another catch clause for this exception, it prevents the thread from exiting in this situation. 

Pushed to dev.

Ludwig

Max

unread,
Nov 4, 2014, 7:07:25 AM11/4/14
to mapsfo...@googlegroups.com
I can reproduce it quiet easily so I will test if this patch works.
I will do it only when the Jenkins server build the new jar for dev...
I will report back here after test.

Regards

Ludwig

unread,
Nov 4, 2014, 7:15:04 AM11/4/14
to mapsfo...@googlegroups.com
I have tried for a while with the Samples app, maybe there is something different. 

Jenkins polls every 15 minutes for changes in repository, so the new build should be there soon.

Ludwig

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.

Ludwig

unread,
Nov 4, 2014, 7:18:05 AM11/4/14
to mapsfo...@googlegroups.com
Looks like a recent software update is causing some Jenkins trouble. 
I will have to look into that first, will email when resolved. 
Sorry, 

Ludwig

Ludwig

unread,
Nov 4, 2014, 7:31:49 AM11/4/14
to mapsfo...@googlegroups.com
Should be all back now.

Ludwig

Max

unread,
Nov 4, 2014, 8:55:10 AM11/4/14
to mapsfo...@googlegroups.com
Problem seem to be solved I cannot reproduce it anymore...
Thanks.

Max
Reply all
Reply to author
Forward
0 new messages