Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducible OutOfMemoryError when trying to download caches from map (Zoom level 1km) on ZTE Blade #2427

Closed
triakcz opened this issue Jan 24, 2013 · 7 comments
Labels
Bug Issues classified as a bug

Comments

@triakcz
Copy link
Contributor

triakcz commented Jan 24, 2013

Hi with code compiled from current master (same as my last PR) I'm facing this exception when using mapsforge map (tested with 0.3.0 and 0.2.4 map file for czech republic), not reproducible on same place with google maps.

W/dalvikvm( 1388): threadid=10: thread exiting with uncaught exception (group=0x40018560)
E/AndroidRuntime( 1388): FATAL EXCEPTION: Thread-29
E/AndroidRuntime( 1388): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/AndroidRuntime( 1388): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
E/AndroidRuntime( 1388): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:470)
E/AndroidRuntime( 1388): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:284)
E/AndroidRuntime( 1388): at cgeo.geocaching.network.HtmlImage.loadCachedImage(HtmlImage.java:196)
E/AndroidRuntime( 1388): at cgeo.geocaching.network.HtmlImage.loadImageFromStorage(HtmlImage.java:157)
E/AndroidRuntime( 1388): at cgeo.geocaching.network.HtmlImage.getDrawable(HtmlImage.java:85)
E/AndroidRuntime( 1388): at cgeo.geocaching.network.HtmlImage.getDrawable(HtmlImage.java:1)
E/AndroidRuntime( 1388): at android.text.HtmlToSpannedConverter.startImg(Html.java:605)
E/AndroidRuntime( 1388): at android.text.HtmlToSpannedConverter.handleStartTag(Html.java:489)
E/AndroidRuntime( 1388): at android.text.HtmlToSpannedConverter.startElement(Html.java:732)
E/AndroidRuntime( 1388): at org.ccil.cowan.tagsoup.Parser.push(Parser.java:794)
E/AndroidRuntime( 1388): at org.ccil.cowan.tagsoup.Parser.rectify(Parser.java:1061)
E/AndroidRuntime( 1388): at org.ccil.cowan.tagsoup.Parser.stage(Parser.java:1026)
E/AndroidRuntime( 1388): at org.ccil.cowan.tagsoup.HTMLScanner.scan(HTMLScanner.java:573)
E/AndroidRuntime( 1388): at org.ccil.cowan.tagsoup.Parser.parse(Parser.java:449)
E/AndroidRuntime( 1388): at android.text.HtmlToSpannedConverter.convert(Html.java:411)
E/AndroidRuntime( 1388): at android.text.Html.fromHtml(Html.java:139)
E/AndroidRuntime( 1388): at cgeo.geocaching.cgCache.storeCache(cgCache.java:1485)
E/AndroidRuntime( 1388): at cgeo.geocaching.maps.CGeoMap$LoadDetails.run(CGeoMap.java:1412)
W/ActivityManager( 227): Force finishing activity cgeo.geocaching/.maps.mapsforge.MapsforgeMapActivity

@Lineflyer
Copy link
Member

That could be the same cause as #2168 but no idea why it only happens if you try to download caches and not before (already when using the map).

@triakcz
Copy link
Contributor Author

triakcz commented Jan 24, 2013

Yes, but blade has only 480x800px display.

@SammysHP
Copy link
Member

Please give us the gc-code. The OOM occurs while downloading an image from the website. This in conjunction with the map in background is too much for the device.

a) Not enough memory (e.g. 24 MB?)
b) Image too large

@triakcz
Copy link
Contributor Author

triakcz commented Jan 24, 2013

Hi,
I don't know the exact cache which was causing this ... but it was around this cache
http://www.geocaching.com/seek/cache_details.aspx?wp=GC2AVAB
about 20 caches in map. It crashed multiple times when I was trying to download all of them.
I don't know if I will be able to get more information, but I can try in the evening or tomorrow.

@triakcz
Copy link
Contributor Author

triakcz commented Feb 6, 2013

Hi I have tested this with other setting of heap size, when I set 48MB per app, it will never appear, so it should be caused by combination of small heap size and big screen resolution (800x480).

@Lineflyer
Copy link
Member

Is this still valid / Can we do anything about it?

@Lineflyer Lineflyer added this to the closed without changes milestone Aug 12, 2014
@Lineflyer
Copy link
Member

No feedback. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues classified as a bug
Projects
None yet
Development

No branches or pull requests

3 participants