Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing core gridTemplates setting when there is no scene causes an error in the console #10915

Closed
2 of 6 tasks
CarlosFdez opened this issue May 13, 2024 · 0 comments
Closed
2 of 6 tasks
Assignees
Labels
bug Functionality which is not working as intended canvas Issues related to the PIXI canvas, rendering, and other WebGL functions.

Comments

@CarlosFdez
Copy link

CarlosFdez commented May 13, 2024

What happened?

Users have reported an error in the console as part of my workaround for #10683. After tracking it down it appears the error occurs in core foundry, and only on the first world load, because its triggered by the onChange event.

What ways of accessing Foundry can you encounter this issue in?

  • Native App (Electron)
  • Chrome
  • Firefox
  • Safari
  • Other

Reproduction Steps

When you change the gridTemplates setting (Grid Based Template Shapes) and there is no scene active, there is an error in the console.

What core version are you reporting this for?

12.322

Relevant log output

Uncaught (in promise) TypeError: canvas.dimensions is null
    _draw http://localhost:30001/scripts/foundry.js:33299
    _draw http://localhost:30001/scripts/foundry.js:33687
    _draw http://localhost:30001/scripts/foundry.js:40365
    <anonymous> http://localhost:30001/scripts/foundry.js:33148
    draw http://localhost:30001/scripts/foundry.js:33145
    onChange http://localhost:30001/scripts/foundry.js:40381
    _onUpdate http://localhost:30001/scripts/foundry.js:21748
    handleUpdateDocuments http://localhost:30001/scripts/foundry-esm.js:57511
    documents http://localhost:30001/scripts/foundry-esm.js:57517
    #handleUpdateDocuments http://localhost:30001/scripts/foundry-esm.js:57517
    _updateDocuments http://localhost:30001/scripts/foundry-esm.js:57400
    update http://localhost:30001/scripts/foundry-esm.js:12166
    updateDocuments http://localhost:30001/scripts/foundry-esm.js:11303
    update http://localhost:30001/scripts/foundry-esm.js:11413
    #setWorld http://localhost:30001/scripts/foundry.js:3396
    set http://localhost:30001/scripts/foundry.js:3362
    _updateObject http://localhost:30001/scripts/foundry.js:86114
    _onSubmit http://localhost:30001/scripts/foundry.js:6639
    _activateCoreListeners http://localhost:30001/scripts/foundry.js:6574
    _render http://localhost:30001/scripts/foundry.js:5840
    _render http://localhost:30001/scripts/foundry.js:6546
    _render http://localhost:30001/scripts/foundry.js:73844
    render http://localhost:30001/scripts/foundry.js:5767
    _onSettingsButton http://localhost:30001/scripts/foundry.js:91570

Bug Checklist

  • The issue occurs while all Modules are disabled

Tangential

I don't know if I should report this, but it seems that the onChange event in the registered setting still triggers if you're changing a setting to the default when its currently unset, even though there is no actual change.

@CarlosFdez CarlosFdez added the bug Functionality which is not working as intended label May 13, 2024
@dev7355608 dev7355608 added the canvas Issues related to the PIXI canvas, rendering, and other WebGL functions. label May 15, 2024
@dev7355608 dev7355608 self-assigned this May 15, 2024
@dev7355608 dev7355608 added this to the V12 User Testing 4 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended canvas Issues related to the PIXI canvas, rendering, and other WebGL functions.
Projects
Status: Done
Development

No branches or pull requests

2 participants