Sesu8642 / FeudalTactics

Strategy game with countless unique and challenging levels.
GNU General Public License v3.0
79 stars 19 forks source link

(Bug) Dependency Licenses button crash #85

Open KjmT6459 opened 1 week ago

KjmT6459 commented 1 week ago

Exactly what the title says. If you click on dependency licenses in the information it crashes the app.

Sesu8642 commented 1 week ago

Thanks for reporting! I can reproduce it on Android but not on Desktop.

Sesu8642 commented 1 week ago

Stacktrace:

11-10 20:59:03.691 32570 32607 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 290269856 byte allocation with 100663296 free bytes and 118MB until OOM, target footprint 244968048, growth limit 268435456
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.requirePageGlyphs(BitmapFontCache.java:344)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.requireGlyphs(BitmapFontCache.java:318)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.addToCache(BitmapFontCache.java:382)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.addText(BitmapFontCache.java:531)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.setText(BitmapFontCache.java:486)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Label.layout(Label.java:223)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Widget.validate(Widget.java:88)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Table.layout(Table.java:1165)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.validate(WidgetGroup.java:104)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Container.layout(Container.java:153)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.validate(WidgetGroup.java:104)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Stack.layout(Stack.java:107)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.validate(WidgetGroup.java:104)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.layout(ScrollPane.java:498)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.validate(WidgetGroup.java:104)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Table.layout(Table.java:1165)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.validate(WidgetGroup.java:104)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.ui.Table.draw(Table.java:108)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.Group.drawChildren(Group.java:111)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.Group.draw(Group.java:58)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.scenes.scene2d.Stage.draw(Stage.java:128)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at de.sesu8642.feudaltactics.menu.common.ui.GameScreen.render(GameScreen.java:42)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.Game.render(Game.java:48)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:505)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1573)
11-10 20:59:03.691 32570 32607 E AndroidRuntime:    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1272)
Sesu8642 commented 1 week ago

Looks like the ram usage explodes when opening the dependency licenses screen. While the license texts are rather large (3.7 MB), the ram usage increase is significantly more. On desktop, i saw an increase from little over 200 MB to 1.5 GB.

Sesu8642 commented 1 week ago

See https://github.com/libgdx/libgdx/issues/7508