Kodi Community Forum
Bug Library updating prevents Kodi from quitting - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Bug Library updating prevents Kodi from quitting (/showthread.php?tid=338145)



Library updating prevents Kodi from quitting - sopi20 - 2018-12-07

Hi there,

I would like to "report" what I think is a bug (occurs from what I've been able to observe on Windows as well as on OS X or Raspberry PI). I have multiple sources added via FTP, and while library update (I have it configured to run on start) is running, there is no way to quit kodi gracefully - if I try to quit kodi, the interface looks like it about to close, but it just stays unresponsive, until I force quit it throug Task Manager/Activity Monitor/killall -9...  it looks like the library update-ing thread/loop is not receiving or respecting the signal to quit what it's doing, as I can see from FTP server logs the scanning continues as if nothing has happened. If I let it finish (takes a few hours in my case) in this 'unresponsive' state, Kodi will just quit after the scanning/updating is finished.

Anyone else with the same problem ? Any chance of anyone skilled enough to take a look at it ? I suppose it wouldn't be something terribly complicated to fix, but I might of course as well be mistaken... or maybe it behaves this way for a reason (although I can't think of any to be honest)...

Thank you


RE: Library updating on a FTP video source prevents Kodi from quitting - DaVu - 2018-12-07

I'm not so sure if this is a bug. I would call it a feature to prevent Kodi from quiting/closing during a library scan.

If the scan takes a few hours, that might be another problem. But then I would avoid updating the library at startup and do it only if you would like to do it.


RE: Library updating on a FTP video source prevents Kodi from quitting - sopi20 - 2018-12-07

Well, if this is intended behaviour, then fine (although if I as a user need it to quit, then most probably I don't care about the library update having another x hours to run to be finished), but I suppose it should not have side-effects as inability to do a single thing with the process, and having OS complain that the process is unresponsive and asking me to send a error report and kill it.... most probably it should tell me that kodi can not be quit at the moment as it is doing a library update, and I can either stop the update (and quit kodi), or continue running kodi (and keep the update running as well)... but not cause it to be totally unresponsive like if it just about to close, just to continue running some updating thread on the background, without telling the user anything, and even causing the OS to complain.... that simply does not make any sense to me, and certainly does not sound as intended behaviour...


RE: Library updating on a FTP video source prevents Kodi from quitting - trogggy - 2018-12-07

Firstly a library update (as opposed to an initial scan) taking hours is crazy. Obviously we have different setups, but mine takes 5 minutes on a low-ish powered device (s905) with media and library (mysql) on a remote machine.  Every update taking hours sounds horrible.
Secondly you should have a dialog open on your screen when scanning's going on. If it's scanning why not stop the scan (manually) before shutting down?  From the home screen that takes me 5 clicks and a few seconds.


RE: Library updating on a FTP video source prevents Kodi from quitting - sopi20 - 2018-12-07

(2018-12-07, 18:51)trogggy Wrote: Firstly a library update (as opposed to an initial scan) taking hours is crazy. Obviously we have different setups, but mine takes 5 minutes on a low-ish powered device (s905) with media and library (mysql) on a remote machine.  Every update taking hours sounds horrible.
Secondly you should have a dialog open on your screen when scanning's going on. If it's scanning why not stop the scan (manually) before shutting down?  From the home screen that takes me 5 clicks and a few seconds.
Well, the craziness of the time the update takes depends on the size of the database I suppose.... mine is ca. 40TB of TV Series and a few TB of Movies... so that takes some time to crawl through and see if something has changed.

Regarding the small progress windows on the screen while scan is in progress - it can be disabled in settings (as the library update should be a regular background thing, I suppose), but even if it is visible... I really do not think, that simply hitting quit should case Kodi to almost crash and cause the OS the complain with 100% cpu etc.... of course it can be stopped manually and only then quitted, but it is really bad design and not user-friendly at all... especially if there is a more user-friendly way (simply quit, and the software (kodi) taking care of quitting what needs to be quitted)... I mean in a scenario when user has the update progress window hidden, your idea of "solving" the problem is to have him (every time he wants to quit kodi) go to settings, unhide the library update progress, if it is running, stop the update manually, go back to settings, hide the update progress (for future updates, as he does not want to see it), and then and only then quit.... and not have kodi just do the stopping of the update thread automatically (as it clearly able to do so, as I am able to stop library update manually) when asked to quit itself...


RE: Library updating on a FTP video source prevents Kodi from quitting - sopi20 - 2018-12-07

(2018-12-07, 16:24)DaVu Wrote: I'm not so sure if this is a bug. I would call it a feature to prevent Kodi from quiting/closing during a library scan.
And there's one more thing why I don't think it is a totally intended behaviour - it does not happen when using other protocols (at least from what I found out), only with FTP.... when the video source is defined as let's say smb://, it stops the library update/scanning thread automatically and without any problem at all.


RE: Library updating on a FTP video source prevents Kodi from quitting - trogggy - 2018-12-07

(2018-12-07, 19:06)sopi20 Wrote: Well, the craziness of the time the update takes depends on the size of the database I suppose.... mine is ca. 40TB of TV Series and a few TB of Movies... so that takes some time to crawl through and see if something has changed.
Still a crazy amount of time.
If it were me I'd be asking why it takes so long.


RE: Library updating on a FTP video source prevents Kodi from quitting - trogggy - 2018-12-07

(2018-12-07, 19:08)sopi20 Wrote:
(2018-12-07, 16:24)DaVu Wrote: I'm not so sure if this is a bug. I would call it a feature to prevent Kodi from quiting/closing during a library scan.
And there's one more thing why I don't think it is a totally intended behaviour - it does not happen when using other protocols (at least from what I found out), only with FTP.... when the video source is defined as let's say smb://, it stops the library update/scanning thread automatically and without any problem at all. 
I was curious so I tried.  Windows 17.6, smb sources.  Started a library update and hit 'exit'.  I saw the blue spinny thing (and not responding dialog), and kodi carried on scanning.  On finishing the scan kodi stopped cleanly.


RE: Library updating on a FTP video source prevents Kodi from quitting - sopi20 - 2018-12-11

(2018-12-07, 19:45)trogggy Wrote:
(2018-12-07, 19:08)sopi20 Wrote:
(2018-12-07, 16:24)DaVu Wrote: I'm not so sure if this is a bug. I would call it a feature to prevent Kodi from quiting/closing during a library scan.
And there's one more thing why I don't think it is a totally intended behaviour - it does not happen when using other protocols (at least from what I found out), only with FTP.... when the video source is defined as let's say smb://, it stops the library update/scanning thread automatically and without any problem at all.  
I was curious so I tried.  Windows 17.6, smb sources.  Started a library update and hit 'exit'.  I saw the blue spinny thing (and not responding dialog), and kodi carried on scanning.  On finishing the scan kodi stopped cleanly. 
You are right, I checked it myself again, and later crosschecked with logs and since I tested orginally on a smaller video source, I hit the moment for quitting when the library update was just finishing, so to me it looked like it behaved differently.... but you're right, the same as with FTP applies to all protocols obviously :/


RE: Library updating on a FTP video source prevents Kodi from quitting - DaveBlake - 2018-12-12

If either music or video library is scanning sources for updates then quitting Kodi is delayed until it finishes, and yes even just checking hashes can take a long time for large libraries, or across a slow network or media on a slow access drive. It is the same in v18 although quite a lot of changes have been made to the application close.

The user can always cancel library update from the approriate library window, if they remember to do so, but I do feel this is more a bug (or at least an accident) rather than a designed feature. Quiting should stop the library update, maybe asking the user if they are sure they want to exit Kodi because an update is in progress. Or are there users that deliberately hit quit in the middle of a library update wanting it to continue and exit Kodi when it is complete?


RE: Library updating on a FTP video source prevents Kodi from quitting - sopi20 - 2018-12-12

(2018-12-12, 13:18)DaveBlake Wrote: If either music or video library is scanning sources for updates then quitting Kodi is delayed until it finishes, and yes even just checking hashes can take a long time for large libraries, or across a slow network or media on a slow access drive. It is the same in v18 although quite a lot of changes have been made to the application close.

The user can always cancel library update from the approriate library window, if they remember to do so, but I do feel this is more a bug (or at least an accident) rather than a designed feature. Quiting should stop the library update, maybe asking the user if they are sure they want to exit Kodi because an update is in progress. Or are there users that deliberately hit quit in the middle of a library update wanting it to continue and exit Kodi when it is complete?
 I was starting to think I am the only one here crazy enough to really think the current way it works (that kodi from the end user perspective hangs and waits) really cannot be the intended behaviour. So really, really, thank you. Do you think there is any chance this will get fixed/changed, so that if user wants to exit kodi it will stop the library scan itself, or ask the user whether he/she really wants to quit, or wants to continue running kodi, as an update is in progress ?


RE: Library updating on a FTP video source prevents Kodi from quitting - DaveBlake - 2018-12-12

(2018-12-12, 13:51)sopi20 Wrote: Do you think there is any chance this will get fixed/changed, so that if user wants to exit kodi it will stop the library scan itself, or ask the user whether he/she really wants to quit, or wants to continue running kodi, as an update is in progress ? 
A chance yes, always that, but don't ask me to give odds Smile

It would be nice if I could promise I will do it, but I don't like making promises I can't be sure to keep. There is never enough time, and the dev's work is never done. What I will do is raise it as a road map issue on Github, so it is lodged in the ever growing list of things to do that anyone with the skills and interest can pick up and work on.


RE: Library updating on a FTP video source prevents Kodi from quitting - sopi20 - 2019-01-06

(2018-12-12, 16:14)DaveBlake Wrote:
(2018-12-12, 13:51)sopi20 Wrote: Do you think there is any chance this will get fixed/changed, so that if user wants to exit kodi it will stop the library scan itself, or ask the user whether he/she really wants to quit, or wants to continue running kodi, as an update is in progress ? 
A chance yes, always that, but don't ask me to give odds Smile

It would be nice if I could promise I will do it, but I don't like making promises I can't be sure to keep. There is never enough time, and the dev's work is never done. What I will do is raise it as a road map issue on Github, so it is lodged in the ever growing list of things to do that anyone with the skills and interest can pick up and work on. 
Thank you very much, I am well aware this definitely isn't a priority, so just having it logged somewhere meaningful (so that if someone with the skills has the time to fix this, it will be there) would be be great Smile Thank you!


RE: Library updating on a FTP video source prevents Kodi from quitting - Hitcher - 2019-01-06

(2018-12-07, 19:06)sopi20 Wrote: 40TB of TV Series and a few TB of Movies
If you have videos that you want to keep 'forever' simply put them in a different folder and tick the 'Exclude path from library updates' when doing the initial scan. This way that folder won't be scanned every time.