Skip to content

Main thread: running every script’s onScriptLoad and onStart - #581

Merged
DragonSlayer62 merged 1 commit into
UOX3DevTeam:feature/libmozjs-115-13-2-cleanupfrom
DragonSlayer62:feature/libmozjs-115-13-2-cleanup
Aug 9, 2026
Merged

Main thread: running every script’s onScriptLoad and onStart#581
DragonSlayer62 merged 1 commit into
UOX3DevTeam:feature/libmozjs-115-13-2-cleanupfrom
DragonSlayer62:feature/libmozjs-115-13-2-cleanup

Conversation

@DragonSlayer62

Copy link
Copy Markdown
Contributor

During startup, two threads were using the same SpiderMonkey context: Main thread: running every script’s onScriptLoad and onStart. Console thread: running Console.Registration() and compiling console-script registration functions. SpiderMonkey 115 cannot safely perform those operations concurrently on the same context, causing the crash inside js::LifoAlloc::release(). I changed startup order so UOX3 now:
Runs all onScriptLoad events.
Runs all object and region onStart events.
Registers the JavaScript console commands on the main thread. Starts the console input thread only after that JavaScript work finishes. Nothing was removed or disabled. Champions, the Event Manager, console commands, and console-script registration remain enabled.

During startup, two threads were using the same SpiderMonkey context:
Main thread: running every script’s onScriptLoad and onStart.
Console thread: running Console.Registration() and compiling console-script registration functions.
SpiderMonkey 115 cannot safely perform those operations concurrently on the same context, causing the crash inside js::LifoAlloc::release().
I changed startup order so UOX3 now:
Runs all onScriptLoad events.
Runs all object and region onStart events.
Registers the JavaScript console commands on the main thread.
Starts the console input thread only after that JavaScript work finishes.
Nothing was removed or disabled. Champions, the Event Manager, console commands, and console-script registration remain enabled.
@DragonSlayer62
DragonSlayer62 merged commit 52e6717 into UOX3DevTeam:feature/libmozjs-115-13-2-cleanup Aug 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant