Repository navigation
Logging levels, throttles and diagnostics for the PinMAME engine - #43
Merged
Merged
Conversation
- Unmapped coils and unknown switches are warnings, once per id; dropped frames and a full audio queue are throttled. - A missing ROM is one clear warning naming the ROM and the folders searched; an unknown ROM name or a missing native library is a warning too, reported through IGamelogicStartupStatus. - Native callbacks catch what they throw instead of letting it reach native code, and name their thread "PinMAME". - The engine describes itself for error reports: ROM, libpinmame version, folders and whether the ROM is in them, run state, audio, displays, settings.
[Medium impact] The PR appears safe to merge after its stated VPE API dependency. SummaryThe PR adds quieter logs, startup failure details, and session diagnostics for PinMAME.
Reviews (3) · Last reviewed commit: "pinmame: Take out csproj changes that we..." · Reviewed by Greptile |
The main-thread queue is drained even when the game isn't running, so the diagnostics refresh a ROM that stops before starting queues isn't lost. The once-per-id warnings belong to the engine instance, so one table's unmapped coils don't hide the next table's.
It forwards libpinmame's log messages as an event.
ROM loading, wrong checksums and missing files show up as PinMAME.Native, throttled. Its errors are warnings: they're about the ROM or the setup, which the user fixes, not VPE.
The previous commit picked up unrelated, unfinished changes to the build setup; only the version bump stays.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the logging and error reporting work. It follows the level policy from freezy/VisualPinball.Engine#590: errors are for VPE bugs, and problems the user or table author can fix are warnings. What the plugin knows goes into the session diagnostics that error reports carry.
Unmapped coils and unknown switches are warnings, once per id; dropped frames and a full audio queue are throttled.
A missing ROM is one clear warning naming the ROM and the folders searched; an unknown ROM name or a missing native library is a warning too, reported through IGamelogicStartupStatus.
Native callbacks catch what they throw instead of letting it reach native code, and name their thread "PinMAME".
The engine describes itself for error reports: ROM, libpinmame version, folders and whether the ROM is in them, run state, audio, displays, settings.
Bumps PinMame to 1.1.1 (Forward libpinmame's log messages as a formatted event vpinball/pinmame-dotnet#47) and writes libpinmame's own messages to the log as
PinMAME.Native, throttled: loading, wrong checksums, missing files. Its errors are warnings, since they're about the ROM or the setup.Depends on freezy/VisualPinball.Engine#590 (the plugin API:
IPluginLog,IDiagnosticsSource,IGamelogicStartupStatus), so merge that first.