Animated-Java / animated-java

A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.
Other
156 stars 25 forks source link

[BUG] Exporting after opening multiple blueprints simultaneously fails #207

Closed TheAfroOfDoom closed 2 months ago

TheAfroOfDoom commented 2 months ago

Describe the bug

If you open multiple blueprints at once through the File > Open Model option in Blockbench and try to export any blueprint (except the most recently opened one), AJ fails and gives an error in the console.

To Reproduce Steps to reproduce the behavior:

  1. Open multiple (>= 2?) blueprints at once by selecting multiple in the Open Model file window
  2. Select a different blueprint than the most recently opened one (not the right-most tab)
  3. Click export
  4. Export fails (see console)

Note no error when you export the most recently opened blueprint

Expected behavior

Export with no issue even when you open multiple blueprints simultaneously

Error Message

blueprintSettingsDialog.ts:76 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'set')
    at setSettings (<anonymous>:19382:24)
    at SvelteDialog.onConfirm (<anonymous>:19415:9)
    at SvelteDialog.close (dialog.js:720:22)
    at exportProject (<anonymous>:41931:20)

Screenshots

bug-open-multiple-blueprints-0

Desktop (please complete the following information):

Additional context

This is actually slightly different from the issue I mentioned in Discord but may be related. I couldn't immediately reproduce the one I mentioned.

something about a max call stack size

TheAfroOfDoom commented 2 months ago

export does not fail if you open each blueprint one-by-one. behavior is as expected in this case (even if you keep multiple open)