Skip to content

[🐧] Starting games with Mono 6.14 crashes after playing for some seconds #4803

Description

@Arrcival

Summary

On Linux, installing the latest available mono version (6.14, Fedora 44 defaults to 6.14 and downgrading is very very annoying) and running the latest versions of BizHawk, having a games running (tested on NDS games only) freeze both the game and BizHawk, hanging with some CPU usage, with absolutely no log.
I tested two different roms that crashed BizHawk the exact same way, using Fedora 44. A friend on Windows was able to run the same roms using BizHawk 2.11.1 without any issue.
I asked an another friend on NixOS to get BizHawk 2.11.1, get mono, and use the same ROM : it crashed the same way.
After some investigation we found out that building using nix-build from source prevents that problem, and the mono version used for the build is 6.12 instead of 6.14. Using distrobox with a fedora 43 (that uses mono 6.12 also fixes the issue)

nix-build way to fix (fedora)

dnf install nix
git clone https://github.com/TASEmulators/BizHawk
cd BizHawk
nix-build -A emuhawk-latest-bin
nix-store -qR ./result | grep -i mono # just to make sure the mono version is 6.12.x
./result/bin/emuhawk-monort-2.11.1

distrobox way to fix (fedora)

dnf install distrobox
distrobox create --name bizhawk-mono612 --image fedora:43
distrobox enter bizhawk-mono612
sudo dnf install mono-complete
mono --version # just to make sure it's 6.12.x
./BizHawk-2.11.1-linux-x64/EmuHawkMono.sh # from the given release

I tried also to play with Mono arguments, and from what I observed those two flags delays for a big the moment of the crash (it might take a minute or two instead of some seconds)

MONO_GC_PARAMS=nursery-size=64m,minor=simple MONO_THREADS_SUSPEND=preemptive

So there might be something going on with the garbage collector/mono threads?

Repro

  1. Be on Fedora 44 or any distro that pulls mono 6.14
  2. Use any NDS rom (I haven't tried if games other than DS ones hangs the same way)
  3. Start the rom, play for 2 to 45s ish and BizHawk will freeze, no logs.

Output

Unfortunately none.

Host env.

  • BizHawk 2.11.1; Fedora 44, Mono 6.14
  • BizHawk 2.10; Fedora 44, Mono 6.14
  • BizHawk 2.11.1; NixOS, Mono 6.14

Visual repro

A video that shows the issue on the TASVideos.org discord server

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions