-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Freezes during "world migrations for FXMaster" #144
Comments
Thanks for the report. The exported world helped a lot with figuring out what the problem was. It's a pretty nasty bug... During a recent refactoring, I changed the way that drawing the weather effects is initially performed. That resulted in the drawing not waiting for any necessary migrations to be performed anymore. Usually, you would not notice this because the migration is quite fast, so it's actually finished before the canvas even starts rendering. However, due to the pf2e migration happening in parallel, this becomes much slower and the canvas (including the weather effects) starts rendering before the migration is done. This means, the weather effects start rendering with the old (pre migration) settings. In particular, the density value from before the migration is a value that can be somewhere between 50 and 10000, depending heavily on the dimensions of the scene (larger scenes have larger values). After the migration, it's usually a value between 0.001 and 2, independent of the scene's dimensions. That means, with the old values still present, the density is actually interpreted as a huge value, much larger than computers can practically handle. With the new FXMaster version, the density is roughly equivalent to the number of particles per grid unit. So for example, in your "The Floating Market" scene, which is the scene that's currently active in that world, there is a stars weather effect with a density of 7800. The dimensions of the scene are 7265 x 7265 pixels and the grid size is 110 pixels. That means, FXMaster would be trying to spawn about 7265 / 110 x 7265 / 110 x 7800 ≈ 34,023,616 star particles, which is so many that the browser tab crashes (there are an additional ~21,810 bats, but that's just icing on the cake 😆). I have a fix for this problem, which basically prevents the drawing of the effects until the migration has finished, again. I'll push it and create a release as soon as possible. |
Expected Behavior
My browser should not freeze during the world migration, and the world migration should not take over an hour to complete.
Current Behavior
My browser tab (Firefox) froze during the world migration for FXMaster from Foundry v8 to v9 on the Forge for about an hour and a half before I gave up and closed the tab.
Steps to Reproduce
Context
I fixed the issue by using a script to clear FXMaster effects on my scenes before re-enabling the module and trying again.
Also, I included a zip of an exported version of my world before I updated to v9 if you want to dig around in it.
Export World.zip
Version
v2.1.0
Foundry VTT Version
v9
Operating System
Windows
Browser / App
Firefox
Game System
pf2e
Relevant Modules
No response
The text was updated successfully, but these errors were encountered: