nhokwayf3 / xot-uzg

Automatically exported from code.google.com/p/xot-uzg
0 stars 0 forks source link

Script Lockup #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 issue reported on code.google.com by rfl...@gmail.com on 24 Sep 2007 at 6:09

GoogleCodeExporter commented 9 years ago
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.

Original comment by basrie...@gmail.com on 28 Sep 2007 at 6:25

GoogleCodeExporter commented 9 years ago
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 :)

Original comment by rfl...@gmail.com on 28 Sep 2007 at 6:32

GoogleCodeExporter commented 9 years ago
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!

Original comment by basrie...@gmail.com on 29 Sep 2007 at 12:45

GoogleCodeExporter commented 9 years ago

Original comment by basrie...@gmail.com on 30 Sep 2007 at 8:52

GoogleCodeExporter commented 9 years ago
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
- 1x05' not completed yet. Updating Video
20071001 23:30:02 - INFO     - chn_class.py   - 536 - starting UpdateVideoItem 
for
Adv. of Brisco County Jr - 1x05 (Joox.Net)
20071001 23:30:02 - INFO     - uriopener.py   - 145 - Opening requested uri:
http://www.joox.net/cat/481/id/1615508
20071001 23:30:02 - DEBUG    - uriopener.py   - 146 - Number of open threads 2
20071001 23:30:03 - INFO     - uriopener.py   - 158 - Determining which 
Progessbar to
use....
20071001 23:30:03 - INFO     - uriopener.py   - 166 - Using Non-Calculated 
Progressbar
20071001 23:30:03 - INFO     - uriopener.py   - 194 - Url
http://www.joox.net/cat/481/id/1615508 was opened successfully
20071001 23:30:03 - INFO     - chn_class.py   - 542 - finishing UpdateVideoItem.
Media url = http://video.stage6.com/1615508/.divx
20071001 23:30:03 - INFO     - chn_class.py   - 340 - Updating item (GUIDs 
match)
20071001 23:30:03 - DEBUG    - chn_class.py   - 346 - 3.==== UnLocking the lock

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?

Original comment by rfl...@gmail.com on 1 Oct 2007 at 10:37

GoogleCodeExporter commented 9 years ago
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.

Original comment by basrie...@gmail.com on 2 Oct 2007 at 8:16

GoogleCodeExporter commented 9 years ago
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

Original comment by basrie...@gmail.com on 2 Oct 2007 at 8:02

GoogleCodeExporter commented 9 years ago

Original comment by basrie...@gmail.com on 2 Oct 2007 at 8:03

GoogleCodeExporter commented 9 years ago
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!

Original comment by vincepi...@googlemail.com on 2 Oct 2007 at 8:53

GoogleCodeExporter commented 9 years ago
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?

Original comment by rfl...@gmail.com on 6 Oct 2007 at 11:40

GoogleCodeExporter commented 9 years ago
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.

Original comment by basrie...@gmail.com on 7 Oct 2007 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by basrie...@gmail.com on 28 Dec 2007 at 3:23

GoogleCodeExporter commented 9 years ago
Changed status to Done

Original comment by basrie...@gmail.com on 24 Jun 2012 at 11:42