On Mon Apr 27 16:38:37 2026 +0000, Alexandre Julliard wrote:
That's quite ugly. I don't see why you'd need that sort of thing, particularly if you are using separate processes. The Java side should not need to run the same code as the Wine side. This is mainly for preserving existing semantics and compatibility within the shared code paths.
The original wine_dbgstr_rect() relies on Wine TEB-backed state through the debug infrastructure. On pure Java threads there is no Wine TEB, and calling the standard helper results in a crash. Since parts of the ioctl path are intentionally shared between Wine and Java contexts, this provides a minimal local replacement that behaves similarly but does not depend on Wine thread state. The goal is to avoid duplicating the code paths or splitting the file while keeping logging behavior consistent. If preferred, I can look into restructuring things further to reduce the need for this, but for now this keeps the existing code working safely in both contexts with minimal changes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10710#note_137771