Closed CalculusAce closed 3 years ago
I've just tested your code on linux, and it all seems to work. I think the quickest way to identify the issue would be if you could launch your app in a debugger like gdb, then provoke the freeze and then check the backtraces of all threads for where they're blocking. If your app completely freezes, Qt's main thread is likely blocking somewhere.
@jaseg Thanks for taking a look at this. I was looking through other issues that have been reported and saw an issue that is similar to this one. I ended up solving this by implementing a 2nd window that houses the mpv instance and brings it to the foreground when the application needs it. I wanted to report that here in case others run into this using the Qt implementation as I think that should be the standard / recommended way of using it within Qt.
I am currently running python-mpv on Windows and using the Qt embedding for a Qt application I am developing. I have a class defined for mpv player that I am displaying as a a non-modal window that the user can interact with. I am able to open the mpv player, interact with it, and close it successfully the first time. However, if I then open it again after doing some work in the main portion of the application, the entire application freezes. I suspect this may have to do with cleanup issues from when the original instance of MPV was closed.
I wanted to see if I could get some insight on how I may be able to address this, so the user can seamlessly utilize the MPV aspect of the application and other aspects of the application. This issue does not seem to be reproducible on Mac (with the same code), so I think it is exclusively a Windows issue.
Here's some simplified code for context:
Simple MPV_Player Class
In the main application that the MPV_Player class is accessed from
Any input on this would be very much appreciated. I have spent quite a few hours trying to figure out what is causing the freeze.
Thanks!