xpilot-project / xpilot

Open-source, cross-platform X-Plane pilot client for VATSIM.
https://xpilot-project.org
GNU General Public License v3.0
119 stars 36 forks source link

plugin freezes X-Plane on disable [XPMP2 SoundCleanup()][XP12] #137

Closed jonaseberle closed 1 year ago

jonaseberle commented 1 year ago

v2.0.0-beta.38 X-Plane 12.00b13

I tried in a vanilla X-Plane 12 and can only reproduce if I add the xPilot plugin. When trying to close X-Plane, it freezes.

./Log.txt ./Resources/plugins/xPilot/Resources/Config.json

I would expect it to be something around that https://github.com/xpilot-project/xpilot/blob/master/plugin/src/Plugin.cpp#L170 but can't pin point it yet.

justinshannon commented 1 year ago

I'm not able to reproduce this on my Ubuntu 20.04 machine. Did this start happening with beta 38? If you fallback to an earlier version, does X-Plane freeze?

jonaseberle commented 1 year ago

It would be easier to bisect if we could have a download for the X-Plane plugin under releases. I'll add a request for that.

I've compiled them myself and went back until beta.37. The freezes are present in these and current master.

X-Plane does also freeze when disabling the plugin via the Plugin Admin. I canNOT reproduce it in XP11.

I could trace it back to:

FMOD_System_Release(gpFmodSystem); https://github.com/xpilot-project/XPMP2/blob/bb8c2b4795e9baf535a219cb16857bc1a3562215/src/Sound.cpp#L867

via

SoundCleanup(); https://github.com/xpilot-project/XPMP2/blob/bb8c2b4795e9baf535a219cb16857bc1a3562215/src/XPMPMultiplayer.cpp#L221

via

XPMPMultiplayerCleanup(); https://github.com/xpilot-project/xpilot/blob/3a3c130299b82193acf8f7d754ab9d6fab9496af/plugin/src/Plugin.cpp#L158

So something FMOD in XPMP2. Should I open an issue with upstream?

justinshannon commented 1 year ago

The unreleased master branch (soon to be beta 39) utilizes the new sound system in XPMP2; prior versions uses a different sound implementation. Do you recall this happening with earlier X-Plane betas?

jonaseberle commented 1 year ago

I can reproduce it with beta.37. I've had the freeze on shutdown for a bit longer, but I have not isolated the issue so it could have come from another plugin.

justinshannon commented 1 year ago

I'm still unable to reproduce this. Can you test this again with beta 39 and see if it still freezes at the same spot when you trace it back?

jonaseberle commented 1 year ago

The problem has been confirmed by users of other multiplayer plugins with Linux (maybe only Manjaro?) + pipewire (https://forums.x-plane.org/index.php?/forums/topic/279092-xp12-freeze-after-error-with-sound/). There is some triage in that thread already.

I'll close here. Thank you.