I've managed to create a demo project that doesn't quite replicate the same issue mentioned here. But it does demonstrate Obi failing quite spectacularly when attempting to use a global solver object as described earlier.
If burst is used, it spams errors about native stuff not being released and jobs not being scheduled properly. If Oni is used, it outright crashes.
The script used to produce the bug isn't doing anything overly spooky, just creating a ObiSolver marked as "DontDestroyOnLoad".
I'll email you with instructions.
My email provider appears to bug out whenever I try to upload a file that is too large. I'll upload the repro project here instead.
To reproduce:
1. Open Scenes/SampleScene
2. Press play.
You'll see:
- Errors flooding the console relating to jobs and native memory.
- The generated rope net falls apart.
Notes:
- Burst and Jobs should be installed in the project.
- I've modified RopeNet.cs to use the "global solver" defined in TriggerObiBug.cs
- If you uncomment the line on line 20, which causes the ObiSolver to use Oni instead of Burst, it will crash Unity shortly after pressing play.
- These aren't the same symptoms of the bug mentioned earlier but they likely have a common cause.
It appears that I am neither able to email you the project, nor upload it here.
Instead I'll share the two scripts, TriggerObiBug.cs and RopeNet.cs, as well as the scene.
Attempting to add attachment to this thread...
After testing, it appears DontDestroyOnLoad isn't what's important to triggering the bug in the scene provided. If you comment out the line, restart the editor, and re-run, it'll still freak out.
Now it seems like there was a bit of a false alarm with some of this. In the code I was inadvertently adding the same solver twice to the same updater, which caused a ton of errors to appear.
But after I fixed this problem, I tried re-adding the DontDestroyOnLoad() stuff, which then causes different errors to appear after stopping a play session.
If burst is used, it spams errors about native stuff not being released and jobs not being scheduled properly. If Oni is used, it outright crashes.
The script used to produce the bug isn't doing anything overly spooky, just creating a ObiSolver marked as "DontDestroyOnLoad".
I'll email you with instructions.
My email provider appears to bug out whenever I try to upload a file that is too large. I'll upload the repro project here instead.
To reproduce:
1. Open Scenes/SampleScene
2. Press play.
You'll see:
- Errors flooding the console relating to jobs and native memory.
- The generated rope net falls apart.
Notes:
- Burst and Jobs should be installed in the project.
- I've modified RopeNet.cs to use the "global solver" defined in TriggerObiBug.cs
- If you uncomment the line on line 20, which causes the ObiSolver to use Oni instead of Burst, it will crash Unity shortly after pressing play.
- These aren't the same symptoms of the bug mentioned earlier but they likely have a common cause.
It appears that I am neither able to email you the project, nor upload it here.
Instead I'll share the two scripts, TriggerObiBug.cs and RopeNet.cs, as well as the scene.
Attempting to add attachment to this thread...
After testing, it appears DontDestroyOnLoad isn't what's important to triggering the bug in the scene provided. If you comment out the line, restart the editor, and re-run, it'll still freak out.
Now it seems like there was a bit of a false alarm with some of this. In the code I was inadvertently adding the same solver twice to the same updater, which caused a ton of errors to appear.
But after I fixed this problem, I tried re-adding the DontDestroyOnLoad() stuff, which then causes different errors to appear after stopping a play session.