Lifecycle Hooks and Sandbox
When hooks run, how failures are isolated, and what cleanup is required.
Roneat Studio Pro triggers lifecycle hooks at specific moments.
Use the right hook for the right job.
Available hooks
Runs as soon as the module is imported.
Use it for early setup and background preparation.
Runs when the application is fully loaded and visible.
Use it for UI injection, windows, menus, and plugin-facing controls.
on_project_open
Runs when the user opens a .roneat project.
Use it to inspect or adapt project state.
on_project_save
Runs just before the current project is written to disk.
Use it for validation or last-minute state updates.
Runs when the plugin is disabled or uninstalled.
Use it to stop threads, close files, and release external resources.
Sandbox behavior
The v2.2.0 engine isolates plugin failures from the main app.
In practice, the sandbox is designed to be crash-resistant.
If a plugin raises a critical exception:
the traceback is logged to the GUI console
the plugin is disabled safely
the main app stays stable
user data stays protected
Automatic state reversion
Theme and language changes are reversible.
If your plugin changes the UI state and is later disabled, Roneat Studio restores the original defaults automatically.
Threading guidance
Never block the main thread with a permanent loop.
Use a background worker instead.
Cleanup checklist
Before unload completes, make sure you:
stop custom audio playback if needed
If a plugin fails, the app should survive. If a plugin unloads, the system should return to a clean state.