mkdasher / mupen64-rr-lua-

Mupen 64 Lua
GNU General Public License v2.0
33 stars 16 forks source link

Crash when closing the main window while debugging with Visual Studio #177

Open Wade7wastaken opened 8 months ago

Wade7wastaken commented 8 months ago

Steps:

  1. Start debugging mupen with Visual Studio. Other debuggers might work for this but I don't know.
  2. Open settings (Options -> Settings). This is the only way I've found to make this crash reliable.
  3. Close the main window with either the x button or alt+f4
  4. Observe crash in Visual Studio

image

I know this is a crash in an nvidia dll, and it might not be able to be reproduced by everyone, but it's annoying enough to me to open an issue about it. This issue is very low priority because it really only affects debugging.

There are also a few other crashes I've encountered while closing mupen. I can't find any consistent way to reproduce these, but they were both from closing mupen right after loading a rom.

image image

Aurumaker72 commented 7 months ago

A similar but not identical crash happens inside GetMessage, withSTATUS_FATAL_USER_CALLBACK_EXCEPTION

Aurumaker72 commented 7 months ago

This is caused by lack of synchronization when pushing VI and frame times to the circular buffers (circular_push)

Aurumaker72 commented 7 months ago

Can't repro any crashes related to this after 87313382a1cbf76967db551bde843c9769027313

Aurumaker72 commented 7 months ago

Now it's crashing in nvidia usermode driver

Aurumaker72 commented 7 months ago

Problem comes at least partially from emu thread not being closed before exiting.

The emu thread keeps barreling along while main thread is calling C++ destructors, and it rips various resources from right under its feet

Aurumaker72 commented 7 months ago

This issue comes from Direct64, not sure how much can be done here.

grafik