XML calls python and crashes XBMC?
#1
Hello Experts

I have an XML document that calls python and crashes. I have removed most of the python code and much of the XML and yet the XML document below still crashes XBMC with error code 10. XBMC log shows nothing after "-->Python Interpreter Initialized<--". Here's my problem code. I'm sure it is something very straightfoward as I'm new to this and only marginally know what I'm doing...

Does anyone have any ideas please? Thank you in anticipation

Code:
<?xml version="1.0"?>
<window type="window" id="4000">
    <defaultcontrol always="true">5000</defaultcontrol>
    <allowoverlay>no</allowoverlay>
    <onload lang="python"><![CDATA[

import os
import urllib
import xbmc
import xbmcgui
import re

except Exception, e:
    dp.close()
    dialog = xbmcgui.Dialog()
    dialog.ok('Error', str( e ))

]]></onload>
    <controls>
        <include>Window_Fade_Animation</include>
        <control type="image">
            <posx>10</posx>
            <posy>10</posy>
            <width>1260</width>
            <height>700</height>
            <texture>tvshow_background.png</texture>
        </control>
    </controls>
</window>

Crash log says: Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
Reply
#2
It is probably a good idea for you to recreate this with debug on and then post a link to the entire debug log. Devs generally want all the information rather than snippets. Check the wiki for more details.
Reply
#3
Right. Internal or external python?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Thanks both. I'll give it a go when I've researched out how to turn debug on. This scritp is running on XBMC on an apple tv. I'm sorry, I don't know the different between external and internal python. I have modified the xml file of a skin to put an extra button on it that when pressed opens a window (more XML) that calls python when various buttons are pressed
Reply
#5
Hmm...didn't know we could embed python in skinning xml files. I thought this was a Boxee/Plex only thing...
MythBox for XBMC - http://mythbox.googlecode.com
Reply
#6
I guess now I know what happens if one tries to embed python in skinning files! Shame it doesn't work because it makes for a very easy way to handle the user interface via XML
Reply

Logout Mark Read Team Forum Stats Members Help
XML calls python and crashes XBMC?0