ldtk icon indicating copy to clipboard operation
ldtk copied to clipboard

Crash when opening layer rules

Open aleokdev opened this issue 3 years ago • 4 comments

Occurs every time, even when restarting, can't figure out why.

Stack:

LDtk version: 1.1.1-64bits
Cannot read properties of null (reading 'relPath')
TypeError
TypeError: Cannot read properties of null (reading 'relPath')
    at _tilesetCompatible (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222590:16)
    at file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222647:17
    at Array.sort (<anonymous>)
    at ui_modal_panel_EditAllAutoLayerRules.updateFullPanel (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222646:8)
    at new ui_modal_panel_EditAllAutoLayerRules (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222007:7)
    at HTMLAnchorElement.<anonymous> (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:185414:6)
    at HTMLAnchorElement.dispatch (/tmp/.mount_LDtk 19WNShp/resources/app.asar/assets/js/jquery.min.js:2:43064)
    at HTMLAnchorElement.v.handle (/tmp/.mount_LDtk 19WNShp/resources/app.asar/assets/js/jquery.min.js:2:41048)

Processes:

#0 App
 |--- #21 page.Editor
       |--- #22 misc.FileWatcher
       |--- #23 display.WorldRender
       |--- #24 display.LevelRender
       |--- #25 display.Camera
       |--- #26 display.Rulers[--]
       |--- #27 tool.SelectionTool[--]
       |--- #28 tool.lt.DoNothing[--]
       |--- #29 WorldTool
       |--- #30 tool.PanView[--]
       |--- #59 tool.lt.DoNothing[--]
       |--- #86 ui.modal.panel.EditAllAutoLayerRules

Log:

[RENDER]       Rendering world bg...
[FILE]         Loading HTML template editLayerDefs
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[EVENT]        LayerDefChanged 6
[EVENT]        LevelJsonCacheInvalidated
[RENDER]       Rendering world bg...
[RENDER]       Rendering world level data.Level.L0_0(#0)...
[RENDER]       Rendering world level fields data.Level.L0_0(#0)...
[EVENT]        LayerDefChanged 6
[RENDER]       Rendering world bg...
[RENDER]       Rendering world level data.Level.L0_0(#0)...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[FILE]         Loading HTML template editAppSettings
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[FILE]         Loading HTML template editTilesetDefs
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[FILE]         Loading HTML template editAllAutoLayerRules
[GENERAL]      Page started: page.CrashReport()
[FILE]         Loading page template: crashReport from /tmp/.mount_LDtk 19WNShp/resources/app.asar/assets/tpl/pages/crashReport.html
[ERROR]        Cannot read properties of null (reading 'relPath') (TypeError)
[ERROR]        TypeError: Cannot read properties of null (reading 'relPath')
    at _tilesetCompatible (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222590:16)
    at file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222647:17
    at Array.sort (<anonymous>)
    at ui_modal_panel_EditAllAutoLayerRules.updateFullPanel (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222646:8)
    at new ui_modal_panel_EditAllAutoLayerRules (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:222007:7)
    at HTMLAnchorElement.<anonymous> (file:///tmp/.mount_LDtk%2019WNShp/resources/app.asar/assets/js/renderer.js:185414:6)
    at HTMLAnchorElement.dispatch (/tmp/.mount_LDtk 19WNShp/resources/app.asar/assets/js/jquery.min.js:2:43064)
    at HTMLAnchorElement.v.handle (/tmp/.mount_LDtk 19WNShp/resources/app.asar/assets/js/jquery.min.js:2:41048)

[GENERAL]      
#0 App
 |--- #21 page.Editor
       |--- #22 misc.FileWatcher
       |--- #23 display.WorldRender
       |--- #24 display.LevelRender
       |--- #25 display.Camera
       |--- #26 display.Rulers[--]
       |--- #27 tool.SelectionTool[--]
       |--- #28 tool.lt.DoNothing[--]
       |--- #29 WorldTool
       |--- #30 tool.PanView[--]
       |--- #59 tool.lt.DoNothing[--]
       |--- #86 ui.modal.panel.EditAllAutoLayerRules
 |--- #87 page.CrashReport

[FILE]         Cleared all file watches

aleokdev avatar Apr 12 '22 20:04 aleokdev

Thanks for reporting this one. Could you please send me your LDtk project including levels (if saved separately): [email protected]

This would help a lot investigating the case.

deepnight avatar Apr 13 '22 09:04 deepnight

Sorry, but I deleted the files yesterday and now I can't replicate the issue :frowning_face: My bad. I should've uploaded them to the report instead.

aleokdev avatar Apr 13 '22 10:04 aleokdev

I added a check, but I couldn't figure out the exact cause of the crash 🤔

It seems like some Tileset was invalid or null for some weird reason. Did you do anything fancy in the project tilesets?

deepnight avatar Apr 14 '22 15:04 deepnight

I did delete and re-add the tilesets before using them, but I think that was before adding the layer.

aleokdev avatar Apr 14 '22 15:04 aleokdev

Possibly fixed in 1.2.0

deepnight avatar Dec 23 '22 15:12 deepnight