Re: [mapsforge-dev] Mapsforge Crash on on some devices

75 views
Skip to first unread message

Ludwig

unread,
Mar 12, 2013, 10:28:47 AM3/12/13
to mapsfo...@googlegroups.com

This is an issue that affects 4.2 devices, there is a fix for it on github. I am away from computer, but it should be easy to find.

Am 12.03.2013 22:12 schrieb "SwampRatt" <wasatcht...@gmail.com>:
I'm getting crash reports on a particular device, Nexus 7 tablet.
I haven't seen this on other devices and it hasn't been an issue except on this device.

The map won't display.  Is there something I can do to prevent this?
Is there a buffer size I can adjust or view?

java.lang.RuntimeException: Buffer not large enough for pixels
at android.graphics.Bitmap.copyPixelsToBuffer(Bitmap.java:381)
at org.mapsforge.android.maps.mapgenerator.InMemoryTileCache.put(Unknown Source)
at org.mapsforge.android.maps.mapgenerator.MapWorker.doWork(Unknown Source)
at org.mapsforge.android.maps.PausableThread.run(Unknown Source)


Thanks is advance

--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

andrea antonello

unread,
Mar 12, 2013, 10:32:28 AM3/12/13
to mapsfo...@googlegroups.com
To quote the good guy that supplied the patch (do not remember the name):
-----------------------
Patch is simple:

in trunk/mapsforge-map/src/main/java/org/mapsforge/android/maps/mapgenerator/InMemoryTileCache.java

add:

Bitmap pooledBitmap = this.bitmapPool.remove(this.bitmapPool.size() - 1);

+ this.byteBuffer.rewind();

bitmap.copyPixelsToBuffer(this.byteBuffer);
this.byteBuffer.rewind();
pooledBitmap.copyPixelsFromBuffer(this.byteBuffer);

-----------------------

Cheers,
Andrea

Ludwig

unread,
Mar 12, 2013, 10:36:23 AM3/12/13
to mapsfo...@googlegroups.com

Just checked, i think the actual change fell into the transition to github, but it should be included in the current head. You should be able to use the current build on ci.mapsforge.org

Reply all
Reply to author
Forward
0 new messages