primaeval / script.tvguide.fullscreen

tv guide fullscreen
GNU General Public License v2.0
25 stars 26 forks source link

Freezing after stopping playback #42

Closed iainsmacleod closed 8 years ago

iainsmacleod commented 8 years ago

I have noticed several times if I stop BBC or ITV playback, my system sits on a loading screen - loading data from external sources. If I cancel I go back to the EPG, but I can't start anything new, or leave the add-on. I need to reset the box.

When I check logs I see no obvious error messages, let me know what I can do. I can reproduce.

iainsmacleod commented 8 years ago

I see a lot of the following errors.

00:06:02 721.883301 T:1219748768 DEBUG: [script.tvguide.fullscreen] strptime error with this date: 20160830230000

Just sharing, haven't researched yet.

iainsmacleod commented 8 years ago

I think it may be a iPlayerWWW issue

Just the errors:

00:09:57 31.985481 T:1262482336 ERROR: t = time.strptime(dateString, '%Y%m%d%H%M%S') 00:09:57 31.985704 T:1262482336 ERROR: ImportError: Failed to import _strptime because the import lockis held by another thread. 00:15:28 363.107025 T:1658844064 ERROR: DoWork - Direct texture file loading failed for resource://resource.images.weathericons.default/ 00:17:42 497.588745 T:1962287104 ERROR: Window Translator: Can't find window mutebug 00:17:43 497.848999 T:1658844064 ERROR: EXCEPTION: Unknown addon id 'plugin.video.meta'. 00:20:14 649.710266 T:1962287104 ERROR: PlayMedia could not play media: plugin://plugin.video.iplayerwww/?url=bbc_one_hd&mode=203&name=BBC+One&iconimage=%2Fstorage%2F.kodi%2Faddons%2Fplugin.video.iplayerwww%2Fmedia%2Fbbc_one.png&description=&subtitles_url=&logged_in=False 00:21:43 738.237183 T:1245705120 ERROR: GetDirectory - Error getting 00:21:43 738.239807 T:1237316512 ERROR: GetDirectory - Error getting

primaeval commented 8 years ago

You get that "import lockis held by another thread" message when 2 tv guides are trying to access the same xmltv file at the same time. Have you got the original TV Guide accessing the same xmltv file?

iainsmacleod commented 8 years ago

Yes I do. I'm trying to share from a central pi. I guess I need to copy the file after it has been generated - or run the service on all devices.

On Aug 28, 2016 01:08, "primaeval" notifications@github.com wrote:

You get that "import lockis held by another thread" message when 2 tv guides are trying to access the same xmltv file at the same time. Have you got the original TV Guide accessing the same xmltv file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242956630, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHorBvcUXUclfTA-UHKuNLMcUqlm6-ks5qkRezgaJpZM4JuyLJ .

iainsmacleod commented 8 years ago

Ok, I just retested withiut other systems connecting and I can reproduce this issue. Tried in iPlayer only to see if I can reproduce with that, but no joy. Seems to be something with reloading the guide after exiting bbc1

primaeval commented 8 years ago

I meant 2 TV Guides on the same device.

primaeval commented 8 years ago

The tv guides run the service.py in the background and can both be accessing the same file on startup.

iainsmacleod commented 8 years ago

Oh...I have the old TV Guide, I'll remove and report.

On Aug 28, 2016 11:29, "primaeval" notifications@github.com wrote:

I meant 2 TV Guides on the same device.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242980850, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHot7AffRCEYG6VlIp5O0n3lh0Iqg9ks5qkalKgaJpZM4JuyLJ .

primaeval commented 8 years ago

The services shouldn't start in the background if you turn the setting off but they do. It needs to be fixed.

iainsmacleod commented 8 years ago

Didn't seem to help.

On Aug 28, 2016 11:30, "Iain MacLeod" iain.macleod@gmail.com wrote:

Oh...I have the old TV Guide, I'll remove and report.

On Aug 28, 2016 11:29, "primaeval" notifications@github.com wrote:

I meant 2 TV Guides on the same device.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242980850, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHot7AffRCEYG6VlIp5O0n3lh0Iqg9ks5qkalKgaJpZM4JuyLJ .

primaeval commented 8 years ago

Even with a restart?

iainsmacleod commented 8 years ago

Yeah, even with a restart. Let me check the errors again, now that I have removed stuff.

On Aug 28, 2016 11:38, "primaeval" notifications@github.com wrote:

Even with a restart?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242981300, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHokyuxfBIHjYivt15HPAZGj4rVQ-Yks5qkatSgaJpZM4JuyLJ .

iainsmacleod commented 8 years ago

Not looked at it in detail yet, but debug is on. Second line is when I pressed stop:

12:01:19 215.583359 T:1700787104 DEBUG: JSONRPC: Value does not lay between minimum and maximum in type tvshowid 12:01:21 218.341171 T:1961943040 DEBUG: LIRC: Update - NEW at 208871:80 0 KEY_STOP devinput (KEY_STOP) 12:01:21 218.341431 T:1961943040 DEBUG: OnKey: guide (0xe0) pressed, action is Stop 12:01:21 218.347977 T:1961943040 NOTICE: CVideoPlayer::CloseFile() 12:01:21 218.348083 T:1961943040 NOTICE: VideoPlayer: waiting for threads to exit 12:01:21 218.382385 T:1355301792 NOTICE: CVideoPlayer::OnExit() 12:01:21 218.382507 T:1355301792 NOTICE: Closing stream player 1 12:01:21 218.382553 T:1355301792 NOTICE: Waiting for audio thread to exit 12:01:21 218.382874 T:1167061920 NOTICE: thread end: CVideoPlayerAudio::OnExit() 12:01:21 218.382965 T:1167061920 DEBUG: Thread VideoPlayerAudio 1167061920 terminating 12:01:21 218.383057 T:1355301792 NOTICE: Closing audio device 12:01:21 218.384338 T:1940743072 INFO: CActiveAEResamplePi::~CActiveAEResamplePi12:01:21 218.384430 T:1940743072 DEBUG: CActiveAEResamplePi:DeInit 12:01:22 218.437866 T:1940743072 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_mixer handle 0x4dd29c10 12:01:22 218.438171 T:1940743072 INFO: CActiveAEResamplePi::CActiveAEResamplePi 12:01:22 218.438232 T:1940743072 INFO: CActiveAEResamplePi::Init remap:(nil) chan:2->2 rate:48000->48000 format:8->3 bits:32->32 dither:0->0 norm:1 upmix:0 12:01:22 218.438400 T:1940743072 INFO: CActiveAEResamplePi::Init 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.438477 T:1940743072 INFO: CActiveAEResamplePi::Init 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.438522 T:1940743072 INFO: CActiveAEResamplePi::Init 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.440063 T:1940743072 INFO: Previous line repeats 5 times. 12:01:22 218.440140 T:1940743072 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231 m_handle 0x4dd29c10 12:01:22 218.457947 T:1940743072 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_mixer) - port(232), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288), nBufferAlignmen(32) 12:01:22 218.458496 T:1940743072 DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.audio_mixer) - port(231), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288) nBufferAlignmen(32) 12:01:22 218.477890 T:1940743072 INFO: CActiveAEResamplePi::~CActiveAEResamplePi12:01:22 218.477997 T:1940743072 DEBUG: CActiveAEResamplePi:DeInit 12:01:22 218.537903 T:1940743072 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_mixer handle 0x4cc8c518 12:01:22 218.538208 T:1940743072 INFO: CActiveAEResamplePi::CActiveAEResamplePi 12:01:22 218.538254 T:1940743072 INFO: CActiveAEResamplePi::Init remap:0x51c97a74 chan:2->2 rate:48000->48000 format:3->1 bits:32->16 dither:0->0 norm:1 upmix:0 12:01:22 218.538712 T:1940743072 INFO: CActiveAEResamplePi::Init 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.538773 T:1940743072 INFO: CActiveAEResamplePi::Init 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.538818 T:1940743072 INFO: CActiveAEResamplePi::Init 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.540314 T:1940743072 INFO: Previous line repeats 5 times. 12:01:22 218.540359 T:1940743072 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231 m_handle 0x4cc8c518 12:01:22 218.557953 T:1940743072 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_mixer) - port(232), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288), nBufferAlignmen(32) 12:01:22 218.558502 T:1940743072 DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.audio_mixer) - port(231), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288) nBufferAlignmen(32) 12:01:22 218.582611 T:1355301792 DEBUG: CDVDAudio::Flush - flush audio stream 12:01:22 218.582748 T:1940743072 INFO: CActiveAEResamplePi::~CActiveAEResamplePi12:01:22 218.582794 T:1940743072 DEBUG: CActiveAEResamplePi:DeInit 12:01:22 218.637878 T:1940743072 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_mixer handle 0x4dd29c10 12:01:22 218.638138 T:1940743072 INFO: CActiveAEResamplePi::CActiveAEResamplePi 12:01:22 218.638199 T:1940743072 INFO: CActiveAEResamplePi::Init remap:(nil) chan:2->2 rate:48000->48000 format:8->3 bits:32->32 dither:0->0 norm:1 upmix:0 12:01:22 218.638367 T:1940743072 INFO: CActiveAEResamplePi::Init 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.638412 T:1940743072 INFO: CActiveAEResamplePi::Init 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.638458 T:1940743072 INFO: CActiveAEResamplePi::Init 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:01:22 218.639893 T:1940743072 INFO: Previous line repeats 5 times. 12:01:22 218.639969 T:1940743072 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231 m_handle 0x4dd29c10 12:01:22 218.657944 T:1940743072 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_mixer) - port(232), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288), nBufferAlignmen(32) 12:01:22 218.658508 T:1940743072 DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.audio_mixer) - port(231), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288) nBufferAlignmen(32) 12:01:22 218.677872 T:1940743072 DEBUG: CActiveAE::DiscardStream - audio stream deleted 12:01:22 218.678040 T:1940743072 DEBUG: CActiveAE::ClearDiscardedBuffers

On Aug 28, 2016 11:57, "Iain MacLeod" iain.macleod@gmail.com wrote:

Yeah, even with a restart. Let me check the errors again, now that I have removed stuff.

On Aug 28, 2016 11:38, "primaeval" notifications@github.com wrote:

Even with a restart?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242981300, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHokyuxfBIHjYivt15HPAZGj4rVQ-Yks5qkatSgaJpZM4JuyLJ .

primaeval commented 8 years ago

The only strange thing I can see is that your stop key seems to press the guide key.

12:01:21 218.341171 T:1961943040   DEBUG: LIRC: Update - NEW at 208871:80 0
KEY_STOP devinput (KEY_STOP)
12:01:21 218.341431 T:1961943040   DEBUG: OnKey: guide (0xe0) pressed,
action is Stop

The stop action is processed here: https://github.com/primaeval/script.tvguide.fullscreen/blob/541f31c2d024e7ab7f5c2b213f63f3b5f4a06b27/gui.py#L376 and defined here https://github.com/primaeval/script.tvguide.fullscreen/blob/541f31c2d024e7ab7f5c2b213f63f3b5f4a06b27/gui.py#L62

Maybe your keymap is not mapping stop to the same one. It should have a value of 13. See here at the bottom of the page: http://mirrors.xbmc.org/docs/python-docs/16.x-jarvis/xbmcgui.html

Try printing out the action id in onAction. Something like:

xbmc.log(repr(("ONACTION",action.getId())))
iainsmacleod commented 8 years ago

I don't get it. I am using a harmony one, and it is programmed to send the stop for a media center control. So it shouldn't be sending guide.

On Aug 28, 2016 12:29, "primaeval" notifications@github.com wrote:

The only strange thing I can see is that your stop key seems to press the guide key.

12:01:21 218.341171 T:1961943040 DEBUG: LIRC: Update - NEW at 208871:80 0 KEY_STOP devinput (KEY_STOP) 12:01:21 218.341431 T:1961943040 DEBUG: OnKey: guide (0xe0) pressed, action is Stop

The stop action is processed here: https://github.com/primaeval/script.tvguide.fullscreen/blob/ 541f31c2d024e7ab7f5c2b213f63f3b5f4a06b27/gui.py#L376 and defined here https://github.com/primaeval/script.tvguide.fullscreen/blob/ 541f31c2d024e7ab7f5c2b213f63f3b5f4a06b27/gui.py#L62

Maybe your keymap is not mapping stop to the same one. It should have a value of 13. See here at the bottom of the page: http://mirrors.xbmc.org/docs/python-docs/16.x-jarvis/xbmcgui.html

Try printing out the action id in onAction. Something like:

xbmc.log(repr(("ONACTION",action.getId())))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242984032, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHoqEfYCKu_upI8maDaVjEF2G5HpJ3ks5qkbd4gaJpZM4JuyLJ .

primaeval commented 8 years ago

If you add that log message you can see exactly what ids are getting through.

iainsmacleod commented 8 years ago

Sorry for my ignorance, but where do I add that log message?

On Sun, Aug 28, 2016 at 3:04 PM, primaeval notifications@github.com wrote:

If you add that log message you can see exactly what ids are getting through.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242992816, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHorZJNVDwfLNu2yFXW7vP6x_W2ZqIks5qkdvTgaJpZM4JuyLJ .

primaeval commented 8 years ago

Right after the function definition before the debug line. The indentation must match with 4 spaces for tab stops. https://github.com/primaeval/script.tvguide.fullscreen/blob/master/gui.py#L350

You can get up to speed really quickly with python here: https://learnxinyminutes.com/

What level do you think you are at with python, xml and the other languages you use here? I'll try and set my answer level to match.

iainsmacleod commented 8 years ago

Moron level? Hahaha - beginner.

primaeval commented 8 years ago

You worked out Git and xml so far. So you've come a long way already. :)

iainsmacleod commented 8 years ago

So I only see 7, which I assume is for my select - I don't see any code for when I hit stop.

iainsmacleod commented 8 years ago

OK, so I added it to the TV mode and it is reporting 13 - I wonder if unpause jumpback is bothering it.

primaeval commented 8 years ago

Add the mode to the log line to see if it thinks its in the right mode.

xbmc.log(repr(("ONACTION",self.mode,action.getId())))
iainsmacleod commented 8 years ago

Here is what I get:

15:47:26 307.125397 T:1962401792 DEBUG: LIRC: Update - NEW at 298011:80 0 KEY_STOP devinput (KEY_STOP) 15:47:26 307.125793 T:1962401792 DEBUG: OnKey: guide (0xe0) pressed, action is Stop 15:47:26 307.125977 T:1962401792 NOTICE: CVideoPlayer::CloseFile() 15:47:26 307.126038 T:1962401792 NOTICE: VideoPlayer: waiting for threads to exit 15:47:26 307.126221 T:1220539296 DEBUG: ('ONACTION', 'TV', 13) 15:47:26 307.133850 T:1203762080 NOTICE: CVideoPlayer::OnExit() 15:47:26 307.133972 T:1203762080 NOTICE: Closing stream player 1 15:47:26 307.134064 T:1203762080 NOTICE: Waiting for audio thread to exit

On Aug 28, 2016 3:34 PM, "primaeval" notifications@github.com wrote:

Add the mode to the log line to see if it thinks its in the write mode.

xbmc.log(repr(("ONACTION",self.mode,action.getId())))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242994511, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHorN0Y4ftXJhgxRkuKSeym1XZRCSUks5qkeLggaJpZM4JuyLJ .

primaeval commented 8 years ago

And it still just stays there? Have you got the latest version of the addon? It didn't work yesterday until I fixed it.

iainsmacleod commented 8 years ago

Just stays on a loading, like it's trying to reload the guide.

Running 0.0.92

On Aug 28, 2016 4:12 PM, "primaeval" notifications@github.com wrote:

And it still just stays there? Have you got the latest version of the addon? It didn't work yesterday until I fixed it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-242996439, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHot4auN628aNMbfHFB85mIQHfxISYks5qkeujgaJpZM4JuyLJ .

primaeval commented 8 years ago

In every skin?

iainsmacleod commented 8 years ago

Mine and sly for sure. I also tried using the CEC adaptor controls instead of Media Center. I am able to make it happen on two different raspberry Pi's.

Let me know what else I can try. Thanks for the continued assistance.

On Aug 29, 2016 1:21 AM, "primaeval" notifications@github.com wrote:

In every skin?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-243034330, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHokRYjY3DTjaO5d6c5e5NnqebXlrqks5qkmxDgaJpZM4JuyLJ .

primaeval commented 8 years ago

Did you try a Database reset?

primaeval commented 8 years ago

It might be because your database was missing the autoplays table. Try 0.0.94

iainsmacleod commented 8 years ago

I believe so, but will retest with the latest tonight.

On Aug 29, 2016 7:47 AM, "primaeval" notifications@github.com wrote:

Did you try a Database reset?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-243102285, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHokbpmPPdZ0sa2vtLOfxKxsW2C3c_ks5qksbSgaJpZM4JuyLJ .

iainsmacleod commented 8 years ago

Still occurs after a db reset, using 0.0.96. Thanks

On Aug 29, 2016 9:16 AM, "Iain MacLeod" iain.macleod@gmail.com wrote:

I believe so, but will retest with the latest tonight.

On Aug 29, 2016 7:47 AM, "primaeval" notifications@github.com wrote:

Did you try a Database reset?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/primaeval/script.tvguide.fullscreen/issues/42#issuecomment-243102285, or mute the thread https://github.com/notifications/unsubscribe-auth/AEAHokbpmPPdZ0sa2vtLOfxKxsW2C3c_ks5qksbSgaJpZM4JuyLJ .

primaeval commented 8 years ago

Try cleaning out the addon data folder manually.

primaeval commented 8 years ago

I always do my dev work in a portable version of Kodi on Windows. Use the -p option in a shortcut. Then I can just rename the portable_data folder when I want to work on a different addon or test a different configuration.