Skip to content

Crash on older Xeon CPU on Windows 10 Pro #401

@acarlsen

Description

@acarlsen

With version 1.3.0 I have user with an older Xeon CPU reporting a crash when enabling tray

CPU: Intel(R) Xeon(R) CPU E5520 @ 2.27GHz

Crash:

Current thread (0x000001c0acf5d6e0):  JavaThread "WindowsTray-Thread"        [_thread_in_native, id=13340, stack(0x0000007e16700000,0x0000007e16800000) (1024K)]

Stack: [0x0000007e16700000,0x0000007e16800000],  sp=0x0000007e167fef70,  free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [WinTray.dll+0x1715]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.kdroid.composetray.lib.windows.WindowsNativeBridge.nativeGetNotificationIconsPosition([I)I+0
j  com.kdroid.composetray.lib.windows.WindowsTrayManager.safeGetTrayPosition(Ljava/lang/String;)Z+6
j  com.kdroid.composetray.lib.windows.WindowsTrayManager.runMessageLoop()V+49
j  com.kdroid.composetray.lib.windows.WindowsTrayManager.initialize$lambda$0$0(Lcom/kdroid/composetray/lib/windows/WindowsTrayManager;Ljava/util/List;)V+121
j  com.kdroid.composetray.lib.windows.WindowsTrayManager$$Lambda+0x0000000800c32520.run()V+8
j  java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@21.0.9
j  java.lang.Thread.run()V+19 java.base@21.0.9
v  ~StubRoutines::call_stub 0x000001c08d861015

siginfo: EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d)

Error as explained by Claude:

Now I have enough context. Here's a precise breakdown of where and why the crash occurs:

Call Chain (Top → Bottom)

WindowsTrayManager.initialize()         ← starts the tray thread
  → WindowsTrayManager.runMessageLoop() ← runs Windows message pump
    → WindowsTrayManager.safeGetTrayPosition()
      → WindowsNativeBridge.nativeGetNotificationIconsPosition([I)  ← JNI call
        → WinTray.dll+0x1715             ← CRASH HERE

Root Cause: Illegal CPU Instruction in WinTray.dll
The crash is at WinTray.dll offset 0x1715. Looking at the disassembly in the log, the exact faulting instruction is:
0x00007fff5d191715: c5 f9 ef c0 ← VPXOR ymm0, ymm0, ymm0 (AVX instruction)

0xc5 0xf9 0xef is a VEX-encoded AVX instruction (VPXOR). Your CPU is an Intel Xeon E5520 (Nehalem, 2009) — this processor does not support AVX. AVX was introduced with Sandy Bridge (2011).

WinTray.dll was compiled targeting AVX-capable CPUs and uses AVX vector instructions for efficiency (likely just for zeroing a register). When the CPU hits this instruction, it raises EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d).

Dont know if it fixable or worth is for an old CPU, but would be nice since the exception in uncatchable.
Or fail silently perhaps.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingp0

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions