mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

PinballY crashes when DMD enabled in the app #245

Open drivin33 opened 2 weeks ago

drivin33 commented 2 weeks ago

For the past 3 months or so, I’ve been having an issue with 64-bit PinballY Beta 6 crashing seemingly at random when in attract mode. Prior to this issue, PinballY ran fine for several years. Sometimes PinballY will crash after 10 minutes, other times after an hour or two, but eventually it will crash. After hours of troubleshooting I was able to trace the problem to my real DMD. When I turn off DMD support in PinballY, it never crashes.

So, I renamed the PinballY folder and did a restore from a backup done in April (again 64-bit beta 6). On that backup, the DMD was enabled in PinballY so I kept it enabled, left the cab in attract mode for several hours and it did not crash. To be sure, on 3 or 4 other occasions, I left the cab on for several hours in attract mode and PinballY never crashed. So I then installed the latest beta 9 into the same folder as the restored beta 6 version, and the crashing resumed as I previously described.

I’m running the most recent version of Windows 11. I typically only update the cab with Windows updates once or twice a year, but I updated after this issue appeared it thinking that could be the problem but it wasn’t. Not sure if it matters but I’m running Freezy’s latest dmd extensions (2.03).

As I said, this issue suddenly arose about 3 months ago and have no idea why as I can’t think of any changes I would have made to the cab that would have affected PinballY. The only changes would have been updating Freezy’s DMD Extensions but I can’t recall if the timing of one of those upgrades coincided with this Pinball Y issue.

mjrgh commented 2 weeks ago

Given that it only crashes when the real DMD is enabled, it's probably crashing in the Freezy DLL, or in the physical-device-specific DLL that it calls. If it only happens with PinballY after a certain version, it must be some interaction between PinballY and Freezy that's triggering it.

These sorts of things are practically impossible to debug on my end, I'm afraid, since they're so configuration-dependent. One thing you can try to narrow things down a bit more is to try older versions of Freezy and/or the device DLL for your DMD, especially if there's any hope that you can reconstruct the update history that you applied there. If you can track it down to a specific version update of the Freezy DLL or the device DLL, it might be possible for Freezy or the device vendor to figure out what's going wrong, since you can point them to the exact version where the bug appears. Freezy uses git so he has a full history of exactly what source code changes were made in each release; hopefully the device DLL writer does likewise. Sometimes these things can be tracked down by identifying what changed in the code where it broke.

Another thing that you could do on your end to help diagnose it is grab the source versions of PinballY and Freezy, compile everything in the Debug configuration, and run it under the debugger until it crashes. That should give you the exact location of the crash. If the crash is in PinballY code, you can point me to where it's happening, and I can take a look. If it's in Freezy code, you can send the info to Freezy and he can take a look. The crash location might not be enough by itself to identify the cause, but it at least can point to a next step to investigate.