Jump to content

Device sleep, crashing on wake


pünktchen

Recommended Posts

pünktchen

So here's my scenario:

Kodi on HTPC, Emby on Server

 

I always let the HTPC with running Kodi go to sleep while the Server is still active. The Server itself goes to sleep some minutes after this.

The next time i wake up the HTPC while the Server is still sleeping, i get the known "Library Sync Thread has Exited" error.

Shortly after this i get the notification from the Kodi Emby addon "Server unreachable".

 

Imho this is a simple error in the logic how things are executed.

The addon should first check for successful connection before starting the sync thread.

If the connection is refused, then don't start the sync thread at all.

 

I can attach the logs in the evening if you want some, but maybe my description is enough to find the culprit?!

Link to comment
Share on other sites

Angelblue05

@@pünktchen

 

 

Do you mind giving this build a try? Let me know if it resolves this, thanks.

 

Note, you can also get the same build available in Public testing via this method: https://github.com/MediaBrowser/plugin.video.emby/wiki/Emby-Repository <---- This makes our lives easier.

Edited by Angelblue05
Link to comment
Share on other sites

SwanStream

I've seen this as well. And had thought that proposed logic was already in. Since it's new, as a 'feature' to this logic maybe it's useful to have a pop-up letting you know the issue, and ask how quickly you want it retry connection/sync with some default if not responded to? Always nice to know there's an issue, and give me time to resolve the problem before popping up more errors, or alternatively give me no more info if the problem persists. With the sync thread dialog hidden, one can be blissfully uninformed... 

Link to comment
Share on other sites

Angelblue05

The logic is already in. However, I think the issue ends up being that the offline marker is not associate with the system going to sleep. That's what I added to the custom build. I'm hoping it will be ok now, but I need it tested.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

pünktchen

I've seen this as well. And had thought that proposed logic was already in. Since it's new, as a 'feature' to this logic maybe it's useful to have a pop-up letting you know the issue, and ask how quickly you want it retry connection/sync with some default if not responded to? Always nice to know there's an issue, and give me time to resolve the problem before popping up more errors, or alternatively give me no more info if the problem persists. With the sync thread dialog hidden, one can be blissfully uninformed...

There's no issue to know about and to resolve, because it's intended by me that the server is still sleeping while waking up the Kodi HTPC. We mostly use the pvr capabilities of Kodi, so it doesn't make sense that the Server would burn energy for nothing. Any dialog with a user interaction in this case is just annoying and irritates the wife.
Link to comment
Share on other sites

pünktchen

The logic is already in. However, I think the issue ends up being that the offline marker is not associate with the system going to sleep. That's what I added to the custom build. I'm hoping it will be ok now, but I need it tested.

 

 

Sent from my iPhone using Tapatalk

Will have to wait until my wife goes to bed before testing...
Link to comment
Share on other sites

pünktchen

Unfortunately i still get the error.

Just as a info if it makes any difference: i don't put the HTPC to sleep from within Kodi, but just let Windows handle the standby.

Link to comment
Share on other sites

xnappo

I know not the answer you are looking for, but I have my OpenElec box kill Kodi and restart it upon wake..  You could probably do something like that with Windows, though I don't know how.

Link to comment
Share on other sites

Angelblue05

Unfortunately i still get the error.

Just as a info if it makes any difference: i don't put the HTPC to sleep from within Kodi, but just let Windows handle the standby.

It does make a difference.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

pünktchen

I know not the answer you are looking for, but I have my OpenElec box kill Kodi and restart it upon wake.. You could probably do something like that with Windows, though I don't know how.

I would rather remove the code that displays the error [emoji6]
Link to comment
Share on other sites

Angelblue05

Removing the message would not help in any way. Do you have your Kodi log? Can you post it? Thanks. I will try to come up with a solution in the long run, since the issue is that Kodi is not putting the device to sleep.

Link to comment
Share on other sites

pünktchen

Removing the message would not help in any way. Do you have your Kodi log? Can you post it? Thanks. I will try to come up with a solution in the long run, since the issue is that Kodi is not putting the device to sleep.

 

Here you go. If you need a log with addon logging enabled, let me know!

Link to comment
Share on other sites

pünktchen

Oops @@pünktchen   Please do enable add-on log level set to info, otherwise no relevant info gets captured. Post a new log, thanks! :)

 

I'm really sorry! Here it is.

Link to comment
Share on other sites

Angelblue05

... Still no emby add-on log enabled.... Under emby add-on settings > advanced > Log level set to Info. Then repeat the steps to recreate the wake up crash. Sorry about this, but I need as much information about what is happening during this time to come up with a solution.

Link to comment
Share on other sites

pünktchen

... Still no emby add-on log enabled.... Under emby add-on settings > advanced > Log level set to Info. Then repeat the steps to recreate the wake up crash. Sorry about this, but I need as much information about what is happening during this time to come up with a solution.

 

It is set to debug!

Damn, i think, i've forgotten my advancedsettings.xml. There's loglevel set to 0 :rolleyes:

Link to comment
Share on other sites

Angelblue05

It looks to be set to None according to your previous log. :)

Edited by Angelblue05
Link to comment
Share on other sites

Angelblue05

Thanks for the log! I will let you know once I got something for you to test. I think there's a Kodi notification we can use to correct the situation, now that I see it trigger in your log.

 

Oh boy, such a silly mistake. The build I gave you didn't have the fix in it. Instead of clearing the online flag, I was clearing the onWake flag...

Edited by Angelblue05
Link to comment
Share on other sites

pünktchen

Thank you!

I'm out of town the next days, but i'll report you back as soon as possible.

Edited by pünktchen
  • Like 1
Link to comment
Share on other sites

pünktchen

Hi @@Angelblue05

i'm not sure yet that it's fixed. Yesterday there was the error, today all was okay.

The only difference was, i started tv right after wakeup from sleep yesterday. Today i waited some minutes.

I will keep an eye on it the next days and will report you back on Sunday.

  • Like 1
Link to comment
Share on other sites

pünktchen

Okay @@Angelblue05 it's still not working.

The times the error wasn't shown i've forgotten to restart Kodi. I always thought the sync thread gets restarted if the addon connects to the server.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...