Skip to content

SWG Legends launcher: JavaFX crashes on login click in Wine 11.9 (Gcenx) #84

@nickk02

Description

@nickk02

What works elsewhere

The SWG Legends launcher works in CrossOver (proprietary, paid) on the same Mac. Confirmed by user 2026-05-27.

What's broken in Crosswire

The launcher's JavaFX UI crashes shortly after the user clicks "Login" in the launcher window. Two distinct crash signatures depending on prism pipeline:

Crash A — JavaFX CSS access violation

  • _JAVA_OPTIONS=-Dprism.order=j2d -Xint
  • Renders the login screen ✓
  • On Login click: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7bf2800b
  • JVM stack ends in java.lang.Object.getClass() inside com.sun.javafx.css.BitSet.equals()StyleManager$Key.equals()HashMap.get()Node.reapplyCss()Control.impl_processCSS()
  • Triggered when JavaFX reapplies CSS for the post-login UI state transition
  • Wine address 0x7bf28* suggests Wine GDI / memory layout interaction

Crash B — JVM internal safepoint error

  • _JAVA_OPTIONS=-Dprism.order=sw -Xint
  • Renders the login screen ✓
  • On Login click (or shortly after, in a background WebKit thread): Internal Error (safepoint.cpp:712), fatal error: Illegal threadstate encountered: 6
  • Current thread: JavaThread "Disposer" daemon (WebKit's class disposer)
  • Java stack ends in URLClassLoader.findClass during dynamic class loading
  • Only 1017k of stack free at crash — small but not exhausted

What we've eliminated

Theory Eliminated by
Per-program env vars not applied Confirmed via run log: _JAVA_OPTIONS = "-Dprism.order=j2d -Xint" correctly present in process environment
Stale 2017 bundled JRE Replaced with Liberica JDK 8u492 Full (April 2025, includes OpenJFX) → launcher process runs but no visible window with -Dprism.order=sw and auto
Bottle config CrossOver bottle has identical JRE binary (md5 match), no special DLL overrides, same win10_64 template
AeDebug debugger leak Disabled at bottle creation; doesn't change crash behaviour, only suppresses winedbg spawn
Missing runtimes corefonts installed via winetricks; vcrun2019 fails to install (vc_redist returns status 41 — separate issue)
FreeType not found at runtime Engine wrapper now sets DYLD_FALLBACK_LIBRARY_PATH (commit 8e23a23)
Vulkan / GPU Launcher is pure JavaFX, doesn't need Vulkan. Game client does, but launcher fails before any handoff

Engine in use

  • Wine 11.9 from Gcenx
  • All CW patches applied (CW 20760 WoW64 lretq, CW 24945 + 25719 + 18947 + 23427 virtual.c mprotect, CW 22131 debug-reg fake-success, CW 20186 + 24256 signal_x86_64)
  • Engine ad-hoc signed (Phase 1)
  • Crosswire build with env-var routing fix (eeaf999) + AeDebug=0 on new bottles (66713d2) + portable-exe adoption (39769bd) + locale-plist salvage (e2f4264)

Diff against CrossOver — what's different

The only known difference is the Wine binary itself: CrossOver ships their own Wine fork (Version = "26.1.0.39808" in cxbottle.conf) with proprietary patches. Their bottle is otherwise identical to ours in template, registry, and bundled JRE.

CodeWeavers contributes a subset of their patches back to upstream Wine over time, often months later. The relevant fix is likely either:

  • Already in a newer upstream Wine (post-11.9)
  • Or in a CW HACK that hasn't been published

Reproduction

  1. Fresh bottle, Win10, AeDebug=0
  2. Copy SWGLegendsLauncher.zip contents into drive_c/Program Files (x86)/StarWarsGalaxies/
  3. Program Settings/SWGLegendsLauncher.exe.plist with _JAVA_OPTIONS=-Dprism.order=j2d -Xint
  4. Launch via Crosswire's Run button or:
    WINEPREFIX=<bottle> WINEDEBUG=fixme-all _JAVA_OPTIONS="-Dprism.order=j2d -Xint" \
      Engine/bin/Crosswire64 start /unix .../SWGLegendsLauncher.exe
    
  5. Type any credentials, click Login → crash within seconds with hs_err_pid*.log dropped beside the .exe

Investigation paths

  • Try a newer Wine (11.10+, 12, staging) — see if upstream has incorporated relevant CW fixes
  • Try a different Wine fork with broader patch surface (e.g., Wine 11.9 with the additional CW patches that Gcenx didn't pick up)
  • Build CrossOver's Wine source (if available) against the same toolchain to confirm it's the patch set
  • Compare backtrace addresses in hs_err to Wine's loaded libs at crash time — narrow which Wine subsystem returns garbage in Object.getClass() path

Crash logs

Both hs_err files preserved in the SWG bottle. Will attach on the issue once the bottle's PID-numbered files are captured.

Out of scope (don't chase here)

  • The launcher's auth-thread CLOSE_WAIT we saw earlier — that was a red herring, current crash is upstream of any network call
  • The mid-morning bottle wipe — separate issue, fixed by 66713d2 and atomic engine swaps in scripts/build-vulkan-engine.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingswg-legendsSWG Legends launcher compatibility

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions