Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Race or timing condition with Attract Mode start up and GMC reading machine variables

46 views
Skip to first unread message

Needlebat

unread,
Jan 21, 2025, 7:10:42 PMJan 21
to MPF Users

With minimum mpf/gmc configuration per Anthony's first 3 videos with Attract mode working as expected.

During start up of mpf, Godot can produce the following warning:

23:37:58.855 : WARNING : Carousel<MPFCarousel:attract> : No active mode 'attract', carousel will not function until that mode is active.

Attract mode subsequently starts, and Godot displays Attract mode slides, however machine variables high scores player 1 through 4, and credits / FreePlay are not displayed. mpf monitor shows these variables as loaded and containing the expected values.

Investigation shows that significantly reducing the priority of the Godot executable before launching avoids this behaviour, presumably because mpf has sufficient time to do whatever is necessary for Godot to be able to read machine variables / start Carousel.

This behaviour only noticed on low specification Linux machines, but may affect suitably unimpressive windows systems.

As a workaround, mpf can be started with higher priority, such as nice -n -20 mpf 

Anthony van Winkle

unread,
Jan 22, 2025, 6:57:56 PMJan 22
to MPF Users
Hmm, this is a very interesting problem. MPF and GMC startup routines are blocked until a connection is made. GMC processes events from MPF sequentially but on a separate thread, so it's maybe possible that the slide play event is coming through before all the machine variables are being processed, but I'm not certain how that would work.

Can you collect verbose logs and share them so we can see how the events are going? Run mpf -v -V and in godot under the GMC panel, under Show All Loggers set BCP Server to Debug and share both the MPF and GMC logs here.

Ideally a low-power machine will be running a compiled binary executable of the GMC project and not through the Godot editor or realtime engine, so this shouldn't apply to finished machines but we can still investigate :)

Needlebat

unread,
Jan 22, 2025, 7:44:30 PMJan 22
to MPF Users
Thank you Anthony, logs attached.
2025-01-23-00-28-05-mpf-pbgm1007.log
godot.log
Reply all
Reply to author
Forward
0 new messages