Skip to content

Fix NVIDIA GLSL crash during ROM loading - #157

Closed
sabino wants to merge 0 commit into
dciabrin:masterfrom
sabino:agent/fix-nvidia-glsl-rom-loading
Closed

Fix NVIDIA GLSL crash during ROM loading#157
sabino wants to merge 0 commit into
dciabrin:masterfrom
sabino:agent/fix-nvidia-glsl-rom-loading

Conversation

@sabino

@sabino sabino commented Jul 24, 2026

Copy link
Copy Markdown

Summary

  • keep GnGeo's ROM-loading progress rendering on the thread that owns the SDL/OpenGL context
  • replace the progress worker with throttled synchronous updates
  • apply the GnGeo fix when ngdevkit fetches its bundled emulator source

Root cause

GnGeo creates the OpenGL context on the main thread, but its ROM-loading progress worker also calls screen_update(). NVIDIA's GL dispatch crashes when that worker tries to render through a context owned by another thread.

The old progress worker already disabled rendering on macOS and MinGW for this reason, but Linux remained affected. The updated path renders progress from the caller thread and throttles updates to avoid slowing down ROM loading.

This reproduces the behavior reported in #35 on a current Linux/NVIDIA environment.

Validation

  • reproduced with packaged GnGeo 0.8.1+202606021654, NVIDIA driver 580.159.03, and the three-pass qcrt-flat.glslp preset: the process printed Catch a sigsegv during ROM loading and exited 255
  • built GnGeo's current ngdevkit branch with this patch
  • reran the same homebrew ROM and qcrt preset: every ROM region loaded, CPU initialization completed, and the emulator remained running
  • reran the same ROM with the software blitter to cover the changed progress path
  • verified the patch applies to a fresh GnGeo checkout and the ngdevkit integration is idempotent when the patch is already present

@sabino sabino closed this Jul 24, 2026
@sabino
sabino force-pushed the agent/fix-nvidia-glsl-rom-loading branch from 8fc2535 to b36a345 Compare July 24, 2026 14:56
@sabino
sabino deleted the agent/fix-nvidia-glsl-rom-loading branch July 24, 2026 14:57
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