JS root Variables and Run Once variables Randomly Reset During Testing
Describe the bug Root variables in my Global JS extensions as well as Run-Once variables can get reset in the NCalc Tester as well as in object Text/Value binding areas within Dash Studio
Simhub version 9.9.3 and 9.9.4b1
Third party plugins RSC - iRacing Extra Properties
To Reproduce Steps to reproduce the behavior:
- Create the following code in the NCalc Tester (as Javascript) or within the code of an object's text, value, etc. in Dash Studio. You can also call code from Global JS Extensions.
- Watch the number increase as expected but reset randomly while running. Usually the variable will reset before reaching 40, but sometimes it won't reset until reaching 3000. It is typically unpredictable.
Expected behavior The variables containing data should not reset unexpectedly.
Videos https://github.com/user-attachments/assets/41be1b17-d5d4-4709-8411-77efae2b530a https://github.com/user-attachments/assets/bdff32b9-5c55-40a1-abd0-2750aca66d80 https://github.com/user-attachments/assets/8dc2d8b1-b784-40cd-96b7-3334d1f04053
Log files SimHub.txt
Additional context It seems to occur more often/reliably while playing a SimHub replay. Another user on the SimHub Discord noticed the same behavior with and without a replay running. When using the same code in a live dashboard, the data seems to hold it's values. In tests, the dashboard counted to 50,000+ while the test windows were regularly resetting. While it doesn't seem to hurt 'real' data while racing, it does make code testing quite a nightmare depending on the code.
Edit: I am VoiD on the SimHub Discord. Here is a link to the middle of the Discord conversation https://discord.com/channels/299259397060689920/306850703299575809/1400069192132071464