dirkwhoffmann / virtualc64

VirtualC64 is a cycle-accurate C64 emulator for macOS
https://dirkwhoffmann.github.io/virtualc64
Other
342 stars 33 forks source link

V5b3 app crashes immediately after start #796

Closed ha24-1 closed 3 weeks ago

ha24-1 commented 1 month ago

Hi, the new version 5.0beta3 crashes immediately after start - please find full stacktrace attached. Latest V4.7 (240127) is installed but not running. Hope that helps!

Best regards Heiko

stackVc64_50b3.txt

dirkwhoffmann commented 1 month ago

Thanks for reporting! Unfortunately, I cannot see anything in the stack trace, as the executable contains no debug symbols. I'll compile a new version with debug symbols included...

dirkwhoffmann commented 1 month ago

Can you give v5.0b4 a try? Hopefully, it still crashes and the stack trace tells us where.

ha24-1 commented 1 month ago

Vc64_50b4_stacktrace.txt

Et voilà ! :-)

dirkwhoffmann commented 1 month ago

It crashes inside the GamePadManager. The culprit is line return gamePad.icon!

   func icon(slot: Int) -> NSImage {

        if let gamePad = gamePads[slot] {

            if gamePad.isMouse && parent.config.mouseModel >= 3 {
                return NSImage(named: "devPaddleTemplate")!
            } else {
                return gamePad.icon!
            }
        }

        return NSImage(named: "devGamepad1Template")!
    }
ha24-1 commented 1 month ago

.. fine! I detached the controller, but it still crashes... Let me know, if further investigations are necessary - tomorrow I will be there again. Thank you for your quick support!

(and for maybe sometimes later: v4.x crashes everytime on my machine, if Mac is suspended; this stacktrace please find attached ... ) Vc64_47_stacktrace.txt

dirkwhoffmann commented 1 month ago

The USB device crash should be fixed in v5.0b5. However, your 4.7 stack report indicates another issue on your machine. v5.0b5 does still contain debug symbols. Thus, if it continues crashing, the stack report might tell us where.

ha24-1 commented 1 month ago

... thank you so much, it works! (V4.7 issues doesn't matter - now we have V5 ;-) )

It would be fine, if different versions of VC64 installed would use same prefs - backward compatibility (as much as possible, I know).