http://bugs.winehq.org/show_bug.cgi?id=55955 --- Comment #19 from gerard.labadie@sysgroup.fr --- I have solved it with the procedures on my github https://github.com/k3ck3c/captvty3-wine-patcher traanslation from https://github.com/k3ck3c/captvty3-wine-patcher/blob/main/docs/history.md History Context Captvty 3.0.1.24 does not work correctly on recent versions of Wine. The main symptoms observed were: immediate crash upon startup; errors related to Windows themes (UxTheme / Visual Styles); crash during a download; crash at the end of a download. The goal of this project is not to modify how Captvty functions, but simply to enable it to run correctly on Wine. Analysis The analysis began by comparing Captvty's behavior across several versions of Wine. As the program is developed in .NET, the investigation was then conducted directly at the IL code level using Mono.Cecil and several small tools developed for this project. The goal was not to fully de-obfuscate Captvty, but to identify calls to the .NET framework likely to cause the observed exceptions. This approach quickly made it possible to isolate several assumptions made by the application that hold true on Windows but not always on Wine. First fix: startup The first crash occurred during application initialization. The method in question is: _zcA::_UXB() This routine performs several Windows-specific initialization tasks that are not essential for Captvty to run on Wine. The fix consists of neutralizing this method. Second fix: Windows theme colors Captvty queries several colors using: VisualStyleRenderer.GetColor(...) Wine does not fully replicate this behavior. The fix replaces this initialization with generic colors: SystemColors.Window SystemColors.WindowText The appearance remains very similar while becoming independent of Windows themes. Third fix: temporary file length During a download, Captvty may call: new FileInfo(path).Length even though the temporary file does not yet exist. The fix first checks: File.Exists(path) and returns a length of zero if the file is not yet present. Fourth fix: stream position Another exception originated from: Stream.Position while the stream was momentarily null. The fix simply returns 0 until the stream is initialized. Fifth fix: download completion At the end of a download, Captvty creates an object representing the downloaded file. Depending on when this operation occurs, the temporary file may have already been renamed. An additional File.Exists() check prevents an exception regarding FileInfo.Length. Validation The fix's operation was validated through several tests: full startup of Captvty; browsing show lists; complete download of a show; playback of the resulting file using mpv; stream verification using MediaInfo. Notably, downloading a show larger than 500 MB served to validate the final fix. Project philosophy This repository intentionally does not distribute any modified Captvty executables. The user retains their original copy of Captvty and applies the fix themselves. This approach offers several advantages: respect for the work of the Captvty author; ability to verify the patcher's source code; reproducibility of changes; no distribution of a modified executable with unverifiable content. Future outlook Ideally, this patcher would one day become unnecessary. Two scenarios are possible: Wine evolves and fully replicates the behaviors expected by Captvty; or the Captvty author directly incorporates equivalent robustness checks. In either case, this project will have fulfilled its purpose. -- 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.