Bug Use of resource addons inside a container ?
#1
So, I'm updating my skin to use the new image resource addons.
Now I think I've stumbled across a minor issue...

When I want to use the studio-logos resource images for the studio listing itself it seems that this isn't implemented yet ?

I have this on my VAR for the thumbs from the container:

<value condition="Container.Content(studios)">resource://resource.images.studios.white/$INFO[ListItem.Label,,.png]</value>

This is resulting in these errors in the Kodi log:

PHP Code:
23:38:13 T:2936   ERRORCImageLoader::DoWork Direct texture file loading failed for resource://resource.images.studios.white/DMC Films.png
23:38:13 T:2936   ERRORCImageLoader::DoWork Direct texture file loading failed for resource://resource.images.studios.white/DJ Films.png
23:38:13 T:1268   ERRORCImageLoader::DoWork Direct texture file loading failed for resource://resource.images.studios.white/Donners' Company.png
23:38:13 T:2936   ERRORCImageLoader::DoWork Direct texture file loading failed for resource://resource.images.studios.white/DMC Films.png
23:38:13 T:1268   ERRORCImageLoader::DoWork Direct texture file loading failed for resource://resource.images.studios.white/Double Nickel Entertainment.png 


BTW: I was playing with this in my skinhelper addon too and noticed that xbmcvfs.File also doesn't understand this special resource:// paths. I tried to load one of the images this way and that was also resulting in a "direct texture file loading failed" error in the log.
Reply
#2
it works fine on my end.
i do get those errors in the log, but only for studio logos that are not included in the addon.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Hmmm strange... I will do some further testing.
I just found out that movie genre icons appear to be working OK using this same method, the white studio icons are failing somehow.
Reply
#4
OK, now I'm 100% convinced something is off with the studio icons resource addon (or with me overlooking something)...

Just used a direct path to the resource addon straigth on the image:

<texture border="1" background="true" diffuse="diffuse/poster.png" fallback="DefaultVideo.png">resource://resource.images.studios.white/20th Century Fox.png]</texture>

the image 20th Century Fox.png is 100% sure present in the addon, as can be seen on Git:
https://github.com/XBMC-Addons/resource..../resources


Also, I tried accessing the resource addons from python using xbmcvfs.File and this has the same issue.. it works for some of the resource addons but for others it doesn't. For example the moviegenreicons are working but musicgenreicons aren't accessible this way.

BTW: I'm running Kodi Jarvis alpha 4
Reply
#5
well there's a typo in the code:
Code:
<texture border="1" background="true" diffuse="diffuse/poster.png" fallback="DefaultVideo.png">resource://resource.images.studios.white/20th Century Fox.png]</texture>
remove the ']' bracket at the end.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
(2015-11-04, 13:28)ronie Wrote: remove the ']' bracket at the end.

Sorry, that was just a little copy-paste error on my end.

I have found out what's wrong...

It's a lowercase issue.. All images inside the resource addon are LOWERCASE.

It works like this:

resource://resource.images.studios.white/20th century fox.png

but it won't work like this:

resource://resource.images.studios.white/20th Century Fox.png
Reply
#7
that's kinda odd for two reasons:

1) i've tested it with 'resource://resource.images.studios.white/20th Century Fox.png' and it does work fine here.
2) the images are packed in a Textures.xbt file, which means they are case-insensitive. it doesn't matter what casing you use in the skin.

even 'resource://resource.images.studios.white/20TH CENTURY FOX.PNG' works ok at my end.


perhaps you're not using the resource addon from our repo, but have some version installed without the textures file?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
please note that a few resource addons ship without a textures file, due to filesize issues,
for those, proper casing does matter.
it should not be an issue though as all the image files have proper casing afaik.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
(2015-11-04, 17:05)ronie Wrote: that's kinda odd for two reasons:

1) i've tested it with 'resource://resource.images.studios.white/20th Century Fox.png' and it does work fine here.
2) the images are packed in a Textures.xbt file, which means they are case-insensitive. it doesn't matter what casing you use in the skin.

even 'resource://resource.images.studios.white/20TH CENTURY FOX.PNG' works ok at my end.


perhaps you're not using the resource addon from our repo, but have some version installed without the textures file?

That's what I was thinking too... The casing issue isn't a problem with other resource addons such as the movie genre icons.

The one I have installed is version 0.0.5 from the Kodi repo, with the Textures.xbt.

Strange huh ?

BTW: I'm testing this on a windows machine, haven't tested other platforms yet
Reply
#10
if there's one platform where casing shouldn't matter, it would be windows :-)

but yeah, pretty weird.
any clues in the debug log perhaps?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#11
(2015-11-04, 17:22)ronie Wrote: if there's one platform where casing shouldn't matter, it would be windows :-)

but yeah, pretty weird.
any clues in the debug log perhaps?

Yeah, but it wouldn't also be the first time to see some weird stuff going on with Windows, I remember that strange touch problem a while back ;-)

The log is only showing the direct texture error:

16:05:26 T:12128 ERROR: CImageLoader:Big GrinoWork - Direct texture file loading failed for resource://resource.images.studios.white/20th Century Fox.png

What I can do for test is wipe the textures db file and thumbnails dir, maybe this has something to do with the texture cache.
Reply
#12
I've just wiped my Textures.db file + Thumbnails dir and guess what... the images show up now using "20th Century Fox" but... now the lowercase equivalent is not working anymore...

So, I just opened the Textures13.db file is SQL browser and no reference in there for the studio icon so I guess that the texture cache isn't used for images in the resource addons (which is a good thing).

I just now disovered that closing Kodi results in the image working again on the lowercase and again not working on the uppercase/camelcase variant.

So, my best guess is that something is cached in memory case sensitive.

How to reproduce:

1) paste "resource://resource.images.studios.white/20th Century Fox.png" as texture in a image control
2) reload the skin and see that it is working
3) change the texture path by changing the case, e.g. change to 20th century fox
4) reload the skin and see that the image doesn't show up anymore and a error in the log
5) restart Kodi and see that the image will show up with the changed casing
6) change the casing back again and you will see that it again fails to show the image

Maybe it's a feature ? ;-)
Reply
#13
Any insight on this ? Should I create a bug report ?
Reply
#14
i've followed your steps, but i can't reproduce it.
tested it on both linux and windows.

could you please post a full debug log?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#15
Oh well... I'm one step closer...

Wiped my userdata folder and tried with a completely virgin Kodi installation, with only confluence and the studio images reource addon.
Indeed working, just like you said. I then started to investigate all addons and settings one by one to find out when it would break.
Guess what... it turns out to be my own skin helper addon that breaks it.

Now the why...

In the skinhelper addon there is this line of code:

xbmcvfs.listdir("resource://resource.images.studios.white/")

This will list all images inside the resource addon to build a list of available studio logos. This is later on used to find a matching logo with a studio.
Working perfectly fine. Except that it breaks something.

To reproduce just create a plain simple Kodi addon (I created a context menu addon for test) with only this:

PHP Code:
import xbmcxbmcvfs
def main
():
    
xbmcvfs.listdir("resource://resource.images.studios.white/")

if 
__name__ == '__main__':
    
main() 

Once that is executed the resource images will have the issue with the capitals.


Should this be considered a bug or are addons not supposed to list the contents of the resource addon in python ?
Reply

Logout Mark Read Team Forum Stats Members Help
Use of resource addons inside a container ?0