Running AppleScript in SheepShaver? (that bug)

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Running AppleScript in SheepShaver? (that bug)

Post by that-ben »

Hi,

Anybody noticed that when trying to run AppleScript applets from within SheepShaver (Mac OS 9.0.4) it does not work unless the Finder was rebooted once?

Steps to reproduce, works everytime:

1) Launch SheepShaver for Windows (maybe it does that on other flavors, don't know)

2) Now that you're in Mac OS 9.0.4 try to launch an AppleScript applet, it will output total NONSENSE errors like this:

Image

3) Restart the Finder by going SPECIAL > RESTART (do NOT exit/quit SheepShaver)

4) Once the Mac OS is booted for the 2nd time, AppleScript applets now all work *perfectly* as shown below:

Image

...WTF?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Running AppleScript in SheepShaver? (that bug)

Post by adespoton »

Got a sample droplet that exhibits this behaviour that others could try?
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Running AppleScript in SheepShaver? (that bug)

Post by that-ben »

Hi! Thanks for replying; Sorry for the long delay, I did not receive an email notification :(

Well, any AppleScript droplet does that really. And since this post was originally made (2 months ago) it still does that on and off, but it does a little less often nowadays. Maybe once in every 3 boots, but every single time (100%) that it does that, I reboot without exiting SheepShaver and it works perfectly afterwards as explained in the OP. It's worth noting SheepShaver crashes quite often on my Windows 7 PC to begin with, so maybe it's caused by RAM corruption or RAM access violations of some kind. Some days it freezes completely during boot and other days it's fine without any modification to the System Folder or anything new on the hard disk image really. It's most probably due to RAM corruption I'd say. Does it do that on your end sometimes or not at all?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Running AppleScript in SheepShaver? (that bug)

Post by adespoton »

This sounds like the RAM allocation/addressing issue, which would explain why a reboot would fix the problem (memory wasn't allocated where expected, but then everything gets re-loaded). Not much to do there to fix things other than possibly run SS inside a VM, where other software won't be messing with the memory allocation.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Running AppleScript in SheepShaver? (that bug)

Post by that-ben »

Yeahhh... probably. Do you think the new efforts currently done with QEMU will render their emulator better than SS regarding this issue?

BTW: I have uploaded an Apple Script droplet app along with its source if you want to try on your machine. It does not always do that as I said before, so if it works fine then try another day or with other programs running. I'd say 1 time out of 3 or 4 the problem described occurs. You can download the compressed SIT file here: http://www.filedropper.com/test-apple-script-droplet

Oh and I haven't mentionned yet, but when the problem occurs, it also does the same thing while trying to run an Apple Script from within the Apple Script Editor when you click RUN.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Running AppleScript in SheepShaver? (that bug)

Post by adespoton »

Ah; that's good to know. It's probably an OSAX loading issue where it can't be addressed correctly.

Once QEMU has this round of bugs fixed completely (serial-related issues), I'd say it is probably solid enough to replace SheepShaver, assuming you're running 9.2 -- more work is needed to run earlier OSes. That work could be trivial or complex; we won't really know until serial emulation is resolved so that the environment is more stable.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Running AppleScript in SheepShaver? (that bug)

Post by that-ben »

Just to complement the OP, this happened when I tried to launch SheepShaver yesterday:

Image

Then I rebooted my PC and tried to launch SS again and this happened:

Image

Then I rebooted again my PC and it worked perfectly... looks VERY MUCH like RAM corruption, no? Unless SheepShaver tries to allocate static/pre-defined RAM blocks on startup, which I assume it is not, because... what program would do that nowadays? It would only be a recipe for failure.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Running AppleScript in SheepShaver? (that bug)

Post by Cat_7 »

Unless SheepShaver tries to allocate static/pre-defined RAM blocks on startup, which I assume it is not, because... what program would do that nowadays? It would only be a recipe for failure.
An emulator in need of a continuous address space? Welcome to the wonderful world of SheepShaver ;-)

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Running AppleScript in SheepShaver? (that bug)

Post by adespoton »

that-ben wrote:Unless SheepShaver tries to allocate static/pre-defined RAM blocks on startup, which I assume it is not, because... what program would do that nowadays? It would only be a recipe for failure.
-- A program that was written over a decade ago? What's amazing is that SheepShaver continues to function without those core bits being ripped out and replaced by something modern.

But this is part of the reason that there's been a push to get QEMU properly emulating OS 8/9. The sheep is getting rather long in the tooth.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Running AppleScript in SheepShaver? (that bug)

Post by that-ben »

Oh yeah, I'm definitely reading everybody's posts on the QEMU thread running Mac OS 9.2.2 -- I can't wait to try it out on a Raspberry Pi once 9.2.2 is running more stable in QEMU :P
Post Reply