deepnight / ldtk

Modern, lightweight and efficient 2D level editor
https://ldtk.io
MIT License
3.43k stars 190 forks source link

Crash: Missing layer instance for 2. #1143

Open 1dmrg1 opened 1 week ago

1dmrg1 commented 1 week ago

first time reporting a bug, so apologies if I mess something up. Here is the crash log:

Stack:

LDtk version: 1.5.3-64bits
Missing layer instance for 2
Error

Processes:

#0 App
 |--- #57 page.Editor
       |--- #58 misc.FileWatcher
       |--- #59 display.WorldRender
       |--- #60 display.LevelRender
       |--- #61 display.Camera
       |--- #62 display.Rulers[--]
       |--- #63 tool.SelectionTool[--]
       |--- #64 tool.lt.DoNothing[--]
       |--- #65 WorldTool
       |--- #66 tool.PanView[--]
       |--- #67 tool.lt.IntGridTool[--]

Log:

[LOAD]         Loading project HiveMakerMap.ldtk...
[LOAD]           Project appBuildId=473703 appJsonVersion=1.5.3 jsonVersion=1.5.3
[LOAD]         Loading complete.
[GENERAL]      Page started: page.Editor()
[FILE]         Loading page template: editor from C:/Users/1dmrg1/AppData/Local/Programs/ldtk/resources/app.asar/assets/tpl/pages/editor.html
[FILE]         Cleared all file watches
[EVENT]        LayerInstanceSelected 36
[FILE]         Reloading tileset: WorldTileMap path=../../Pictures/TestTileMap.png
[FILE]          -> Reload result: FileNotFound
[FILE]          -> pixelData: need rebuild
[EVENT]        TilesetImageLoaded
[EVENT]        ProjectSelected
[WARNING]      Full level render requested
[RENDER]       Rendering all world...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bounds...
[RENDER]       Rendering world level data.Level#14b98850-73f0-11ef-8586-bfc5d2c61524 "Level_0"...
[RENDER]       Rendering world level fields data.Level#14b98850-73f0-11ef-8586-bfc5d2c61524 "Level_0"...
[RENDER]       Rendered level UI
[RENDER]       Rendering world bg...
[GENERAL]      Progress completed: "HiveMakerMap.ldtk: Project..." (0.1s)
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[FILE]         Cleared all file watches
[EVENT]        LayerInstanceSelected 36
[FILE]         Reloading tileset: WorldTileMap path=../../Pictures/TestTileMap.png
[FILE]         Loading atlas image: ../../Pictures/TestTileMap.png...
[CACHE]        Caching image ../../Pictures/TestTileMap.png...
[CACHE]         -> identified as Png
[CACHE]         -> base64 5268
[CACHE]         -> pixels 240x240
[FILE]          -> Loaded 3950 bytes.
[FILE]          -> Decoded 240x240 pixels.
[FILE]          -> Old size: 240x240 -> 240x240
[WARNING]      Tileset WorldTileMap remapping (image size changed)...
[FILE]          -> Reload result: Ok
[FILE]          -> pixelData: Ok
[EVENT]        TilesetImageLoaded
[EVENT]        ProjectSelected
[RENDER]       Rendered level UI
[GENERAL]      Page started: page.CrashReport()
[FILE]         Loading page template: crashReport from C:/Users/1dmrg1/AppData/Local/Programs/ldtk/resources/app.asar/assets/tpl/pages/crashReport.html
[ERROR]        Missing layer instance for 2 (Error)
[ERROR]        undefined

[GENERAL]      
#0 App
 |--- #57 page.Editor
       |--- #58 misc.FileWatcher
       |--- #59 display.WorldRender
       |--- #60 display.LevelRender
       |--- #61 display.Camera
       |--- #62 display.Rulers[--]
       |--- #63 tool.SelectionTool[--]
       |--- #64 tool.lt.DoNothing[--]
       |--- #65 WorldTool
       |--- #66 tool.PanView[--]
       |--- #67 tool.lt.IntGridTool[--]
 |--- #72 page.CrashReport

[FILE]         Cleared all file watches
1dmrg1 commented 1 week ago

Screenshot: Screenshot 2024-11-01 203010

I believe I was changing the settings with one of the layers before it crashed. I have no idea how to reproduce it from scratch, but the crash now happens whenever I try and restore one of the project's backups by locating the original project's location.