My new 26 July 2020 build crashes often at shut down
Moderators: Cat_7, Ronald P. Regensburg, ClockWise
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
My new 26 July 2020 build crashes often at shut down
My new 26 July 2020 build crashes often at shut down. About half the times I shut down the emulator it crashes instead of shutting down. This is on my iMac with macOS 10.15.6 (Catalina).
Does it happen only here or see others the same issue with this build?
Does it happen only here or see others the same issue with this build?
Last edited by Ronald P. Regensburg on Mon Jul 27, 2020 12:16 pm, edited 2 times in total.
Reason:
Reason:
Re: My new 26 July 2020 build crashes often at shut down
I'm not able to reproduce it here on Mojave, 10.14.6. Are there any particular steps or settings you've noticed that lead to the crash or does it seem random?
In my PR, thanks to kanjitalk's prompting, I fixed a couple optimization bugs to make release builds more stable. They've all been resolved as far as I know, but maybe there's something Catalina-specific with optimization: if you try a debug build, is there no crashing?
I'll try to do some testing in Catalina later and see if I can reproduce it.
On an unrelated but interesting note, I saw that VMWare is having issues with 10.15.6. Of course, Sheep's problem isn't with virtualization, although I wonder the extent of the bug they found with sandboxing.
In my PR, thanks to kanjitalk's prompting, I fixed a couple optimization bugs to make release builds more stable. They've all been resolved as far as I know, but maybe there's something Catalina-specific with optimization: if you try a debug build, is there no crashing?
I'll try to do some testing in Catalina later and see if I can reproduce it.
On an unrelated but interesting note, I saw that VMWare is having issues with 10.15.6. Of course, Sheep's problem isn't with virtualization, although I wonder the extent of the bug they found with sandboxing.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
The crashes are random. They happen often but not always when you shut down the emulator.
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: My new 26 July 2020 build crashes often at shut down
This doesn't happen here. You might try my build (different icon, but otherwise ordinary code, I think), in the SheepShaver Wrapper:
http://www.columbia.edu/~em36/sheepshaverwrapper.html
Extract SheepShaver from inside the wrapper (it's in the Files folder) and give it a try.
http://www.columbia.edu/~em36/sheepshaverwrapper.html
Extract SheepShaver from inside the wrapper (it's in the Files folder) and give it a try.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Your SheepShaver build crashes here often at shut down just the same.
None of my previous builds have this issue, it is only my latest (26 July) build (and this 25 July build by you).
Do you also run macOS 10.15.6 ?
How does my build behave on your side?
None of my previous builds have this issue, it is only my latest (26 July) build (and this 25 July build by you).
Do you also run macOS 10.15.6 ?
How does my build behave on your side?
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: My new 26 July 2020 build crashes often at shut down
I put your build into my SheepShaver Wrapper (with ROM and OS 9) and ran it five times. It never crashed on shutdown. Yes, running 10.15.6.
Perhaps something is wrong with your disk system or settings? Have you tried (1) replacing your build with an earlier build to see if you still get the crashes and (2) replacing the settings and disk image with known-good settings and disk image?
Perhaps something is wrong with your disk system or settings? Have you tried (1) replacing your build with an earlier build to see if you still get the crashes and (2) replacing the settings and disk image with known-good settings and disk image?
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
My settings are as they have been for a long time. I once made a copy of the prefs file and after experimenting with settings I simply copy the content of that copy and paste it back to the actual prefs file.
I used Time Machine to get the HD image as it was a year ago.
I replaced my shared folder.
I restarted the host.
Makes no difference
i tried each of my previous 8 builds since april 2019. None of them have this issue.
The crash does not happen always, but often enough to be disturbing. It happens with any way one can shut down the emulator:
With the emulator running:
- Choose Shut down from the Special menu in the Finder (in both window mode and full screen mode)
- Close SheepShaver window and choose Shut Down from the dialog
- Quit SheepShaver and choose Shut Down from the dialog
- "Save and Quit" in preferences and choose Shut Down from the dialog
I used Time Machine to get the HD image as it was a year ago.
I replaced my shared folder.
I restarted the host.
Makes no difference
i tried each of my previous 8 builds since april 2019. None of them have this issue.
The crash does not happen always, but often enough to be disturbing. It happens with any way one can shut down the emulator:
With the emulator running:
- Choose Shut down from the Special menu in the Finder (in both window mode and full screen mode)
- Close SheepShaver window and choose Shut Down from the dialog
- Quit SheepShaver and choose Shut Down from the dialog
- "Save and Quit" in preferences and choose Shut Down from the dialog
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: My new 26 July 2020 build crashes often at shut down
I tried all those shutdown methods with your build in my SheepShaver Wrapper, and got no crashes at all. This is very strange, and I wish I had a better answer.
-
- Apple Corer
- Posts: 239
- Joined: Thu Nov 09, 2017 12:06 pm
Re: My new 26 July 2020 build crashes often at shut down
Which commit is the most recent non-crash build?Ronald P. Regensburg wrote:i tried each of my previous 8 builds since april 2019. None of them have this issue.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
I did not build after each commit. My previous build was 15 March 2020 (with etherhelper support).
-
- Apple Corer
- Posts: 239
- Joined: Thu Nov 09, 2017 12:06 pm
Re: My new 26 July 2020 build crashes often at shut down
To isolate the issue, I made a branch without the bin/cue support.
https://github.com/kanjitalk755/macemu/ ... _wo_bincue
Will this crash?
https://github.com/kanjitalk755/macemu/ ... _wo_bincue
Will this crash?
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
I cannot make it crash with 25+ attempts.
Yesterdays build again crashes twice with only five attempts.
Yesterdays build again crashes twice with only five attempts.
Re: My new 26 July 2020 build crashes often at shut down
I'm glad it's been isolated to something that came in with bin/cue support; that's at least some direction, but I'll keep trying to reproduce it and see if there's some small fix that can be put in.
Do you get any output in the Console after the crash or a crash report?
Do you get any output in the Console after the crash or a crash report?
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Typical crash report: https://www.emaculation.com/sheepshaver ... report.txt
Edit: "Ignore Illegal Memory Accesses" is enabled
Edit: "Ignore Illegal Memory Accesses" is enabled
Code: Select all
ignoresegv true
Last edited by Ronald P. Regensburg on Wed Jul 29, 2020 3:21 pm, edited 1 time in total.
Reason:
Reason:
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Apparently no one else experienced the crash at shutdown issue so far.
To exclude the possibility that it is somehow related to the user account on my Mac, I created a fresh new user account and set up SheepShaver there.
The 29 July build without bin/cue does not crash at shutdown.
The 26 July build crashed at first attempt.
So the issue is not related to the user account.
To exclude the possibility that it is somehow related to the user account on my Mac, I created a fresh new user account and set up SheepShaver there.
The 29 July build without bin/cue does not crash at shutdown.
The 26 July build crashed at first attempt.
So the issue is not related to the user account.
Re: My new 26 July 2020 build crashes often at shut down
From the crash log, it's the sys_unix bindings for getting CD volume that caused the crash.
Which OS version do you use? Do you have any CD ROMs mounted, either as disk, cdrom, or bincues? It's odd that there's a call to get CD audio volume when the system is shutting down.
Which OS version do you use? Do you have any CD ROMs mounted, either as disk, cdrom, or bincues? It's odd that there's a call to get CD audio volume when the system is shutting down.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
- Late 2013 iMac running macOS 10.15.6 (Catalina).
- No CDs of any kind mounted, not even a CD/DVD player connected to the Mac
- Also no CD image files mounted, not on the host and not in SheepShaver.
The crash happens with only my (Fusion drive) "HD" volume* mounted on the host Mac and with only the MacOS 9.0.4 boot image and the "Unix' drive (shared folder) mounted in SheepShaver.
* In Catalina the startup drive consists several partitions, hidden to the user.
- No CDs of any kind mounted, not even a CD/DVD player connected to the Mac
- Also no CD image files mounted, not on the host and not in SheepShaver.
The crash happens with only my (Fusion drive) "HD" volume* mounted on the host Mac and with only the MacOS 9.0.4 boot image and the "Unix' drive (shared folder) mounted in SheepShaver.
* In Catalina the startup drive consists several partitions, hidden to the user.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Well, we come closer.
In the prefs file is a line If I remove that line, there is no crash
However, each time settings in SheepShaver preferences ar saved, that line is written back.
There is also the line If this line ie replaced by there is also no crash
The setting is changed from false to true by selecting "Disable CD-ROM" in SheepShaver preferences.
In the prefs file is a line
Code: Select all
cdrom /dev/poll/cdrom
However, each time settings in SheepShaver preferences ar saved, that line is written back.
There is also the line
Code: Select all
nocdrom false
Code: Select all
nocdrom true
The setting is changed from false to true by selecting "Disable CD-ROM" in SheepShaver preferences.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Thought:
As the current SheepShaver for macOS builds are intended for macOS versions in which SheepShaver cannot mount physical CD-ROMs anyway, the line could probably better be removed from the prefs file. (In OSX 10.8 and later.)
As the current SheepShaver for macOS builds are intended for macOS versions in which SheepShaver cannot mount physical CD-ROMs anyway, the line
Code: Select all
cdrom /dev/poll/cdrom
Last edited by Ronald P. Regensburg on Sun Aug 02, 2020 10:18 am, edited 1 time in total.
Reason:
Reason:
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Another thought:
Wasn't it so (with pre-OSX 10.8) that a CD that was mounted in BasiliskII or SheepShaver was ejected from the drive when the emulator was shut down?
Wasn't it so (with pre-OSX 10.8) that a CD that was mounted in BasiliskII or SheepShaver was ejected from the drive when the emulator was shut down?
-
- Apple Corer
- Posts: 239
- Joined: Thu Nov 09, 2017 12:06 pm
Re: My new 26 July 2020 build crashes often at shut down
@Elyus
At cdrom.cpp#L541,#L1074:
Here, get_drive_info() may return drives.end() and cause crash.
At cdrom.cpp#L541,#L1074:
Code: Select all
info = get_drive_info(last_drive_num);
-
- Apple Corer
- Posts: 239
- Joined: Thu Nov 09, 2017 12:06 pm
Re: My new 26 July 2020 build crashes often at shut down
I fixed it.
@Ronald
Try latest source.
@Elyus
Make a PR if there is a better fix.
@Ronald
Try latest source.
@Elyus
Make a PR if there is a better fix.
- Ronald P. Regensburg
- Expert User
- Posts: 7835
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: My new 26 July 2020 build crashes often at shut down
Crash at shut down is solved. I will post a new build.
BTW: Does bin/cue support also apply to BasiliskII? Then I will also build and post a new BasiliskII build.
BTW: Does bin/cue support also apply to BasiliskII? Then I will also build and post a new BasiliskII build.
-
- Apple Corer
- Posts: 239
- Joined: Thu Nov 09, 2017 12:06 pm
Re: My new 26 July 2020 build crashes often at shut down
Yes.Ronald P. Regensburg wrote:BTW: Does bin/cue support also apply to BasiliskII?
Re: My new 26 July 2020 build crashes often at shut down
Thank you for fixing it, kanjitalk! I'm sorry to have added that stability issue
I tested a couple hours last weekend and was able to reproduce the issue at least once, although without a conclusive fix or PR. In my case, it seemed like finding the available drive num was perhaps the root cause since it returned unexpected values for /dev/poll/cdrom. I think defaulting to the first available drive or returning an error as you've done is quite reasonable.
I tested a couple hours last weekend and was able to reproduce the issue at least once, although without a conclusive fix or PR. In my case, it seemed like finding the available drive num was perhaps the root cause since it returned unexpected values for /dev/poll/cdrom. I think defaulting to the first available drive or returning an error as you've done is quite reasonable.