mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.12k stars 66 forks source link

Infinite Mac crash when using CMD-Q and cancelling the quit browser dialog #277

Open that-ben opened 6 months ago

that-ben commented 6 months ago

I don't know if it's worth investigating, but I figure it's best to post it just in case it might lead to discovering more bugs related to this. It's 100% reproducible in Firefox under macOS Sonoma:

1) Launch Mac OS 9 in IM: https://infinitemac.org/1999/Mac%20OS%209.0

2) Left click a sticky note.

3) Hit CMD-Q which will trigger Firefox quit browser confirmation dialog. Click cancel.

4) Type the letter Q on your keyboard a couple times and IM will crash with one of those (random, but most of the times I get an out of bounds exception and sometimes the Aborted() error)

Screenshot 2024-01-04 at 12 47 45 PM Screenshot 2024-01-04 at 12 47 03 PM Screenshot 2024-01-04 at 12 46 15 PM
ghost commented 5 months ago

I was messing around in Mac OS 9 and somehow triggered this error in Chrome on Windows. I don't remember what I was doing but I somehow crashed the emulator while doing nothing that should crash it. Wonder if the SheepShaver emulators are getting unstable for some reason.

It might be worth actually building SheepShaver with "-sASSERTIONS" so we can figure out exactly why it crashes (since this dialog only appears if there is an error, it would be useful to know why the emulator aborted)

that-ben commented 5 months ago

It definitely has something to do with keystrokes after the emulator canvas is losing and regaining focus. Somehow it overflows a buffer of some kind, but I'll not pollute this thread with assumptions and leave the pro take a look at it 😜