Kodi Community Forum

Full Version: crashing on Gotham beta
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I've been working on updating my skin for Gotham. I have not experienced any major problems while developing it on my Mac. After updating my actual HTPC to Gotham Beta 1 (OpenElec) and installing it on there though, there's major issues.

Basically it crashes with basically anything I do... Going into videos from the home menu, crash. Going into addon settings, crash. Selecting a default weather service provider from the weather screen, crash...

The screen goes black, shows the crosshair type cursor, and restarts xbmc right away..

Confluence has no problems. I also installed Hitcher's latest Gotham version of Alaska. That worked fine as well.

I am at a total loss of what is causing this.

I have a debug log:

https://www.dropbox.com/s/rlf184r9w0vui8s/xbmc%203.log

Hopefully someone can point me into the right direction. After months of work this is quite unsettling Sad
Try to start with a fresh XBMC install on your HTPC (remove the XBMC folder with all add-ons, library etc.).
(2014-03-08, 13:47)`Black Wrote: [ -> ]Try to start with a fresh XBMC install on your HTPC (remove the XBMC folder with all add-ons, library etc.).

It already is a completely fresh XBMC install, just got a new HTPC actually. The same problem on my old box though. Didn't install any add-ons besides my skin. After that I installed some to see if dependencies not met were being the issue.

I also installed a gotham compatible mod of my older skin (http://forum.xbmc.org/showthread.php?tid=132897), and that one crashes too. It seems like it's specific to my skin but I haven't got the slightest clue as to what it could be.
When I load the videos window with <window id="25"> XBMC crashes. When I omit the ID, which seems to be Ok to do these days (?) it doesn't crash anymore. It doesn't load the window properly though, it basically shows a black screen with some labels on top of eachother, that's it.

music files window seems to load normally
You should remove id="" from all your windows (it does nothing, windows get loaded based on the filename) except custom_ windows if you need a static id there, Jonathan mentioned that a year ago or so.

How do you load the videos window? This is how you would i.e. load movie titles:

PHP Code:
<onclick condition="!Library.HasContent(movies)">ActivateWindow(videos,files,return)</onclick>
<
onclick condition="Library.HasContent(movies)">ActivateWindow(videos,movietitles,return)</onclick
(2014-03-08, 15:46)`Black Wrote: [ -> ]You should remove id="" from all your windows (it does nothing, windows get loaded based on the filename) except custom_ windows if you need a static id there, Jonathan mentioned that a year ago or so.

How do you load the videos window? This is how you would i.e. load movie titles:

PHP Code:
<onclick condition="!Library.HasContent(movies)">ActivateWindow(videos,files,return)</onclick>
<
onclick condition="Library.HasContent(movies)">ActivateWindow(videos,movietitles,return)</onclick

Unfortunately that didn't do the trick Sad I was using ID's but I removed them. I'm using the same method as you to open the video window...
Just removing the id attribute shouldn't change anything (it's basically ignored).

If you give me a reproducible example I'm happy to track it down - stuff done in the skin shouldn't crash XBMC Smile
Thanks so much Jonathan, but gladly I was able to find the cause.

I load my options menu/side blade/whateverit'scalled via an include in several windows. One of the buttons used for viewtype selection had a redundant extra "[" in the visibility condition. Correcting that fixed MyVideoNav.xml from crashing. Additional crashes were cause by a similar mistake (a "[" was missing there) in an another include I use in multiple windows. Or maybe it was the combination of the two mistakes.

It was a long session of tearing down the XML's and building them up again bit by bit up to the point where things broke... Rolleyes

The application crashing because of two misplaced brackets certainly surprised me. Even more so because the bad code is months old and never cause me any trouble on my workstation. The visibility conditions even worked correctly...

Anyway, I am relieved ;0
You should have used the XML tool to check for errors. Wink
The missing square bracket thing does NOT cause a crash in XBMC. You can have as many as you like and it won't make any difference.

The crash is caused by PR3677 which is included in OpenElec, but is not in mainline as it hasn't yet been properly reviewed. It will also not be in Gotham.

If you get any problems whatsoever in OpenElec, make sure you confirm them in standard XBMC before you report them please (or report and clearly state OpenElec, and ask someone to confirm in standard XBMC).

Cheers,
Jonathan
Well lets just call this 'reviewing a PR' then. Nice work jmarshall.
Just want to mention I am still encountering crashes, this time on standard XBMC on OSX. And whatever the underlying cause is, from my skinner's perspective they definitely are related to missing brackets.

For example, I have this code in my DialogFullscreenInfo.xml:

PHP Code:
<control type="group">
    <
visible>![Window.IsActive(infodialog) | Window.IsActive(extendedprogressdialog)</visible>
    <
control type="label">
        <
label>$VAR[global_Clock.Formats]</label>
        <include>
toast_Top</include>
    </
control>
    <
control type="label">
        <
label>$LOCALIZE[31323$INFO[Player.FinishTime]</label>
        <
textcolor>Color1</textcolor>
        <include>
toast_Bottom</include>
    </
control>
    <
control type="image">
        <
top>18</top>
        <include>
toast_Icon</include>
        <
texture>$INFO[Window(weather).Property(Day0.FanartCode),weather/small/,.png]</texture>
        <
visible>IntegerGreaterThan(Player.Volume,0) + Weather.IsFetched</visible>
    </
control>
    <
control type="image">
        <
top>19</top>
        <include>
toast_Icon</include>
        <
texture>toast/clock.png</texture>
        <
visible>IntegerGreaterThan(Player.Volume,0) + !Weather.IsFetched</visible>
    </
control>
</
control

Upon pressing info XBMC would crash, 100% of the time. I didn't notice the missing closing bracket in the group's visibility condition at first so I started deleting control by control starting from the bottom and repeating the test every time. Again 100% of the time XBMC crashed, until I corrected the missing bracket. No more crashes.

I have run into a couple more bracket / infobool parsing related crashes.
Fixed in master + Gotham branch. It'll be Beta4 (didn't make B3 which will be out shortly).
Great. Well, at least the crashes served as a code validator Wink