[Bug 60274] New: Avalonia/.NET app crashes with X11 BadLength on _NET_WM_ICON right after ITaskbarList3::SetOverlayIcon stub call
http://bugs.winehq.org/show_bug.cgi?id=60274 Bug ID: 60274 Summary: Avalonia/.NET app crashes with X11 BadLength on _NET_WM_ICON right after ITaskbarList3::SetOverlayIcon stub call Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@list.winehq.org Reporter: erickdittmann94@gmail.com Target Milestone: --- Distribution: --- SUMMARY A modern self-contained .NET desktop application ("3D Print Manager" 1.6.1, built with the Avalonia UI framework) crashes under Wine just before its main window appears, with an X11 "BadLength" protocol error. The crash happens immediately after a call to ITaskbarList3::SetOverlayIcon (implemented in Wine only as a no-op stub). Right after that stub call, the app tries to set a new icon via SetClassLongPtr/WM_SETICON, and Wine computes an absurdly large icon data size (about 16,000,002 32-bit elements, i.e. ~4000x4000 pixels), producing an X_ChangeProperty request that exceeds the maximum X11 request size and kills the process. ENVIRONMENT - Distro: Linux Mint 22.3 "Zena" (Ubuntu 24.04 "Noble" base) - Kernel: Linux 7.0.0-30-generic - Wine: wine-experimental.bleeding.edge.11.0 (via Bottles' "soda-11.0-7" runner, also reproduced with Bottles' "sys-wine-11.0" runner) - Bottle architecture: win64 - GPU: Intel UHD Graphics (JSL), Mesa 26.1.6 (Vulkan/DXVK) - Reproduced both via the Bottles wrapper and by invoking the wine binary directly against the same WINEPREFIX AFFECTED APPLICATION - "3D Print Manager" 1.6.1 (My3DPrintManager.Desktop.exe) - Self-contained .NET app (TFM net10.0, Microsoft.NETCore.App 10.0.8) - UI framework: Avalonia (Avalonia.Desktop, Avalonia.Win32, Avalonia.WebView2) - Embeds Microsoft Edge WebView2 Runtime - Uses a Squirrel.Windows-style install/update layout (Update.exe + "current" app folder) STEPS TO REPRODUCE 1. Create a 64-bit Wine bottle (Bottles, "application" environment). 2. Run the 3DPrintManager-1.6.1-Setup.exe installer inside the bottle (it installs the Microsoft Edge WebView2 Runtime as a missing dependency). 3. Run the installed app: .../AppData/Local/3DPrintManager/current/My3DPrintManager.Desktop.exe 4. The app successfully initializes its Vulkan/DXVK graphics pipeline, creates its main window, and sets a normal window icon (small+large icon, 1284 elements in _NET_WM_ICON - a correctly packed 16x16+32x32 icon pair). 5. The app then calls ITaskbarList3::SetOverlayIcon (logged by Wine as a "fixme:explorerframe...stub!"). 6. Immediately after, the app issues another SetClassLongPtr/WM_SETICON call with NEW icon handles. Wine then tries to set _NET_WM_ICON with a data size of 16,000,002 32-bit elements - not a plausible icon size (the largest icon resource embedded in the app is 256x256 = 65,538 elements including header, i.e. ~244x smaller than the requested size). 7. X11 rejects the oversized X_ChangeProperty request with "BadLength", which immediately kills the Wine process - the main window is never shown. 100% reproducible across multiple runs. EXACT ERROR X Error of failed request: BadLength (poly request too large or internal Xlib length error) Major opcode of failed request: 18 (X_ChangeProperty) I have a longer WINEDEBUG=+x11drv debug log excerpt available and can attach it on request. MY OWN DIAGNOSIS 1. The first two SetWindowIcons calls (same icon handles, 1284 elements = valid 16x16+32x32 pair) work fine - the issue is not the app's static PE icon resource (verified separately, see point 4). 2. The crash happens exactly on the THIRD SetWindowIcons call, which immediately follows the taskbar_list_SetOverlayIcon stub and uses NEW icon handles. This strongly suggests the app creates a new icon object at runtime (presumably as part of its taskbar overlay-icon logic, e.g. compositing a base icon with an overlay badge via GDI+/WIC). 3. Since ITaskbarList3::SetOverlayIcon is only a stub in Wine (no real overlay rendering, but apparently returns S_OK), I suspect the app then proceeds with a bitmap/icon handle whose size/dimensions were never properly initialized by Wine - Wine then computes an XChangeProperty request with a physically nonsensical size (~4000x4000 px instead of a real icon size like 16/32/48/64/128/256). 4. EXCLUSION TEST: I replaced the app's largest embedded icon resource (256x256 PNG-compressed RT_ICON, 49443 bytes) with a classic uncompressed 64x64 bitmap icon (adjusting the GRPICONDIR resource accordingly) - the crash reproduced identically (same size, 16,000,002). This confirms the cause is NOT the static PE icon resource, but runtime behavior around SetOverlayIcon. 5. Also ruled out: DPI scaling (forced LogPixels=96, no change), window management (HKCU\Software\Wine\X11 Driver\Managed=N, no change), virtual desktop mode (explorer /desktop=..., no change). A separate, unrelated crash (icu.dll forwarded-export failure, "find_forwarded_export ... icuuc68.u_charsToUChars_68") had to be worked around first via WINEDLLOVERRIDES=icu.dll= to even reach this bug - mentioned for completeness, likely a separate bug. SUGGESTED COMPONENT winex11.drv (possibly the actual root cause is in dlls/explorerframe's SetOverlayIcon stub, or in the icon-creation code it triggers - filing under winex11.drv since that's where the crash itself occurs) Happy to attach the full WINEDEBUG=+x11drv,+icon log and/or try to build a minimal .NET repro (calling ITaskbarList3::SetOverlayIcon then setting an icon) if useful. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla