adding to queue

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #11
just got home and tried out my script on my xbox...

seems like the crash only happens on xbmc for windows
don't have anything to test linux or osxbmc, will file bugreport
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,938
Joined: Dec 2004
Reputation: 17
Post: #12
you definately need a sleep in there. could be the reason for the crash

while 1:
xbmc.sleep( 1000 ) # sleeps for one second

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #13
Nuka1195 Wrote:you definately need a sleep in there. could be the reason for the crash

while 1:
xbmc.sleep( 1000 ) # sleeps for one second

it didn't crash on the XBOX version, only the windows one, and only when I call another plugin or script.

It DOES slowly eat ram on the xbox though

On testing your code, all I have to say is WTF??!??!

It works so perfectly and smoothly, much better than my mathy infinite while loop, no (obvious) strange bugs, it ends the plugin when it is supposed to, doesn't kill xbmc.

I'll have to test to see about its ram usage, but I'd be willing to bet it's less than what I had before.

I MUST know--why is a sleeping loop so much better than what I had?
(for reference i was using x=1 while(x==1)x=1)
Also-- I had originally tried while(1):xbmc.sleep(500) and that wasn't working, i also tried using pythons timer class, and that wasn't working so what's going on here?
I don't get it!!

Oh, and THANK YOU NUKA!!!
find quote
Post Reply