https://bugs.winehq.org/show_bug.cgi?id=51824
--- Comment #8 from Rémi Bernon rbernon@codeweavers.com --- I've sent your patches, nice catch.(In reply to Ivo Ivanov from comment #7)
(In reply to Rémi Bernon from comment #4)
Regarding the crash you should be able to attach gdb to the winedevice.exe processes (usually there's two of them an no real way to tell which one is running winebus.sys), and maybe get a stacktrace from there.
This gdb python script can get you symbols after gdb is attached: https://www.winehq.org/pipermail/wine-devel/2021-June/189134.html
Thanks! The script works great. IMO they should consider adding it to the tools dir. It's really helpful.
Yeah it's not perfect though, and it would be better if we could find a way to tell gdb about the loaded modules dynamically. It only hooks dlopen, although maybe there's some way, using systemtap probes.
I still cannot reproduce the crash. This weekend will test it with longer game playing sessions, while TrueDrive being launched in the background. The issue was always present (TrueDrive disconnected from the wheel) while switching between games lately. Since it's just controlling software, there's no problem to just relaunch it. But with the new joystick_hid everything will go through this path, so it's important to find it.
I'm not sure to understand where it crashes but I've found places where I misused CancelIoEx, in xinput but also in dinput, and which could cause client applications to crash after unacquiring dinput devices. Maybe it's something else, but I've sent some patches to fix those today nonetheless.
Also while searching for possible issues in winebus.sys, have found few possible memory leaks in unixlib.c, and an insufficient number of chars being compared for HID_NAME in get_device_subsystem_info (bus_udev.c). Nothing that is causing this crash, but still worth fixing :) I've attached the two patches here, since the issues are too small for an additional bug report IMO. The patches are based on 5636088871714f2a2de9e543eb66f944ce188edc.
Nice catch, thanks!