mihaip / infinite-mac

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

MacWrite 2.2 causes the emulator to crash with "index out of bounds" error #127

Open ssg opened 1 year ago

ssg commented 1 year ago

Trying to run MacWrite 2.2 crashes the emulator on any version of System.

that-ben commented 1 year ago

Well, it works just fine here on my end. Video at the end of this post. Please answer those questions to help us all figure out why it's not working on your end:

1) Which emulator did you use? Pinpoint the page URL please as there are currently 3 completely different emulators just on InfiniteMac.org

2) If the emulator supports more than just 1 ROM, then which ROM did you set it to boot from?

3) Link to your MacWrite 2.2 disk image.

Proof of it working on my end through Mini vMac with default settings (not customized) https://infinitemac.org/1988/System%206.0

https://user-images.githubusercontent.com/13210399/228673147-5bfe3377-8b20-4565-943f-b4cccc174d7d.mp4

ssg commented 1 year ago

You're right, it worked on 6.0 for me as well. But it fails on 7.1 (https://infinitemac.org/1992/System%207.1) for example. The browser is Firefox (111.0.1 64-bit on Windows).

image

that-ben commented 1 year ago

OK, well that's a step forward in understanding the issue, but you forgot to answer my questions 2 and 3. For question 2, did you simply click "RUN" in the InfiniteMac.org page without changing anything under the "Customize..." button? I'm asking, because if that's what you did, then it means that you're booting System 7.1 with a Quadra 650 ROM (68040 architecture) which is not compatible with most of the apps made in 1984 and 1985. You ideally want to run those on 68000 architecture (with a ROM from a Mac Plus or Mac SE) and while most of them will still happily run on 68020 too, rare are the ones that will run on 68030 let alone 68040.

So if you want to run this in color System 7.1 then make sure that you click on the "Customize..." button next to the RUN button and choose "Mac II" which will boot System 7.1 with a 68020 architecture and it will allow for 1984 MacWrite 2.2 to work perfectly fine.

The issue has nothing to do with the browser (Firefox) but rather with the architecture that you're emulating. You can see the same kind of crash under Basilisk II for Windows (not in the web browser, but as a .exe program file) which emulates a 68040 and thus, crashes the same as what you saw on InfiniteMac.org

asd

ssg commented 1 year ago

You're right. It works when I select Mac II, Mac Plus, or Mac SE on the same emulator, but it keeps crashing with Mac IIfx. Is that expected?

ssg commented 1 year ago

IIfx also seems to have 68030 so it might also be causing the compatibility problem as you said.

That's okay of course, but the emulator crashing with "index out of bounds" error isn't very informative. I thought this was a bug in the emulator code because it didn't even know what actually went wrong. So, it's still different than how Basilisk II handles the situation (Application quit message).

I don't think the emulator should crash completely because of app incompatibility.

that-ben commented 1 year ago

EDIT: GAHHH! You beat me to it as I was typing! ;-)

The Mac IIfx has a very fast 40mhz 68030 CPU, so it might be normal. I'm not 100% sure, but I would totally believe it's normal. Also, it's always best to use the apps on an OS that fits the app's era. In the case of MacWrite 2.2, it was released in 1984 so IMO, it's not appropriate to run it on a decade newer OS such as System 7.1. It really belongs to the 1980's OS'es such as System 6 or preferably even older than that.

If you'd like to use MacWrite under 68030 or 68040 architecture and System 7, Mac OS 8 or even Mac OS 9, have you considered trying Claris MacWrite Pro?

EDIT: And I do agree that displaying a proper Mac OS crash window would be better than halting the emulator, but honestly, memory becomes so corrupted after a crash like that under System 7 that it's 99.99% of the time worth it to reboot anyway.

ssg commented 1 year ago

Thank you for the suggestions, but I'm running apps out of mere curiosity and nostalgia. I don't intend on doing any serious work on them. I just wanted to report a bug that I noticed if it could be considered that. :)

And sorry for not giving enough information earlier. I really thought it happened consistently on all emulator flavors, but I wasn't investigating it seriously so I turned out wrong. I'll be more careful the next time.

that-ben commented 1 year ago

@mihaip TL;DR instead of halting the emulator on an application crash when running on unsupported architecture (68040 instead of 68000) ssg would like Mac OS to display its crash window with error type 25 or whatever it is, like both real hardware and BII for Windows do it. (see my BII for Windows screenshot 4 messages above this one)