WinUAE icon indicating copy to clipboard operation
WinUAE copied to clipboard

Crash when changing JIT settings and rebooting

Open midwan opened this issue 7 years ago • 14 comments

I have a crash I can recreate always, along with some "strange" behavior regarding the JIT settings.

WinUAE version 3.5.0 x64, from the official installer package. Running on Windows 10 x64 with the latest updates.

I have a config to emulate a CStormPPC (though I only use the 060 part), boot in a default Workbench 3.1 installation with no extras. I use it to run Lightwave.

Here's a screenshot of my CPU and FPU settings: image

Booting into Workbench works fine, but opening up the WinUAE window again shows that "Direct" mode has been changed to "Indirect". Changing it back to Direct, does not stick (it switches back). However, disabling JIT completely and then re-enabling it, allows Direct to stay on. That's one part of the strange behavior.

Part two, is that if right after disabling/enabling JIT and enabling Direct, you try to reboot the Amiga with the keyboard (Ctrl-A-A), then WinUAE crashes. Every time.

Let me know if you'd like more info to help troubleshoot this (e.g. config file, other system details, etc)

midwan avatar Sep 15 '17 17:09 midwan

JIT Direct can't reliably work with memory mapping that has mirrors (like CSPPC maprom at the very end of address space). It shouldn't crash but JIT can cause side-effects when it does not like what it sees..

Check winuaelog.txt (enable in misc panel) for JIT related messages.

If you don't need PPC, I recommend using "plain" 68060 mode without any emulated accelerator boards.

tonioni avatar Sep 15 '17 20:09 tonioni

Understood, just thought I'd let you know because it seemed weird - and of course due to the crash.

Plain 060 works fine for me.

midwan avatar Sep 16 '17 13:09 midwan

Could you attach or email your config file? I'd like to find out why it crashes.

tonioni avatar Sep 18 '17 16:09 tonioni

Of course, please find the config file attached below: Lightwave060.zip

Like I said, this is booting using a default "vanilla" Workbench 3.1 installation, with the only modification being the 68040/68060 libraries from phase5.

Steps to recreate the crash:

  • Check the configuration, ensure "Direct" mode is enabled in the JIT settings
  • Boot in the Workbench 3.1 environment
  • Open WinUAE Gui (F12), check the JIT settings. Direct is disabled
  • Reduce JIT Ram to zero (effectively disabling JIT), then check JIT enable again.
  • Check Direct if it wasn't checked, then resume emulation.
  • Do a soft-reset in the Amiga side (Ctrl-Amiga-Amiga)
  • WinUAE crashes

WinUAE is 3.5.0 stable, x64 version.

midwan avatar Sep 18 '17 17:09 midwan

Do you need to boot in WB to cause the crash or does same happen if you don't have any bootable devices? If not, does it happen if you boot without startup-sequence, run setpatch (so that 680x0.libraries get activated) and then adjust JIT+reset? (I am trying to reduce unknown variables)

tonioni avatar Sep 18 '17 17:09 tonioni

@tonioni I just tested it without any drives (floppy or hard) connected. I can recreate the issue following the same steps above, even without booting into anything.

midwan avatar Sep 19 '17 17:09 midwan

I can't duplicate the crash (does 32-bit version also crash?) but I can get it to hang at boot. It happened because your config has A1200 hardware but A4000 ROM. Don't mix them, it can cause hangs when A4000 ROM does Fat Gary/RAMSEY register accesses. IDE hardware is also different.

tonioni avatar Sep 23 '17 18:09 tonioni

@tonioni I tried it again today, on two separate Windows 10 systems. I got the same crash, following the same steps. And I used a A4000 config as a starting point (Quickstart->A4000 PPC)...

:(

midwan avatar Sep 24 '17 08:09 midwan

Interestingly, the 32-bit version also crashes but manages to produce a minidump before that. I'm attaching it here, in case it helps: winuae_3.5.0_R_2017.09.24_10.27.21.dmp.zip

midwan avatar Sep 24 '17 08:09 midwan

maybe it's a good idea to post md5 checksum of the ROMs you're using.

rofl0r avatar Sep 24 '17 12:09 rofl0r

I'm using the Amiga Forever 3.1 A4000 ROM, MD5: 8B54C2C5786E9D856CE820476505367D And the CyberstormPPC v44.71 ROM, MD5: E6BBFAC8C3BC0BE362107518737A9BD1

midwan avatar Sep 25 '17 11:09 midwan

It probably is CSPPC flash config difference. Checksum is useless because CSPPC boot menu settings are saved in same flash rom. Try switching Map ROM option in menu, try also with "clean" image. (keep ESC pressed at boot, if it boots too fast, tick 1 second boot option in misc panel)

tonioni avatar Sep 25 '17 15:09 tonioni

@tonioni I tried changing the MapROM option in the CSPPC boot menu, but saw no difference (WinUAE hangs/crashes again). Changing the CPU options in the boot menu (for example, enabling the Caches etc) does not seem to make a difference either.

I also tried older versions of the CSPPC firmware, 44.67, 44.69 and 44.71 all behave the same way. I can give you a disassembly of the exact instructions that crashed, if that helps?

midwan avatar Sep 26 '17 09:09 midwan

@tonioni Just to confirm that I still get WinUAE 4.9.1 to crash, following the steps mentioned above:

  • Use A4000 PPC quickstart option
  • Start emulation
  • Open GUI, Disable JIT -> resume
  • Open GUI, Enable JIT -> resume
  • Reset emulation (by keyboard or by the GUI Reset option)
  • Crash

midwan avatar Mar 09 '22 19:03 midwan