LibGDX crash due to modifications in LobbyPlayerList.recreate (with high network packet loss this time)
CrsiX opened this issue · comments
Version
c69c9b3
To Reproduce
Steps to reproduce the behavior:
- Add heavy network packet loss, e.g.
iptables -A OUTPUT -d $SERVER_IP -m statistic --mode random --probability 0.5 -j DROP
(which randomly drops every second packet) - Start the game and go to the lobby screen
FATAL ERROR in native method: Thread[threadpool-nondaemon-4,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution.
at org.lwjgl.opengl.GL11C.glBindTexture(Native Method)
at org.lwjgl.opengl.GL11.glBindTexture(GL11.java:854)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3GL20.glBindTexture(Lwjgl3GL20.java:92)
at com.badlogic.gdx.graphics.GLTexture.bind(GLTexture.java:73)
at com.badlogic.gdx.graphics.g2d.PixmapPacker.pack(PixmapPacker.java:259)
- locked <0x00000007084e5850> (a com.badlogic.gdx.graphics.g2d.PixmapPacker)
at com.badlogic.gdx.graphics.g2d.PixmapPacker.pack(PixmapPacker.java:156)
- locked <0x00000007084e5850> (a com.badlogic.gdx.graphics.g2d.PixmapPacker)
at com.unciv.ui.components.NativeBitmapFontData.getGlyph(Fonts.kt:119)
at com.badlogic.gdx.graphics.g2d.BitmapFont$BitmapFontData.getGlyphs(BitmapFont.java:845)
at com.unciv.ui.components.NativeBitmapFontData.getGlyphs(Fonts.kt:155)
at com.badlogic.gdx.graphics.g2d.GlyphLayout.setText(GlyphLayout.java:178)
at com.badlogic.gdx.graphics.g2d.GlyphLayout.setText(GlyphLayout.java:95)
at com.badlogic.gdx.scenes.scene2d.ui.Label.computePrefSize(Label.java:162)
at com.badlogic.gdx.scenes.scene2d.ui.Label.scaleAndComputePrefSize(Label.java:147)
at com.badlogic.gdx.scenes.scene2d.ui.Label.getPrefWidth(Label.java:244)
at com.badlogic.gdx.scenes.scene2d.ui.Label.<init>(Label.java:75)
at com.unciv.ui.components.extensions.Scene2dExtensionsKt.toLabel(Scene2dExtensions.kt:258)
at com.unciv.ui.components.extensions.Scene2dExtensionsKt.toLabel$default(Scene2dExtensions.kt:246)
at com.unciv.ui.screens.multiplayerscreens.LobbyPlayerList$recreate$1.invokeSuspend(LobbyPlayerList.kt:108)
at com.unciv.ui.screens.multiplayerscreens.LobbyPlayerList$recreate$1.invoke(LobbyPlayerList.kt)
at com.unciv.ui.screens.multiplayerscreens.LobbyPlayerList$recreate$1.invoke(LobbyPlayerList.kt)
at com.unciv.utils.Concurrency$runBlocking$1.invokeSuspend(Concurrency.kt:47)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at com.unciv.utils.CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:173)
at com.unciv.utils.CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:173)
at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandling$1.invoke(CrashHandlingExtensions.kt:17)
at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandlingUnit$1.invoke(CrashHandlingExtensions.kt:33)
at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandlingUnit$1.invoke(CrashHandlingExtensions.kt:33)
at com.unciv.utils.CrashHandlingDispatcher.dispatch$lambda$0(Concurrency.kt:173)
at com.unciv.utils.CrashHandlingDispatcher$$Lambda$91/0x0000000840116840.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.18/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.18/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.18/Thread.java:829)
terminated by signal SIGABRT (Abort)