Open ujjman opened 3 years ago
I was able to reproduce this also from current source and currently have two theories on what might be happening: Theory 1: the NUI Screen Editor creates temporary copies / saves of screen assets. While I can understand it does this when changes were made, this also seems to be the case if no screen was edited (or actively saved). I don't know why we would need this in that case. Theory 2: the NUI Screen Editor creates references to specific assets that we dispose of when going back to the main menu. No idea why we would need this kind of reference or why it's not cleaned up with everything else.
Interestingly, this not only happens on reloading the previous save game, but also when creating a completely new world. This could hint at some underlying weirdness in the editor related to clean up of the editor state between worlds (which might be tricky if remembering screen changes between worlds is considered a feature) or assets that can be affected by the editor a.k.a the NUI Screen Editor not being "restricted" to the active world's assets.
What you were trying to do
I was trying to use the Terasology's Developer tools feature (NUI Screen Editor)
What actually happened
NUI Screen Editor worked fine while using for the first time but when I exit the game(exit to main menu) and then try to use it again, the game crashes.
How to reproduce
Repro steps
Log details and game version
Game version - 5.1.1 and 5.2.0-rc-1
java.lang.IllegalStateException: Cannot reload disposed asset 'temp:4adbd0f6-3aa0-47f0-93f5-049f5c594ec5' at org.terasology.gestalt.assets.Asset.reload(Asset.java:108) at org.terasology.engine.rendering.nui.internal.LineRenderer.draw(LineRenderer.java:220) at org.terasology.engine.rendering.nui.internal.LwjglCanvasRenderer.drawLine(LwjglCanvasRenderer.java:242) at org.terasology.nui.canvas.CanvasImpl.drawLine(CanvasImpl.java:725) at org.terasology.nui.layouts.miglayout.MigLayout.onDraw(MigLayout.java:136) at org.terasology.nui.canvas.CanvasImpl.drawStyledWidget(CanvasImpl.java:442) at org.terasology.nui.canvas.CanvasImpl.drawWidget(CanvasImpl.java:428) at org.terasology.engine.rendering.nui.CoreScreenLayer.onDraw(CoreScreenLayer.java:209) at org.terasology.engine.rendering.nui.editor.layers.AbstractEditorScreen.onDraw(AbstractEditorScreen.java:147) at org.terasology.nui.canvas.CanvasImpl.drawStyledWidget(CanvasImpl.java:442) at org.terasology.nui.canvas.CanvasImpl.drawWidget(CanvasImpl.java:428) at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.render(NUIManagerInternal.java:577) at org.terasology.engine.core.modes.StateIngame.renderUserInterface(StateIngame.java:239) at org.terasology.engine.core.modes.StateIngame.render(StateIngame.java:223) at org.terasology.engine.core.subsystem.lwjgl.LwjglGraphics.postUpdate(LwjglGraphics.java:76) at org.terasology.engine.core.TerasologyEngine.tick(TerasologyEngine.java:510) at org.terasology.engine.core.TerasologyEngine.mainLoop(TerasologyEngine.java:462) at org.terasology.engine.core.TerasologyEngine.runMain(TerasologyEngine.java:438) at org.terasology.engine.core.TerasologyEngine.run(TerasologyEngine.java:404) at org.terasology.engine.Terasology.main(Terasology.java:179)
Computer details
Windows 10 RTX 3050 Ryzen 9