Bug: startupmp3 (mp3.py) kills scripts!
#1
Big Grin 
this must be a bug.

not sure what the exact issue is but several have verified it causes major issues with gamespotplus and xmovieguide.

problem occurs if:
"startupmp3" (mp3.py) is in the autoexec.py then it causes to problems:

problems verified by users:

1) gamespotplus dead... period!
- does not save new config file
- does not run if config file already exits.

2) xmovieguide
- will run usually like it should, hangs at times
- you can never exit the script. back button seems disabled!


startupmp3 (mp3.py):
Quote:import xbmc
# by alx5962
# version 1.0
file = 'q:\\scripts\\startupmp3\\startup.mp3'
xbmc.player().play(file)


solution:

remove this statement from your autoexec.py...

xbmc.executescript('q:\\scripts\\startupmp3\\mp3.py')
I'm not an expert but I play one at work.
Reply
#2
Quote: gamespotplus and xmovieguide.
can you check in both these scripts if the var "file" is used ?
Reply
#3
i have not checked but would they conflict? they are running in different scripts, at different times... yes?

does python use only one "environment" for all scripts running so that variables are global across scripts?
- i did not think this would be the case as this is not how any other scrip languages work to my knowledge (vbscript, jscript, etc.)
I'm not an expert but I play one at work.
Reply
#4
(affini @ april 25 2005,17:24 Wrote:does python use only one "environment" for all scripts running so that variables are global across scripts?
i am pretty sure this is the case.... i notice that global variables that are not deleted at the end of a script will still be set when that script runs again (until reboot)

del file

should fix the problem.
Reply
#5
not to hijack this thread, but what about importing .py files. is there a proper way to remove those from memory?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
(asteron @ april 25 2005,17:18 Wrote:
(affini @ april 25 2005,17:24 Wrote:does python use only one "environment" for all scripts running so that variables are global across scripts?
i am pretty sure this is the case.... i notice that global variables that are not deleted at the end of a script will still be set when that script runs again (until reboot)

del file

should fix the problem.
i find it hard to believe... it would be huge bug in the python engine if that is the case.

i'm no expert coder but if that was the case with all programming languages you'd never get multiple programs to run at the same time without causing crashing like crazy.

in my mind there are two likely possibilities here:

1) there is a bug where vars are not removed from memory.
2) a memory leak or some bug is being shown when using the xbmc.player().play(file) method.

i hope an xbmc coder chimes in on this...
I'm not an expert but I play one at work.
Reply
#7
Quote:i am pretty sure this is the case.... i notice that global variables that are not deleted at the end of a script will still be set when that script runs again (until reboot)
the same for me. i already noticed some strange things with import and with global variables.
sure it is strange !! but the fact is that it seems to be reality
Reply

Logout Mark Read Team Forum Stats Members Help
Bug: startupmp3 (mp3.py) kills scripts!0