Open doggy opened 3 months ago
The fix PR is attached here. Already tested and verified on my M1 Mac.
The main reason for the crash is the multiple threads will send the disconnect event
at same time but the list is not provide thread safety logic. There is a high probability of this happening when using the keyboard Q to exit multiple IINA windows.
As you might consider the crash also occurs when adding new elements to danmakus
. Yes, in rare cases this can happen, so it is good to add this protection to loadNewDanmaku()
Please review my changes. If you have any questions, please reply and let me know. I will check this PR frequently recently.
BTW, I must say this is a very convenient app for watching live broadcasts! Use it every day and night! I am very grateful to the author for his continuous updates over the years!
HttpServer
The line which contains
self?.danmakus
leads a high probability app crash if you open more than 2 IINA windows and close them all simultaneously by pressing keyboard Q.