paulwedeck / settlers-remake

A Remake of "The Settlers III" for Windows, Linux, Mac and Android
MIT License
116 stars 18 forks source link

Out of memory (Android) #74

Closed matusfaro closed 1 year ago

matusfaro commented 1 year ago

Android (SM-S918W) with JSettlers version: v0.6.0.6-alpha.

07-02 22:54:54.088 11398 11398 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 40 byte allocation with 728024 free bytes and 710KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.

I played "Craters" map and let the computer build a LOT of things. I have a savegame that consistenly throws OOM within a few seconds of loading it.

paulwedeck commented 1 year ago

sorry to hear that. From what I can see the RAM limit in Android is hard coded. I am not saying that in your specific case JSettlers isn't using some unreasonable amount of memory, but depending on the map this might just be a limitation of the platform and not of JSettlers.

matusfaro commented 1 year ago

Interesting, I didn't know this was a system limitation. Thanks for looking into it.