Basilisk periodic SEGV at 0xa88f548f

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
stixpjr
Space Cadet
Posts: 3
Joined: Tue Jan 17, 2023 10:13 am

Basilisk periodic SEGV at 0xa88f548f

Post by stixpjr »

I'm running Basilisk II on NetBSD 9.3ish amd64 and see SEGV's frequently during many operations, currently opening a text editor in Symantec C++ triggers it reliably. Opening some old games also triggers it - the PC seems to be consistently 0xa88f548f, which I vaguely recall being up near ROM space somewhere?. I've tried builds from both github repositories - cebix/macemu & kanjitalk755/macemu. ROM is from my own IIci dumped some 20 years ago, which compares byte for byte with other ROMs I've found elsewhere. I've System 7.6 installed, which seems to otherwise run ok. None of the jit flags seems to make a difference. I'm building with gcc version 7.5.0 (nb4 20200810). Unless anyone has any other ideas, I might try building with a more recent gcc and/or upgrade to 7.6.1.

Code: Select all

Your Mac program just did something terribly stupid
Caught SIGSEGV at address 0x0 [IP=0x18ce71c90]
D0: 00029386 D1: 03f50028 D2: 0000a588 D3: 00001f01 
D4: 00008300 D5: ffc54901 D6: 03f570b0 D7: 00000003 
A0: a88f548f A1: 03fe2fe8 A2: 0002938a A3: 00029386 
A4: 61a861a6 A5: 03f570b0 A6: 03fe2fd6 A7: 03fe2fc2 
USP=00000000 ISP=03fe2fc2 MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=1 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
a88f548f: 0000 0000 0000 0000 0000 OR.B #$00,D0
next PC: a88f5493
User avatar
Ronald P. Regensburg
Expert User
Posts: 7454
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk periodic SEGV at 0xa88f548f

Post by Ronald P. Regensburg »

You do not mention settings in your BasiliskII prefs file.
Make sure the entry ignoresegv is set to true:

Code: Select all

ignoresegv true
Or, In the GUI, enable "Ignore Illegal Memory Accesses"
stixpjr
Space Cadet
Posts: 3
Joined: Tue Jan 17, 2023 10:13 am

Re: Basilisk periodic SEGV at 0xa88f548f

Post by stixpjr »

Ok, the "Ignore Illegal Memory Accesses" option is greyed out in the GUI, but setting

Code: Select all

ignoresegv true
in the prefs just results in a double SEGV at the same address, which terminates Basilisk:

Code: Select all

WARNING: RmvTime(000e3ed2): Descriptor not found
Your Mac program just did something terribly stupid
Caught SIGSEGV at address 0x0 [IP=0x1ef474b68]
D0: 0002cb46 D1: 03f50028 D2: 0000a560 D3: 00001f01 
D4: 00008200 D5: ffc54901 D6: 03f5719c D7: 00000003 
A0: a88f548f A1: 03fe2fd8 A2: 0002cb4a A3: 0002cb46 
A4: 61a861a6 A5: 03f5719c A6: 03fe2fc2 A7: 03fe2fae 
USP=00000000 ISP=03fe2fae MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=1 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
a88f548f: 0000 0000 0000 0000 0000 OR.B #$00,D0
next PC: a88f5493
Caught SIGSEGV at address 0x8 [IP=0x1ef467653]
D0: 0002cb46 D1: 03f50028 D2: 0000a560 D3: 00001f01 
D4: 00008200 D5: ffc54901 D6: 03f5719c D7: 00000003 
A0: a88f548f A1: 03fe2fd8 A2: 0002cb4a A3: 0002cb46 
A4: 61a861a6 A5: 03f5719c A6: 03fe2fc2 A7: 03fe2fae 
USP=00000000 ISP=03fe2fae MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=1 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
a88f548f: 0000 0000 0000 0000 0000 OR.B #$00,D0
next PC: a88f5493
I've also upgraded to System 7.6.1, and used gcc 10.4 to rebuild.

Current full prefs is:

Code: Select all

displaycolordepth 0
disk /home/stix/emul/BasiliskII/stix7.6.image
floppy /dev/null
extfs /home/stix/mac
screen dga/0/0
seriala /dev/null
serialb /dev/null
ether /dev/null
udptunnel false
udpport 6066
rom /home/stix/emul/ROMs/IIci.rom
bootdrive 0
bootdriver 0
ramsize 67108864
frameskip 0
modelid 5
cpu 4
fpu true
nocdrom true
nosound false
noclipconversion false
nogui false
jit true
jitfpu true
jitdebug true
jitcachesize 0
jitlazyflush false
jitinline true
keyboardtype 5
keycodes true
keycodefile /usr/pkg/share/BasiliskII/keycodes
mousewheelmode 1
mousewheellines 3
hotkey 0
scale_nearest false
scale_integer false
yearofs 0
dayofs 0
mag_rate 0
swap_opt_cmd true
ignoresegv false
sound_buffer 0
name_encoding 0
delay 0
dsp /dev/audio
mixer /dev/mixer
idlewait true
User avatar
Ronald P. Regensburg
Expert User
Posts: 7454
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk periodic SEGV at 0xa88f548f

Post by Ronald P. Regensburg »

Just a few suggestion, no guarantee that it will diminish the problem.

1. Use the Performa rom file that can be downloaded from the SheepShaver tutorial on the Redundant Robot site.

2. Set Mac Model ID to "Quadra 900"
(Model ID "Mac IIci" is only needed for System versions earlier than System 7.5.)

3. Set RAM size to 128 or even 256 MB

4. Run BasiliskII after a fresh restart of the host without first starting other processes.

5. Try BasiliskII with JIT compiler disabled.
stixpjr
Space Cadet
Posts: 3
Joined: Tue Jan 17, 2023 10:13 am

Re: Basilisk periodic SEGV at 0xa88f548f

Post by stixpjr »

Thanks for the hints!

I spent some more time on this, and made a discovery - with all extensions disabled, I don't see crashes. Some binary searching, and I've determined that the "AppleScript™" extension, version 1.1 from System Software 7.6, appears to be the cause of the crashes.

I also made the discovery that turning VM on triggers 'error type 10' at startup, and turning it off required ResEdit to change a byte in System file resource 'vm ' ID 0 - from leading 0x00000001 to 0x00000000. That was a fun blast from the past :lol:
Post Reply