Repository navigation
Conversation
thibautgnt
left a comment
There was a problem hiding this comment.
Thanks @isaacsa2, this is a really useful troubleshooting switch, and passing --no-plugins from one shared argument prefix (so a new duty, a saved situation and a tutorial all get it, with tests for each) is clean. A few things before merging:
- Conflict with main, only in
crates/omsi-launcher-core/src/lib.rs, insettings_from_text_on(main 2454-2456 / PR 2434-2435). #3309 (unified UI theme) splitnav_lightandnav_classic_2dout of the long boolean arm onto their own lines. Resolution: take main's side as is (the long arm without them,"nav_light" => ...,"nav_classic_2d" => ...) and only change main's"info_bar" => v[&k] = json!(b(val)),into"info_bar" | "disable_plugins" => v[&k] = json!(b(val)),. Do not keep the PR's version of the long arm, it would reintroducenav_light/nav_classic_2dthere.app.yml,tests.rsandsettings-schema.jsauto-merge. With that resolution size budget, arch guard and the locale check pass. - The game respawns itself without the flag, so plugins come back in the middle of a troubleshooting session:
crates/omsi-app/src/app_impl/saves.rs:78(load_quicksave, the quickload) andsaves.rs:170(restart_after_device_loss, which is exactly the kind of restart a freeze investigation hits) build a new command line from scratch.OMSI_NO_PLUGINSsurvived these because it is inherited from the environment, the new CLI switch is not. Fix: after the--situationarg in both places,if self.args.no_plugins { cmd.arg("--no-plugins"); }. - Translations: the two new texts (
app.yml:29911"Disable plugins" andapp.yml:29917, its help) have 5 languages (es, fr, pt, pt-pt, de) where the catalogue's texts carry all 29 (zh-tw, ru, ka and sr are missing, among others), so most players see the option in English. Please add the other 24.
Non-blocking:
- The help text could say that a game already running keeps its plugins until the next start, as the user guide does ("Starts the next game..." mostly says it already, so optional).
Test builds for 77ad24e
|
…rg#3309 navigation settings
chore: sync upstream main into disable-plugins PR branch
chore: sync latest main into PR openOMSI-org#3379 after locale fixes
|
Thanks for the detailed review! I've checked the latest branch state, and all three requested changes are now included in "77ad24e":
The PR test-build workflow for "77ad24e" also completed successfully. Native plugin loading/restoration testing is still pending, so I'm not claiming full runtime validation yet. Thanks again for catching the restart issue, especially the device-loss recovery path. That would have undermined the troubleshooting switch exactly when it was needed. The requested code changes are in place. Ready for another review! |
thibautgnt
left a comment
There was a problem hiding this comment.
Thanks @isaacsa2, all three points are done and the rest of the change is untouched, so this is good to go from my side.
- Conflict:
settings_from_text_onkeeps main's separatenav_lightandnav_classic_2darms and only addsdisable_pluginsnext toinfo_bar(crates/omsi-launcher-core/src/lib.rs:2455). It still merges cleanly with current main. - Restarts:
load_quicksaveandrestart_after_device_lossboth forward--no-pluginsnow (crates/omsi-app/src/app_impl/saves.rs:79 and :171), so plugins stay off for the whole session. - Translations: both new texts have all 29 languages, and the locale check vs current main passes (+2 keys, no errors, no warnings).
Non-blocking:
- The branch history still has the two temporary locale commits (a workflow and a script added, then removed by the bot commit). The final tree is clean, so a squash merge keeps them out of main.
What changes for the player?
Settings > General gains Disable plugins, off by default. Turning it on starts the next game without plugins; turning it off restores them on the next start. The choice is saved between launches and applies to a new duty, a saved situation and a tutorial.
This gives players a way to check whether a plugin is involved in a freeze without moving files or setting an environment variable. It does not establish that plugins caused a particular report. Normal OMSI bus scripts still run; features provided by plugins will be unavailable.
How to test
--no-plugins, and the log should say plugins are disabled for this session. Global Lua/compiled plugins, legacy OMSI plugins, vehicle Lua plugins and scenery Lua plugins should not load.OMSI_NO_PLUGINS=1remains an independent override, so unset that override when checking restoration.An existing game is not hot-unloaded. For the reported integration-stage freeze, compare the same map, bus and settings with only this option changed, and attach the new log. Discord and Steam have their own integration paths.
Screenshots
Before and after: the actual launcher UI served with the repository's mock fixtures, at the same 1280×720 viewport and General tab. The old version label comes from the fixture; these are interface checks, not a native game build.
What does this change, and why?
The launcher persists
disable_pluginsin settings.cfg and passes--no-pluginsthrough a shared argument prefix before the saved-game/tutorial early returns. The game keeps that choice for the session and checks it at global loading, vehicle attachment and lazy object-plugin driving. The existing environment override still works. No process-wide environment mutation is needed, and the normal bus-script runtime is unchanged.The label and help are in app.yml with Brazilian/European Portuguese, Spanish, French and German translations. The user guide explains the scope and restart requirement.
Validation
/proc/<pid>/stat. An isolated run of main's unchangedprocess_starthelper reproduces the sameNoneprecondition. No process-management code changes here.What could break?
Disabling plugins deliberately removes their features, including bus/map features supplied by Lua plugins. It does not disable normal OMSI scripts or diagnose every possible integration freeze. Native Windows legacy-plugin startup, real-map driving, Android, VR and multiplayer still need testing with the build artifacts.
Performance
No driving benchmark was available. This adds a saved launcher preference and session guards, with no renderer, GPU passes or allocation-policy change. There is no FPS improvement claim. The option is off by default; a same-map native performance comparison remains pending.
Checklist
cargo test --workspaceandcargo build --releasepass