copy / v86

x86 PC emulator and x86-to-wasm JIT, running in the browser
https://copy.sh/v86/
BSD 2-Clause "Simplified" License
19.63k stars 1.37k forks source link

Uncaught RangeError: Maximum call stack size exceeded #393

Open cleanremote opened 3 years ago

cleanremote commented 3 years ago

When booting Windows 8.1 with patched ntoskrnl/winload, or with PAE/NX bits enabled in the CPUID, the system halts and I get this error. But it works just fine in QEMU: qemu-system-x86_64 -hda 8.1.img -m 1G -M accel=hvf --cpu host,-pae,-nx

image

copy commented 3 years ago

This looks similar to the issue that prevented Windows 2000 from booting. Did you change the PC type from ACPI to Standard PC (see below)?

104830650-e66ea080-5880-11eb-82f9-cf75d6a41194

cleanremote commented 3 years ago

It only has ACPI PC types.

copy commented 3 years ago

In that case you may want to try the experimental "Enable ACPI" option.

cleanremote commented 3 years ago

It doesn't work with or without ACPI. The error happens after the resolution changes to 1024x768, but before the Windows logo shows up, so it seems to happen very early in the Windows boot process.

BelleNottelling commented 3 years ago

Could you provide info on how to patch 8.1 to not need PAE/NX? Thanks

Pixelsuft commented 2 years ago

I've uploaded patch here You will also need to edit some values with bcdedit to skip sign checks (run it from the system32):

bcdedit /set {default} onecpu on
bcdedit /set {default} NoIntegrityChecks yes
bcdedit /set {default} testsigning off
bcdedit /set {default} bootmenupolicy legacy
bcdedit /set {bootmgr} displaybootmenu yes

Every boot you should press F8 to open boot menu and select no sign checks option. Instead of black screen with error, you will stuck at windows logo. QEMU with similar configuration boots windows (-cpu pentium3,sse2=on). Windows 8 Consumer Preview (should work without any patches) also stucks at windows logo (But it works in QEMU, even without sse2). Seems to be it stucks early - boot log option doesn't work. Also if you disable graphics mode (when boot menu displaying in text mode and loading screen in vga like in vista) it will stuck in text mode.

Pixelsuft commented 2 years ago

I've tried to boot some beta ISOs: 6.1.7850.0 - yes 6.2.7927.0 - yes 6.2.7955.0 - yes 6.2.7963.0 - yes 6.2.7973.0 - yes 6.2.7989.0 - yes 6.2.8002.0 - yes 6.2.8102.0 - yes 6.2.8128.0 - yes 6.2.8133.0 - yes 6.2.8148.0 - no (doesn't require nx) 6.2.8155.0 - no 6.2.8176.0 - no 6.2.8195.0 - no 6.2.8250.0 - no ... 6.2.8331.0 - no (requires nx)

Also I've tried to install some of them: 6.2.7973 works. 6.2.7989 stucks: 7989 6.2.8002 works. 6.2.8102 works: 8102 6.2.8118 works. 6.2.8128 has infinite loading (it's laggy also): 8128 6.2.8133 (why black screen? in qemu works fine): 8133 With fast startup (hybrid boot) setting I'm getting this (seems to be acpi has no support): warn Seems to be currently 6.2.8118 is the newest version that works.