Skip to content

Crash on older/low-end CPUs (EXCEPTION_ILLEGAL_INSTRUCTION in WinTray.dll due to AVX instructions) #675

Description

@Wind092

Hi,The application crashes immediately on startup when trying to initialize the system tray icon. The crash occurs in the com.kdroid.composetray native library (WinTray.dll). Reason for the crash:
The native library appears to be compiled with AVX (Advanced Vector Extensions) support. However, my processor (Intel Celeron G1820) physically lacks AVX support (Intel disabled AVX on Celeron/Pentium CPUs of that generation). As a result, the JVM encounters an EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at the specific AVX instruction vpxor xmm0, xmm0, xmm0 inside WinTray.dll and terminates. Environment details:App Version: 1.2.1 OS: Windows 11, 64 bit Build 22621 CPU: Intel(R) Celeron(R) CPU G1820 @ 2.70GHz (No AVX support) Runtime: OpenJDK Runtime Environment Microsoft-8905927 (21.0.2+13) Relevant part of the stack trace:PlaintextCurrent thread (0x00000235b6da8a50): JavaThread "WindowsTray-Thread" [_thread_in_native, id=5564, stack(0x00000035b8b00000,0x00000035b8c00000) (1024K)]

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.a.a(Ljava/lang/String;)Z+5
j com.kdroid.composetray.lib.windows.a.a(Lcom/kdroid/composetray/lib/windows/a;Ljava/util/List;)V+161

Instructions: (pc=0x00007ff89c281715)
0x00007ff89c281715: c5 f9 ef c0 48 8d 4d c0 c5 f8 11 45 c0 e8 69 fc
Suggested fix:Please consider recompiling WinTray.dll (or updating the com.kdroid.composetray dependency) with broader CPU architecture targets (e.g., standard SSE4.2 instead of AVX), or adding a fallback mechanism to disable the system tray if the native library fails to load.Thank you!

hs_err_pid5188.log

Activity

  1. KalleOlaviNiemitalo commented on May 17, 2026

    @KalleOlaviNiemitalo

    This may be a duplicate of NucleusFramework/ComposeNativeTray#401.

    AVX2 compilation is configured in https://github.com/kdroidFilter/ComposeNativeTray/blob/973ab83f4c65ce34869139869ef3789b8399719d/src/native/windows/CMakeLists.txt#L20 so I think it would have to be fixed in that repository and the Microsoft distribution of OpenJDK can't do anything about it.

  2. KalleOlaviNiemitalo commented on May 17, 2026

    @KalleOlaviNiemitalo

    "Intel® Software Development Emulator (Intel® SDE)" would apparently be able to emulate AVX instructions on hardware that does not support them. But I don't know whether it is compatible with OpenJDK.

  3. KalleOlaviNiemitalo commented on May 17, 2026

    @KalleOlaviNiemitalo

    If the Compose Native Tray Library project is unwilling to change the AVX2 requirement, then you could also try asking the SimpMusic project to add a way to avoid Compose Native Tray entirely, perhaps by setting a system property. But the NucleusFramework/ComposeNativeTray#401 issue isn't even a day old yet so it seems too early for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions