Posts: 32
Joined: Jul 2011
Reputation:
0
2013-01-08, 05:31
(This post was last modified: 2013-01-08, 05:35 by guitardood.)
I'm working on a python addon for XBMC. For some reason, the script terminates unexpectedly somewhere in a 'time' routine.
Unfortunately, the python interpreter is not handling errors as expected and is not giving any debug output.
The script runs fine under both Win and OSX. I'm not sure why the abended script is not producing an error and traceback under iOS as it does under Win or OSX.
While it is possible to debug without this info, it would be so much easier if the interpreter gave some helpful hint as to why it's crapping out.
Can someone please help?
Best,
guitardood
EDIT: Should have mentioned, this is on an iPad2 with IOS 5.1 and XBMC Frodo RC3
Posts: 16,946
Joined: Feb 2011
Reputation:
256
Did you turn on debugging (system->system->debugging)? This might enable the python exception output.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much:
click here
HowTo setup NFS for Kodi:
NFS (wiki)
HowTo configure avahi (zeroconf):
Avahi_Zeroconf (wiki)
READ THE IOS FAQ!:
iOS FAQ (wiki)
Posts: 32
Joined: Jul 2011
Reputation:
0
Regardless of the debug setting, the only message I get is 'plugin exited prematurely - terminating'. Even if I create a blatant syntax error in a simple 3 line python script, the interpreter in XBMC on iOS does not print any python errors, just the aforementioned 'terminating' message.
Any help with this would be greatly appreciated. I've created a really nifty plugin framework that has a lot of cool features but it will never be releasable if I can't properly debug.
Posts: 16,946
Joined: Feb 2011
Reputation:
256
Can you try it on osx? It should printout the errors there...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much:
click here
HowTo setup NFS for Kodi:
NFS (wiki)
HowTo configure avahi (zeroconf):
Avahi_Zeroconf (wiki)
READ THE IOS FAQ!:
iOS FAQ (wiki)
Posts: 32
Joined: Jul 2011
Reputation:
0
When I run the script on OSX, it does not terminate unexpectedly, only on iOS. I actually fixed my current problem by putting a ton of debug messages to narrow down where it was abending and fixed it. However, for future development, it would be really helpful if the python exception log on iOS could print to the xbmc.log file same as on OSX, Win & Linux.
Posts: 492
Joined: Dec 2006
Reputation:
5
Is the script terminating or does XBMC actually crash? If an error/exception is raised in python that gets back into the xbmc c++ code then it should certainly print the stack trace.
Posts: 32
Joined: Jul 2011
Reputation:
0
2013-02-19, 04:16
(This post was last modified: 2013-02-19, 04:18 by guitardood.)
Bumpity bump!
Anyone?
I really don't mean to be jerky about this, but it is a huge problem trying to run scripts that crap out only on iOS and don't give error reports. The script runs fine on every other platform. It seems to be failing in a 'time' module routine (tracked down by putting a ton of prints to narrow down the call where the problem was occurring. Probably something that has an exception trap around it, but if the script bombs it should at the very least give a line number and module name where the script failed.
At the very least, could someone try the code I posted above and check your log to try and reproduce this? I'm experiencing this issue on iOS 5.1
Best,
guitardood
Posts: 16,946
Joined: Feb 2011
Reputation:
256
2014-02-19, 00:13
(This post was last modified: 2014-02-19, 00:13 by Memphiz.)
We finally fixed that one ... - python exceptions will show up again in next nightly build.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much:
click here
HowTo setup NFS for Kodi:
NFS (wiki)
HowTo configure avahi (zeroconf):
Avahi_Zeroconf (wiki)
READ THE IOS FAQ!:
iOS FAQ (wiki)