retrospect-addon / plugin.video.retrospect

Retrospect is a Kodi video add-on which allows you to watch streams of a number of free and publicly available online TV stream sites.
https://www.rieter.net/content/
GNU General Public License v3.0
110 stars 36 forks source link

Script Lockup #12

Closed basrieter closed 7 years ago

basrieter commented 17 years ago

Original report by Anonymous.


What steps will reproduce the problem?

  1. Load script and open Joox.net source.
  2. Open a folder with lots of files in.
  3. Scroll down the files very quickly (press down repeatedly)
  4. Immediately after scrolling through lots of files, hit the context menu
    button before the "File Information" is loaded.
  5. Script/system will crash.

There appears to be an issue with the script locking the XBMC GUI. The
console is still accessible via FTP, just no GUI access is possible until a
hard reboot.

I am using the latest version of the script (with a user agent modification
made by myself, viewable here
(http://www.xboxmediacenter.com/forum/showpost.php?p=149758&postcount=133),
and the latest XBMC.

Logfiles show nothing.


Original item http://code.google.com/p/xot-uzg/issues/detail?id=12

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Hi, I am aware of the problem and it is the biggest one at the moment. I really don't
know how to fix it! I tried everything, but I think it is related to the urllib and
the number of simultaneous connections.

basrieter commented 17 years ago

Original comment by Anonymous.


Hey,

Thanks for the comment :)

I don't think the number of simultaneous connections is the issue, as I can generate
this error in around 2 connections if I do it quick enough :(

I think perhaps the best workaround would be to avoid obtaining file information on a
KeyUp or KeyDown event, and only obtain file information before a file is processed,
what do you think? Say for example, when the context menu is accessed - obtain the
file data before you show the context menu. Or obtain the file data BEFORE trying to
play the file. Not only should this fix the problem, it should also save a LOT of
processing time and bandwidth on the site you're retrieving listings from.

Let me know your thoughts :)

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


That is exactly what happens now (obtain data before playback, as soon as an episode
is selected from the list). But to obtain all the info on 1 file, about 3 connections
are needed! So if you very quickly step through the list, it could still be that 10+
connections are needed.

The KeyUp/Down event is already constructed to wait 500 ms and see if another
key-event is raised before getting data.

The 2.7.0b5 version has the best work-around, but it is still not perfect. The
strange thing is that only Joox.net and tv-links.co.uk suffer from the problem. While
others work fine!

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


(No comment was entered for this change.)

basrieter commented 17 years ago

Original comment by Anonymous.


I think we're both confusing things. Let me try and explain what I mean more clearly.

At the moment, whenever an onKeyUp/KeyDown is detected, it appears to obtain the file
information in advance before playing the file. For example, if I boot up my XBMC,
load the script, access Joox.net, navigate to 'TV Shows' and then browse through the
'Junk Box' I get the following in my logfiles:

20071001 23:30:02 - DEBUG - chn_class.py - 291 - OnKeyUp/KeyDown Detected
20071001 23:30:02 - DEBUG - chn_class.py - 317 - 1.==== Trying to acquire a lock
20071001 23:30:02 - DEBUG - chn_class.py - 328 - 2.==== Lock Acquired
20071001 23:30:02 - DEBUG - chn_class.py - 331 - Item 'Adv. of Brisco County Jr

I have NOT selected any files for viewing or playing, I am merely moving through the
list using my remote control. Despite this, your script is still accessing each page
individually and obtaining the link BEFORE I select to play the file.

In my opinion this is a very bad thing, and there's really no use in doing this. Not
only are you flooding the Joox.net servers with unnecessary requests (imagine
navigating through 200+ movies and your script requesting information 200+ times), it
also appears to make it very easy to crash because of the amount of requests being sent.

Instead, why not obtain the link to the file ONLY when needed? If I press select to
play the file, only THEN should it access the site, obtain the link to the .divx file
and start playing. It should also ONLY do this when the context menu is selected.
It shouldn't occur on an OnKeyUp/KeyDown event, though.

What are your thoughts? Does it NEED to be done on an OnKeyUp/KeyDown event?

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


No, it does not need to be like that, you are right. But in most cases a full
description is gathered while going up/down the listitems. In Joox it could be
changed. I will look into it and change it, just like the TVLinks script.

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


I changed it and it will be in the 2.7.0b6 which I will release somewhere at the end
of the week. I cannot just publish the channel, as there are also some changes in the
chn_class.py file and progwindow.py

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


(No comment was entered for this change.)

basrieter commented 17 years ago

Original comment by Anonymous.


Awesome, thanks.

If you'd like me to help test it before you release it publically, I'm more than
happy to help out. Feel free to drop me a mail directly (rflack@gmail.com) if
interested.

Great work on the script, thank you!

basrieter commented 17 years ago

Original comment by Anonymous.


Hi,

I've just installed the latest version - thanks for the updates!

It seems, however, that this issue still isn't resolved? I'm not sure whether it's
now pulling remote information or not, but there appears to be something in the
KeyPress detection that's causing it to hang if you hit the context menu too soon....

Any ideas?

basrieter commented 17 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


There is no more data-retrieval in the onUpDown for Joox and TVLink. But there just
are channels that need information onUpDown (NOS, SBS) so they still access the sites
onUpDown.

basrieter commented 16 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


(No comment was entered for this change.)

basrieter commented 12 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Changed status to Done