Skip to content

Logging levels, throttles and diagnostics for the PinMAME engine - #43

Merged
freezy merged 5 commits into
masterfrom
feat/error-reporting
Oct 15, 2026
Merged

freezy merged 5 commits into
masterfrom
feat/error-reporting

Conversation

@freezy

@freezy freezy commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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.

- 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.
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge after its stated VPE API dependency.

Summary

The PR adds quieter logs, startup failure details, and session diagnostics for PinMAME.

  • PinMAME startup reports include ROM and engine details.
  • PinMAME callbacks stay contained and report their failures.
  • Unmapped PinMAME outputs and switches get clear warnings.
  • Repeated PinMAME messages no longer crowd out useful logs.
  • The PinMAME wrapper package is updated to version 1.1.1.

Reviews (3) · Last reviewed commit: "pinmame: Take out csproj changes that we..." · Reviewed by Greptile

Comment thread VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs Outdated
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.
@freezy
freezy merged commit ad7cd12 into master Oct 15, 2026
17 checks passed
@freezy
freezy deleted the feat/error-reporting branch October 15, 2026 19:22
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