arteme / pod-ui

A modern GTK+ UI for controlling Line6 POD family of devices via MIDI. Supported devices: POD 1.0, POD 2.0, POD Pro, PocketPOD, PODxt, PODxt Pro, PODxt Live, Bass PODxt, Bass PODxt Pro, Bass PODxt Live
https://arteme.github.io/pod-ui/
GNU General Public License v3.0
31 stars 2 forks source link

Windows: closing pod-ui while downloading programs from PocketPOD leaves the app hanging #12

Closed arteme closed 1 year ago

arteme commented 1 year ago

image

If the app is closed using the "x" button while the PocketPOD is sending its programs, the app will become unresponsive and needs to be killed. Only applicable to Windows WinMM build, WinRT build seems to behave like pod-ui on other platforms, correctly closing the app.

arteme commented 1 year ago

Looks like the blame is on the PocketPOD drivers... When closing Midi input, midir will call midiInReset, then midiInStop then more logic and finally midiInClose.

There are many different code samples: https://cpp.hotexamples.com/examples/-/-/midiInStop/cpp-midiinstop-function-examples.html all calling these functions in a different order. Also, examples of broken drivers: https://github.com/LMMS/lmms/issues/3920

Either way, calling either midiInReset or midiInStop hangs and never returns.