[GH-ISSUE #1] basilisk crash #1

Closed
opened 2026-05-05 10:55:47 -06:00 by gitea-mirror · 22 comments
Owner

Originally created by @cy384 on GitHub (Nov 14, 2019).
Original GitHub issue: https://github.com/SolraBizna/MacLua5.3/issues/1

When I follow the install instructions in the Basilisk II emulator (on Ubuntu 19.04), running System 7.5.5, opening "Lua Interpreter" causes a quick crash:

Basilisk II V1.0 by Christian Bauer et al.
Reading ROM file...
WARNING: RmvTime(000dc7f6): Descriptor not found
Caught SIGSEGV at address 0x8167000c [IP=0x5585af28890f]
D0: 03e6fe44 D1: 00000002 D2: 00000001 D3: 00000000 
D4: 00000001 D5: 00000001 D6: 00000001 D7: 00000000 
A0: 03e87b50 A1: 4000000c A2: 03e6fe44 A3: 03f6bd3c 
A4: 03e6fe44 A5: 03f6cd20 A6: 03f6bd10 A7: 03f6bcfc 
USP=00000000 ISP=03f6bcfc MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=0
FP0: nan FP1: nan FP2: nan FP3: nan 
FP4: nan FP5: nan FP6: nan FP7: nan 
N=0 Z=0 I=0 NAN=0
03e6efe2: 1011 722d b001 6644 1029 MOVE.B (A1),D0
next PC: 03e6efe4

I have no idea if this is a basilisk issue, something with my setup, or an issue with your software, so I'm just mentioning it in case you or someone else wants to know or mess with it. I'll note that checking the "Ignore Illegal Memory Accesses" box allows it to run and seems to work fine.

Thanks for the fun software!

Originally created by @cy384 on GitHub (Nov 14, 2019). Original GitHub issue: https://github.com/SolraBizna/MacLua5.3/issues/1 When I follow the install instructions in the Basilisk II emulator (on Ubuntu 19.04), running System 7.5.5, opening "Lua Interpreter" causes a quick crash: ``` Basilisk II V1.0 by Christian Bauer et al. Reading ROM file... WARNING: RmvTime(000dc7f6): Descriptor not found Caught SIGSEGV at address 0x8167000c [IP=0x5585af28890f] D0: 03e6fe44 D1: 00000002 D2: 00000001 D3: 00000000 D4: 00000001 D5: 00000001 D6: 00000001 D7: 00000000 A0: 03e87b50 A1: 4000000c A2: 03e6fe44 A3: 03f6bd3c A4: 03e6fe44 A5: 03f6cd20 A6: 03f6bd10 A7: 03f6bcfc USP=00000000 ISP=03f6bcfc MSP=00000000 VBR=00000000 T=00 S=1 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=0 FP0: nan FP1: nan FP2: nan FP3: nan FP4: nan FP5: nan FP6: nan FP7: nan N=0 Z=0 I=0 NAN=0 03e6efe2: 1011 722d b001 6644 1029 MOVE.B (A1),D0 next PC: 03e6efe4 ``` I have no idea if this is a basilisk issue, something with my setup, or an issue with your software, so I'm just mentioning it in case you or someone else wants to know or mess with it. I'll note that checking the "Ignore Illegal Memory Accesses" box allows it to run and seems to work fine. Thanks for the fun software!
Author
Owner

@SolraBizna commented on GitHub (Nov 14, 2019):

Very strange. I actually only tested the 68k code on PowerPC machines (by leaving out the PowerPC half of the binary), so it's possible that it doesn't work on real 68k at all. On the other hand, random things failing to work under Basilisk without "ignore illegal memory accesses" is ... sort of par for the course.

Guess it's time to break out my old LC III and test it! :D

<!-- gh-comment-id:553723466 --> @SolraBizna commented on GitHub (Nov 14, 2019): Very strange. I actually only tested the 68k code on PowerPC machines (by leaving out the PowerPC half of the binary), so it's possible that it doesn't work on real 68k at all. On the other hand, random things failing to work under Basilisk without "ignore illegal memory accesses" is ... sort of par for the course. Guess it's time to break out my old LC III and test it! :D
Author
Owner

@classilla commented on GitHub (Nov 14, 2019):

Personally, I think this is more likely to be a Basilisk bug (or at minimum a combination). Even if it was an illegal memory access that triggered the problem, that shouldn't segfault Basilisk.

<!-- gh-comment-id:553988919 --> @classilla commented on GitHub (Nov 14, 2019): Personally, I think this is more likely to be a Basilisk bug (or at minimum a combination). Even if it was an illegal memory access that triggered the problem, that shouldn't segfault Basilisk.
Author
Owner

@SolraBizna commented on GitHub (Nov 18, 2019):

Well, we brought the LC III out of storage. Couldn't find her keyboard and mouse, so I started to make a replacement device. When it was time for the first test, we found that the LC III wouldn't power on. We opened her up, found that the power supply was toast. We salvaged an old BTX power supply, tested everything with a multimeter, jury-rigged it into working with the LC III, started her up—it chimed, and a capacitor burst into metal-oxide-spewing flames. We determined that the capacitor was a filter for the -5V rail, determined that the -5V rail was only used by the serial port line drivers, dusted the tantalum oxide off of the motherboard, left the -5V rail unconnected, started her up...and her hard disk was dead.

So we got the CD-ROM drive out of storage. Couldn't find the SCSI cable (it's with the keyboard and mouse), so it was useless to us. Got a USB floppy drive out of storage. Tested a bunch of old floppies. Finally found a 1.44MB floppy with no bad blocks. Wasted hours using various methods of formatting it, including giving an emulated copy of OS9 direct access to the drive using USB pass-through (which only didn't work because, during the course of an entire formatting operation, the drive draws a little too much power for that specific host computer to provide)...

Found a System 7.1.2 Disk Tools image, specifically meant for the LC III, and somehow got it onto the disk. That failed to boot, complaining that later system software was required for this machine. I manually checked; System Enabler 003 is indeed present on the disk, so I don't know why it didn't work. Tried a System 7.5 Disk Tools floppy instead. Finally, something booted!

So now I just have to finish building an ADB keyboard+mouse simulator, and then jury-rig some kind of horrible emulated SCSI thing, and then I can get to work on testing this bug...

(Even for me, this is a lot of yak shaving for a bug that should have been easy to test. Oh well.)

<!-- gh-comment-id:555168864 --> @SolraBizna commented on GitHub (Nov 18, 2019): Well, we brought the LC III out of storage. Couldn't find her keyboard and mouse, so I started to make a replacement device. When it was time for the first test, we found that the LC III wouldn't power on. We opened her up, found that the power supply was toast. We salvaged an old BTX power supply, tested everything with a multimeter, jury-rigged it into working with the LC III, started her up—it chimed, and a capacitor burst into metal-oxide-spewing flames. We determined that the capacitor was a filter for the -5V rail, determined that the -5V rail was only used by the serial port line drivers, dusted the tantalum oxide off of the motherboard, left the -5V rail unconnected, started her up...and her hard disk was dead. So we got the CD-ROM drive out of storage. Couldn't find the SCSI cable (it's with the keyboard and mouse), so it was useless to us. Got a USB floppy drive out of storage. Tested a bunch of old floppies. Finally found a 1.44MB floppy with no bad blocks. Wasted hours using various methods of formatting it, including giving an emulated copy of OS9 direct access to the drive using USB pass-through (which only didn't work because, during the course of an entire formatting operation, the drive draws a little too much power for that *specific* host computer to provide)... Found a System 7.1.2 Disk Tools image, specifically meant for the LC III, and somehow got it onto the disk. That failed to boot, complaining that later system software was required for this machine. I manually checked; System Enabler 003 is indeed present on the disk, so I don't know *why* it didn't work. Tried a System 7.5 Disk Tools floppy instead. Finally, something booted! So now I just have to finish building an ADB keyboard+mouse simulator, and then jury-rig some kind of horrible emulated SCSI thing, and *then* I can get to work on testing this bug... (Even for me, this is a *lot* of yak shaving for a bug that should have been easy to test. Oh well.)
Author
Owner

@SolraBizna commented on GitHub (May 22, 2020):

Long story short, handling the hard disk roughly resurrected it, and we just spent about a day trying to get things backed up and shuffled around and get MacLua5.3 onto the system.

A low-resolution photo of the bug being reproduced on real hardware.

This bug is for real, apparently!

I'm uncertain of how to move forward on debugging this. Anybody know where I can find a MacsBug that's compatible with the Macintosh LC III?

<!-- gh-comment-id:632939621 --> @SolraBizna commented on GitHub (May 22, 2020): Long story short, handling the hard disk roughly resurrected it, and we just spent about a day trying to get things backed up and shuffled around and get MacLua5.3 onto the system. ![A low-resolution photo of the bug being reproduced on real hardware.](https://tejat.net/eph/MacLua5.3_issue1_repro.jpeg) This bug is for real, apparently! I'm uncertain of how to move forward on debugging this. Anybody know where I can find a MacsBug that's compatible with the Macintosh LC III?
Author
Owner

@jduerstock commented on GitHub (May 23, 2020):

The same MacsBug should work everywhere. Check Macintosh Garden or
Macintosh Repository?

On Fri, May 22, 2020 at 6:10 PM Solra Bizna notifications@github.com
wrote:

Long story short, handling the hard disk roughly resurrected it, and we
just spent about a day trying to get things backed up and shuffled around
and get MacLua5.3 onto the system.

[image: A low-resolution photo of the bug being reproduced on real
hardware.]
https://camo.githubusercontent.com/4184cc9c79925d77cd4acaf4b073e18084b25c7b/68747470733a2f2f74656a61742e6e65742f6570682f4d61634c7561352e335f6973737565315f726570726f2e6a706567

This bug is for real, apparently!

I'm uncertain of how to move forward on debugging this. Anybody know where
I can find a MacsBug that's compatible with the Macintosh LC III?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/SolraBizna/MacLua5.3/issues/1#issuecomment-632939621,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA5HXICB24SUAAQKOMIAULRS4A6HANCNFSM4JNE2YMA
.

<!-- gh-comment-id:632977822 --> @jduerstock commented on GitHub (May 23, 2020): The same MacsBug should work everywhere. Check Macintosh Garden or Macintosh Repository? On Fri, May 22, 2020 at 6:10 PM Solra Bizna <notifications@github.com> wrote: > Long story short, handling the hard disk roughly resurrected it, and we > just spent about a day trying to get things backed up and shuffled around > and get MacLua5.3 onto the system. > > [image: A low-resolution photo of the bug being reproduced on real > hardware.] > <https://camo.githubusercontent.com/4184cc9c79925d77cd4acaf4b073e18084b25c7b/68747470733a2f2f74656a61742e6e65742f6570682f4d61634c7561352e335f6973737565315f726570726f2e6a706567> > > This bug is for real, apparently! > > I'm uncertain of how to move forward on debugging this. Anybody know where > I can find a MacsBug that's compatible with the Macintosh LC III? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/SolraBizna/MacLua5.3/issues/1#issuecomment-632939621>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAA5HXICB24SUAAQKOMIAULRS4A6HANCNFSM4JNE2YMA> > . >
Author
Owner

@cymraegish commented on GitHub (May 25, 2020):

FWIW I’ve had problems it crashing on native ppc as well. OS 8.1 is good but 8.5 or higher not. Classic running on 10.2.8 is
OK. I have one 68k Mac I regularly use and it crashes there but I thought it might be it’s got a huge 128MB ram stick quadra 630. I’ve got a PowerBook 540 68k haven’t tried it there yet. The restriction to max out at 8.1 on ppc is trouble for me with the now need for SetDate which crashes on 8.1

<!-- gh-comment-id:633328322 --> @cymraegish commented on GitHub (May 25, 2020): FWIW I’ve had problems it crashing on native ppc as well. OS 8.1 is good but 8.5 or higher not. Classic running on 10.2.8 is OK. I have one 68k Mac I regularly use and it crashes there but I thought it might be it’s got a huge 128MB ram stick quadra 630. I’ve got a PowerBook 540 68k haven’t tried it there yet. The restriction to max out at 8.1 on ppc is trouble for me with the now need for SetDate which crashes on 8.1
Author
Owner

@cymraegish commented on GitHub (May 25, 2020):

BTW I guess others know “error of type 1” means memory access out of bounds, consistent with the original bug report when he told basilisk to ignore that it worked

<!-- gh-comment-id:633329819 --> @cymraegish commented on GitHub (May 25, 2020): BTW I guess others know “error of type 1” means memory access out of bounds, consistent with the original bug report when he told basilisk to ignore that it worked
Author
Owner

@SolraBizna commented on GitHub (May 25, 2020):

Does increasing or decreasing the amount of memory allocated to Lua change anything? And, anybody with working MacsBug, can you try to see if g allows it to finish starting up?

(I won't have a keyboard for a few days, so I can't use MacsBug on it myself yet)

<!-- gh-comment-id:633338448 --> @SolraBizna commented on GitHub (May 25, 2020): Does increasing or decreasing the amount of memory allocated to Lua change anything? And, anybody with working MacsBug, can you try to see if `g` allows it to finish starting up? (I won't have a keyboard for a few days, so I can't use MacsBug on it myself **yet**)
Author
Owner

@SolraBizna commented on GitHub (May 27, 2020):

Amid other fruitless troubleshooting and testing, I've just learned that the version of CFM-68K Runtime Enabler that shipped with pre-7.6 MacOS has some crashing bugs. (I think I knew this once, but it's been 24 years since the last time it would have mattered to me...)

@cy384: Please install version 4.0 of the CFM-68K Runtime Enabler and see if the crash still happens.

<!-- gh-comment-id:634457267 --> @SolraBizna commented on GitHub (May 27, 2020): Amid other fruitless troubleshooting and testing, I've just learned that the version of CFM-68K Runtime Enabler that shipped with pre-7.6 MacOS has some crashing bugs. (I think I knew this once, but it's been 24 years since the last time it would have mattered to me...) @cy384: Please install [version 4.0 of the CFM-68K Runtime Enabler](https://macintoshgarden.org/apps/cfm-68k-40) and see if the crash still happens.
Author
Owner

@cy384 commented on GitHub (May 27, 2020):

still crashes with 4.0

new info discovered: if I drag a lua file onto the application, it runs without crashing.

<!-- gh-comment-id:634752396 --> @cy384 commented on GitHub (May 27, 2020): still crashes with 4.0 new info discovered: if I drag a lua file onto the application, it runs without crashing.
Author
Owner

@SolraBizna commented on GitHub (May 27, 2020):

still crashes with 4.0

Drat.

new info discovered: if I drag a lua file onto the application, it runs without crashing.

... well that I did not expect. Makes me wonder if the problem has something to do with argv handling.

Keyboard is late arriving. When it gets here, we'll have some answers.

<!-- gh-comment-id:634840095 --> @SolraBizna commented on GitHub (May 27, 2020): > still crashes with 4.0 Drat. > new info discovered: if I drag a lua file onto the application, it runs without crashing. ... well *that* I did not expect. Makes me wonder if the problem has something to do with `argv` handling. Keyboard is late arriving. When it gets here, we'll have some answers.
Author
Owner

@cymraegish commented on GitHub (May 28, 2020):

I checked my Quadra 630 last night and increased memory requirements to min 2500 k and desired 8000k -> no help. Tossing a script on app (set file ID to Lua with BBEDIT) and putting in a read call for delay so I could see it a simple script did run. Note : no error message here just crash.

<!-- gh-comment-id:635530180 --> @cymraegish commented on GitHub (May 28, 2020): I checked my Quadra 630 last night and increased memory requirements to min 2500 k and desired 8000k -> no help. Tossing a script on app (set file ID to Lua with BBEDIT) and putting in a read call for delay so I could see it a simple script did run. Note : no error message here just crash.
Author
Owner

@cymraegish commented on GitHub (May 28, 2020):

I have MPW installed on the Quadra and can build there. Also on PowerBook 1400 / G3, and G4 / 400. I want to run the Lua tool in MPW

<!-- gh-comment-id:635531716 --> @cymraegish commented on GitHub (May 28, 2020): I have MPW installed on the Quadra and can build there. Also on PowerBook 1400 / G3, and G4 / 400. I want to run the Lua tool in MPW
Author
Owner

@SolraBizna commented on GitHub (May 28, 2020):

You should be able to change into Lua's directory and run the tool from there, or copy the Lua Interpreter to the System Folder and the Lua tool into MPW's Tools directory and run it that way.

<!-- gh-comment-id:635535390 --> @SolraBizna commented on GitHub (May 28, 2020): You should be able to change into Lua's directory and run the tool from there, or copy the Lua Interpreter to the System Folder and the Lua tool into MPW's Tools directory and run it that way.
Author
Owner

@cymraegish commented on GitHub (Jun 3, 2020):

Unfortunately tho it only runs for me on ppc OS8.1 or Classic OS running under OS X. Not on Quadra 68k at all and not on the 8.6 / 9.2 MacOS PowerBooks. Yes the MPW tool runs anywhere the Interactive SIOUX app runs. I’ve tested that.

<!-- gh-comment-id:638491041 --> @cymraegish commented on GitHub (Jun 3, 2020): Unfortunately tho it only runs for me on ppc OS8.1 or Classic OS running under OS X. Not on Quadra 68k at all and not on the 8.6 / 9.2 MacOS PowerBooks. Yes the MPW tool runs anywhere the Interactive SIOUX app runs. I’ve tested that.
Author
Owner

@cymraegish commented on GitHub (Jun 3, 2020):

I’m just learning about MPW and looking for things to do. Curious that the editor has support for tcl ... not for Lua.

<!-- gh-comment-id:638492624 --> @cymraegish commented on GitHub (Jun 3, 2020): I’m just learning about MPW and looking for things to do. Curious that the editor has support for tcl ... not for Lua.
Author
Owner

@SolraBizna commented on GitHub (Jun 8, 2020):

Does the tool also crash, or just fail to run at all? Either way, this means I can rule out SIOW as a likely cause.

(STILL waiting for that keyboard to get here. This week For Sure™...)

<!-- gh-comment-id:640881584 --> @SolraBizna commented on GitHub (Jun 8, 2020): Does the tool also crash, or just fail to run at all? Either way, this means I can rule out SIOW as a likely cause. (STILL waiting for that keyboard to get here. This week For Sure™...)
Author
Owner

@SolraBizna commented on GitHub (Jun 13, 2020):

Crash doesn't reproduce under a vMac-emulated Macintosh IIx running System 7.5.5. (Drat!)

Keyboard just came; will clear space on my desk today, set up the LC III, and get MacsBug's opinion on all this.

<!-- gh-comment-id:643691826 --> @SolraBizna commented on GitHub (Jun 13, 2020): Crash doesn't reproduce under a vMac-emulated Macintosh IIx running System 7.5.5. (Drat!) Keyboard just came; will clear space on my desk today, set up the LC III, and get MacsBug's opinion on all this.
Author
Owner

@SolraBizna commented on GitHub (Jun 15, 2020):

Crash occurs in the collectargs routine, which assumes that you can iterate through argv until NULL is reached. I'm guessing that SIOW doesn't put a trailing NULL in that array. If so, a fix is coming.

<!-- gh-comment-id:643844281 --> @SolraBizna commented on GitHub (Jun 15, 2020): Crash occurs in the `collectargs` routine, which assumes that you can iterate through `argv` until `NULL` is reached. I'm guessing that SIOW doesn't put a trailing NULL in that array. If so, a fix is coming.
Author
Owner

@SolraBizna commented on GitHub (Jun 15, 2020):

3492636911 fixes the crash on my LC III. New release is going up when she's done doing a complete build, which takes about ten hours(!!?!). If you have a Mac with a fast processor and lots of memory—I only have Macs with fast processor or lots of memory, it seems—you can try making this change and building it yourself.

<!-- gh-comment-id:644241643 --> @SolraBizna commented on GitHub (Jun 15, 2020): 3492636911cdfc40f49889471d0576c755f7ffa0 fixes the crash on my LC III. New release is going up when she's done doing a complete build, which takes about ten hours(!!?!). If you have a Mac with a fast processor *and* lots of memory—I only have Macs with fast processor *or* lots of memory, it seems—you can try making this change and building it yourself.
Author
Owner

@SolraBizna commented on GitHub (Jun 16, 2020):

Release 5.3.5.1 should no longer suffer from this problem. @cy384, please check; if the problem is now fixed, the issue can be closed.

<!-- gh-comment-id:644471796 --> @SolraBizna commented on GitHub (Jun 16, 2020): Release 5.3.5.1 should no longer suffer from this problem. @cy384, please check; if the problem is now fixed, the issue can be closed.
Author
Owner

@cy384 commented on GitHub (Jun 16, 2020):

5.3.5.1 works fine with no errors or crashes in basilisk now, thanks for your significant efforts here!

<!-- gh-comment-id:644484198 --> @cy384 commented on GitHub (Jun 16, 2020): 5.3.5.1 works fine with no errors or crashes in basilisk now, thanks for your significant efforts here!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MacLua5.3#1
No description provided.