v19 Kodi hangs on Exit/Shutdown
#16
This problem has been for years.

I know it could be caused by addons. But I use 3 or 4 addons top. And this problem is always random. Sometimes it will take just a few seconds to close. Other times just hang forever on exit screen until you force close it.

Wonder if this happens on other platforms or it's just Windows.
Reply
#17
(2024-06-17, 07:24)trihy Wrote: Wonder if this happens on other platforms
It's just some badly written code, it would be platform agnostic.
Reply
#18
(2024-06-17, 07:24)trihy Wrote: This problem has been for years.

I know it could be caused by addons. But I use 3 or 4 addons top. And this problem is always random. Sometimes it will take just a few seconds to close. Other times just hang forever on exit screen until you force close it.

Wonder if this happens on other platforms or it's just Windows.
If you turn on debug logging and check your log, you can see where Kodi starts its shutdown process and sends a notification to each running addon to terminate.  If the addon fails to exit after 5 secs Kodi forces a stop.  So looking for any addons that are force-stopped in the first step in analyzing.

scott s.
.
Reply
#19
Yesterday was having this problem on every kodi launch. So it should be some backgroind plugin, lets asume. Will make a log to see if we can get this sorted somehow.

BTW, I been force closing kodi for years when this happens, and never broke any plugin or data. Wonder if an option to kill the plugins and close kodi wont be useful. With the proper warning. For PC without keyboard, it piss you off when this happens.
Reply
#20
If you are using Windows, then go to your /Roaming/ folder and rename \Kodi\ to \Kodi-old\

Restart Kodi and a new \Kodi\ folder is created. Play around with starting and shutting down. Any problems?
Slowly add addons one at a time and see which is the culprit.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#21
Here is the log. Kodi still hang at shutdown while writing this

https://paste.kodi.tv/remusejiha.kodi

I can see some smb related stuff. SMB nas is off, so is not reacheable. but its been off for a month, and kodi shutdown properly sometimes besides that.
Reply
#22
After kodi start to hang at shutdown, sometimes a kodi restart fixes it, sometimes not.
Reply
#23
(2024-06-18, 03:20)trihy Wrote: Here is the log. Kodi still hang at shutdown while writing this
I can't see any problems in the shutdown, though I do not see the complete shutdown as it ends prematurely. How long did you wait before force closing it?
If you think it is an smb issue then testing it on a fresh install will help diagnose. But, keeping your NAS switched off (why?) may cause Kodi to pause while trying to establish contact with it before timing out.
Maybe you can reduce the time out... https://kodi.wiki/view/Advancedsettings.xml#samba
Can you do what I asked in my previous post?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#24
Its been like 30 minutes hang in the background. Until I force close it. 

With the PC recently turned on, kodi usualy shutdown fine. It take a while and probably a couple of launching and closing, until fall on this loop.  So renaming roaming folder is not that easy test, cause it doesnt hang at shutdown 100% of the time. But will try.

BTW I noticed correlation between hang at shutdown and this weird video playing delay (local files on the pc) https://forum.kodi.tv/showthread.php?tid=377928 Seems when kodi start acting like that, will hang at shutdown too.
Reply
#25
Agree don't see an addon issue, though ti might be worth a try to disable RCB and its service just to see if it makes any difference.

You might be able to install windows internals procmon and see what threads are still running when Kodi has hung.  I think what happens is the main thread exits but there's still some threads running (though from what I've seen you get "application stopped" in the log).

When I've had Kodi hang at shutdown, never had any problem using windows to kill kodi.

scott s.
.
Reply
#26
Thanks. Been like 10 days without this happening, I have no idea why. Last time it happened I was closing and launching kodi several times. Wonder if that helps to trigger the problem.

Will report again if starts happening again.

Agree, when this happens, if you click on kodi ui, Windows ask if you want to close it. I just let 30min in the background just too see if will close by its own, but seems that doesnt happen.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi hangs on Exit/Shutdown0