XojoScript crash on Windows

Here are the coreinfo of the Windows 10 PC which crashes XojoScript

Coreinfo v3.5 - Dump information on system CPU and memory topology
Copyright © 2008-2020 Mark Russinovich
Sysinternals - www.sysinternals.com

Intel® Pentium® CPU G4600 @ 3.60GHz
Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
Microcode signature: 000000B4
HTT * Hyperthreading enabled
HYPERVISOR - Hypervisor is present
VMX * Supports Intel hardware-assisted virtualization
SVM - Supports AMD hardware-assisted virtualization
X64 * Supports 64-bit mode

SMX - Supports Intel trusted execution
SKINIT - Supports AMD SKINIT

NX * Supports no-execute page protection
SMEP * Supports Supervisor Mode Execution Prevention
SMAP * Supports Supervisor Mode Access Prevention
PAGE1GB * Supports 1 GB large pages
PAE * Supports > 32-bit physical addresses
PAT * Supports Page Attribute Table
PSE * Supports 4 MB pages
PSE36 * Supports > 32-bit address 4 MB pages
PGE * Supports global bit in page tables
SS * Supports bus snooping for cache operations
VME * Supports Virtual-8086 mode
RDWRFSGSBASE * Supports direct GS/FS base access

FPU * Implements i387 floating point instructions
MMX * Supports MMX instruction set
MMXEXT - Implements AMD MMX extensions
3DNOW - Supports 3DNow! instructions
3DNOWEXT - Supports 3DNow! extension instructions
SSE * Supports Streaming SIMD Extensions
SSE2 * Supports Streaming SIMD Extensions 2
SSE3 * Supports Streaming SIMD Extensions 3
SSSE3 * Supports Supplemental SIMD Extensions 3
SSE4a - Supports Streaming SIMDR Extensions 4a
SSE4.1 * Supports Streaming SIMD Extensions 4.1
SSE4.2 * Supports Streaming SIMD Extensions 4.2

AES * Supports AES extensions
AVX - Supports AVX instruction extensions
FMA - Supports FMA extensions using YMM state
MSR * Implements RDMSR/WRMSR instructions
MTRR * Supports Memory Type Range Registers
XSAVE * Supports XSAVE/XRSTOR instructions
OSXSAVE * Supports XSETBV/XGETBV instructions
RDRAND * Supports RDRAND instruction
RDSEED * Supports RDSEED instruction

CMOV * Supports CMOVcc instruction
CLFSH * Supports CLFLUSH instruction
CX8 * Supports compare and exchange 8-byte instructions
CX16 * Supports CMPXCHG16B instruction
BMI1 - Supports bit manipulation extensions 1
BMI2 - Supports bit manipulation extensions 2
ADX - Supports ADCX/ADOX instructions
DCA - Supports prefetch from memory-mapped device
F16C - Supports half-precision instruction
FXSR * Supports FXSAVE/FXSTOR instructions
FFXSR - Supports optimized FXSAVE/FSRSTOR instruction
MONITOR * Supports MONITOR and MWAIT instructions
MOVBE * Supports MOVBE instruction
ERMSB * Supports Enhanced REP MOVSB/STOSB
PCLMULDQ * Supports PCLMULDQ instruction
POPCNT * Supports POPCNT instruction
LZCNT * Supports LZCNT instruction
SEP * Supports fast system call instructions
LAHF-SAHF * Supports LAHF/SAHF instructions in 64-bit mode
HLE - Supports Hardware Lock Elision instructions
RTM - Supports Restricted Transactional Memory instructions

DE * Supports I/O breakpoints including CR4.DE
DTES64 * Can write history of 64-bit branch addresses
DS * Implements memory-resident debug buffer
DS-CPL * Supports Debug Store feature with CPL
PCID * Supports PCIDs and settable CR4.PCIDE
INVPCID * Supports INVPCID instruction
PDCM * Supports Performance Capabilities MSR
RDTSCP * Supports RDTSCP instruction
TSC * Supports RDTSC instruction
TSC-DEADLINE * Local APIC supports one-shot deadline timer
TSC-INVARIANT * TSC runs at constant rate
xTPR * Supports disabling task priority messages

EIST * Supports Enhanced Intel Speedstep
ACPI * Implements MSR for power management
TM * Implements thermal monitor circuitry
TM2 * Implements Thermal Monitor 2 control
APIC * Implements software-accessible local APIC
x2APIC * Supports x2APIC

CNXT-ID - L1 data cache mode adaptive or BIOS

MCE * Supports Machine Check, INT18 and CR4.MCE
MCA * Implements Machine Check Architecture
PBE * Supports use of FERR#/PBE# pin

PSN - Implements 96-bit processor serial number

PREFETCHW * Supports PREFETCHW instruction

Maximum implemented CPUID leaves: 00000016 (Basic), 80000008 (Extended).
Maximum implemented address width: 48 bits (virtual), 39 bits (physical).

Processor signature: 000906E9

Logical to Physical Processor Map:
– Physical Processor 0 (Hyperthreaded)
Physical Processor 1 (Hyperthreaded)

Logical Processor to Socket Map:
**** Socket 0

Logical Processor to NUMA Node Map:
**** NUMA Node 0

No NUMA nodes.

Logical Processor to Cache Map:
– Data Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64
– Instruction Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64
– Unified Cache 0, Level 2, 256 KB, Assoc 4, LineSize 64
**** Unified Cache 1, Level 3, 3 MB, Assoc 12, LineSize 64
Data Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64
Instruction Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64
Unified Cache 2, Level 2, 256 KB, Assoc 4, LineSize 64

Logical Processor to Group Map:
**** Group 0

Hi Julian, does this info give you any ideas?

Alas not, I’ve yet to find a computer near me that doesn’t have avx to test all this against. As Joe mentioned if xojo is using an instruction that isn’t supported then there won’t be an easy fix for the desktop pc, the server should work but probably needs patching/flashing. It might be worthwhile putting a new ticket in about all this and bringing it to the attention of xojo support but if this wasn’t fixed in the past there’s probably less chance of that happening now.

@Marc_COURAUD I saw that your ticket <https://xojo.com/issue/62386> was closed as non-reproduceable so I set out to reproduce it here.

I tried many machines I have here including ones without AVX (which I finally found) and I’ve also tried it on various editions of vmware with no luck.

I did some reading on disabling processor instructions on virtualbox so I decided to give that a try and see if I could get a vm into a state where this wouldn’t work so someone at xojo could at least reproduce the problem. On my main desktop windows machine here where code posted above by @Joe_Ranieri worked fine I installed virtualbox 6.1.15 r140961 (qt5.6.2) and downloaded the MSEdge on Win10 (x64) Stable 1809 iso from Virtual Machines - Microsoft Edge Developer for virtualbox.

After installing the Guest Additions to increase the screen size of the vm I installed installed Xojo 2020r1.2 and tried the code from Joe above much to my surprise it crashed! I didn’t need to make any modifications to the vm.

Hopefully @William_Yu, @Paul_Lefebvre and/or @Robin_Lauryssen-Mitchell can use this information to try it at their end with the information I posted above and finally get to the bottom of this issue.

Side note, my crashing vm actually reported AVX was present, coreinfo64 (from insode the vm) posted here for reference. If anyone from Xojo wants to ask me questions about the set up or have a video of it working outside the vm then failing inside the vm feel free to PM me.

Intel(R) Core(TM) i9-9900X CPU @ 3.50GHz
Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
Microcode signature: 00000000
HTT             *       Hyperthreading enabled
HYPERVISOR      *       Hypervisor is present
VMX             -       Supports Intel hardware-assisted virtualization
SVM             -       Supports AMD hardware-assisted virtualization
X64             *       Supports 64-bit mode

SMX             -       Supports Intel trusted execution
SKINIT          -       Supports AMD SKINIT

NX              *       Supports no-execute page protection
SMEP            -       Supports Supervisor Mode Execution Prevention
SMAP            -       Supports Supervisor Mode Access Prevention
PAGE1GB         -       Supports 1 GB large pages
PAE             *       Supports > 32-bit physical addresses
PAT             *       Supports Page Attribute Table
PSE             *       Supports 4 MB pages
PSE36           *       Supports > 32-bit address 4 MB pages
PGE             *       Supports global bit in page tables
SS              -       Supports bus snooping for cache operations
VME             *       Supports Virtual-8086 mode
RDWRFSGSBASE    *       Supports direct GS/FS base access

FPU             *       Implements i387 floating point instructions
MMX             *       Supports MMX instruction set
MMXEXT          -       Implements AMD MMX extensions
3DNOW           -       Supports 3DNow! instructions
3DNOWEXT        -       Supports 3DNow! extension instructions
SSE             *       Supports Streaming SIMD Extensions
SSE2            *       Supports Streaming SIMD Extensions 2
SSE3            *       Supports Streaming SIMD Extensions 3
SSSE3           *       Supports Supplemental SIMD Extensions 3
SSE4a           -       Supports Streaming SIMDR Extensions 4a
SSE4.1          *       Supports Streaming SIMD Extensions 4.1
SSE4.2          *       Supports Streaming SIMD Extensions 4.2

AES             *       Supports AES extensions
AVX             *       Supports AVX instruction extensions
FMA             -       Supports FMA extensions using YMM state
MSR             *       Implements RDMSR/WRMSR instructions
MTRR            *       Supports Memory Type Range Registers
XSAVE           *       Supports XSAVE/XRSTOR instructions
OSXSAVE         *       Supports XSETBV/XGETBV instructions
RDRAND          *       Supports RDRAND instruction
RDSEED          *       Supports RDSEED instruction

CMOV            *       Supports CMOVcc instruction
CLFSH           *       Supports CLFLUSH instruction
CX8             *       Supports compare and exchange 8-byte instructions
CX16            *       Supports CMPXCHG16B instruction
BMI1            -       Supports bit manipulation extensions 1
BMI2            -       Supports bit manipulation extensions 2
ADX             -       Supports ADCX/ADOX instructions
DCA             -       Supports prefetch from memory-mapped device
F16C            -       Supports half-precision instruction
FXSR            *       Supports FXSAVE/FXSTOR instructions
FFXSR           -       Supports optimized FXSAVE/FSRSTOR instruction
MONITOR         *       Supports MONITOR and MWAIT instructions
MOVBE           *       Supports MOVBE instruction
ERMSB           -       Supports Enhanced REP MOVSB/STOSB
PCLMULDQ        *       Supports PCLMULDQ instruction
POPCNT          *       Supports POPCNT instruction
LZCNT           *       Supports LZCNT instruction
SEP             *       Supports fast system call instructions
LAHF-SAHF       *       Supports LAHF/SAHF instructions in 64-bit mode
HLE             -       Supports Hardware Lock Elision instructions
RTM             -       Supports Restricted Transactional Memory instructions

DE              *       Supports I/O breakpoints including CR4.DE
DTES64          -       Can write history of 64-bit branch addresses
DS              -       Implements memory-resident debug buffer
DS-CPL          -       Supports Debug Store feature with CPL
PCID            *       Supports PCIDs and settable CR4.PCIDE
INVPCID         *       Supports INVPCID instruction
PDCM            -       Supports Performance Capabilities MSR
RDTSCP          *       Supports RDTSCP instruction
TSC             *       Supports RDTSC instruction
TSC-DEADLINE    -       Local APIC supports one-shot deadline timer
TSC-INVARIANT   *       TSC runs at constant rate
xTPR            -       Supports disabling task priority messages

EIST            -       Supports Enhanced Intel Speedstep
ACPI            -       Implements MSR for power management
TM              -       Implements thermal monitor circuitry
TM2             -       Implements Thermal Monitor 2 control
APIC            *       Implements software-accessible local APIC
x2APIC          -       Supports x2APIC

CNXT-ID         -       L1 data cache mode adaptive or BIOS

MCE             *       Supports Machine Check, INT18 and CR4.MCE
MCA             *       Implements Machine Check Architecture
PBE             -       Supports use of FERR#/PBE# pin

PSN             -       Implements 96-bit processor serial number

PREFETCHW       *       Supports PREFETCHW instruction

Maximum implemented CPUID leaves: 00000016 (Basic), 80000008 (Extended).
Maximum implemented address width: 48 bits (virtual), 46 bits (physical).

Processor signature: 00050654

Logical to Physical Processor Map:
*  Physical Processor 0

Logical Processor to Socket Map:
*  Socket 0

Logical Processor to NUMA Node Map:
*  NUMA Node 0

No NUMA nodes.

Logical Processor to Cache Map:
*  Data Cache          0, Level 1,   32 KB, Assoc   8, LineSize  64
*  Instruction Cache   0, Level 1,   32 KB, Assoc   8, LineSize  64
*  Unified Cache       0, Level 2,    1 MB, Assoc  16, LineSize  64
*  Unified Cache       1, Level 3,   19 MB, Assoc  11, LineSize  64

Logical Processor to Group Map:
*  Group 0
1 Like

Julian, thank you very much for these tests!
Tomorrow I will also try a program compiled with xojo 2020r12, on the PC where the program usually crashes

With Xojo 2020r12, crash always

“Hopefully @William_Yu, @Paul_Lefebvre and/or @Robin_Lauryssen-Mitchell can use this information to try it at their end with the information Julian posted above and finally get to the bottom of this issue.”

Are you 100% sure the values are not different inside the format (e.g. exactly: Format(0.,“0.00”)) function?

  • What i mean by this is; is the string “0.00” clean of invisible characters?

And does your Context class have a Format function ?

Yes I’m sure there is no invisible character, I checked.
And in the Context there is no Format function

It also crashes with Joe’s simple code
Sub Baz (d as Double)
End Sub
Baz (0.0)

Does anyone else out there run virtualbox on a windows pc?

If so, could you try running the example project in examples>advanced>xojoscript>xojoscript.xojo_binary_project on 2020r2.1. All you need to do to test the problem is run the project and type the following into the top box and hit Run

Sub Baz (d as Double)
End Sub
Baz (0.0)

If the window disappears then you’ve reproduced the problem. Could you let us know if you have reproduced it or not, if you have, then try the same thing from outside the vm and let us know how that went.

  1. I managed/didn’t manage to reproduce the problem inside virtualbox on my windows pc
  2. I managed/didn’t manage to reproduce the problem on my windows pc

If you don’t have virtual box and a windows 10 iso but would like to help with the test, you can get the two from the following locations:

VirtualBox
Windows 10 Test VM (bottom then top option)

Hi Marc, I note that you added a new ticket in about this <https://xojo.com/issue/62678>, nice, hopefully Robin/William will be able to reproduce it now.

On a side note, do you have any computers to hand where it works without crashing?

If so, are you able to perform the above VirtualBox test to see if the reproduction steps work for you?

If we keep this thread relevant, maybe a few windows users out there will try the test themselves, remember its in all our interests to ensure that xojoscript is as stable as possible in windows, you might never know when you’ll need to use it.

Ah! I don’t have a PC, I’m testing on Windows with Parallels, on my Mac (and it works)

Hope others can try

Ok, I just tried it on another PC I have here an i7-3770 with a different motherboard and it worked both in the host and in the vm.

I then shut the vm down and ran the following two commands which remove AVX support from the vm and the vm would no longer run the script.

C:\Program Files\Oracle\VirtualBox>VBoxManage setextradata "MSEdge - Win10" "VBoxInternal/CPUM/IsaExts/AVX" "0"

C:\Program Files\Oracle\VirtualBox>VBoxManage setextradata "MSEdge - Win10" "VBoxInternal/CPUM/IsaExts/AVX2" "0"

If anyone is happy/confident testing this on their mac using virtualbox and removing avx support from the vm using the commands above (their location will be different on the mac) then please could you let us know the outcome of the test. "MSEdge - Win10" would be the name of the vm you’re testing it on (don’t test it on anything other than the fresh iso downloaded from the link here).

William has answered in the case 62678

Good news, William has at least been able to reproduce the problem now (thanks for the quick replies William), fingers crossed for a timely fix.

1 Like

yes !

1 Like