Possible bug in image free code.
#1
Bug 
This is possible one for the dev's but while marcelveldt and I where trying to pin down a issue in our skins with memory usage I found this code in the Kodi source code that I think may have a problem

PHP Code:
From file xbmc/guilib/GUIImage.cpp

void CGUIImage
::UpdateInfo(const CGUIListItem *item)
{
if (
m_info.IsConstant())
return; 
// nothing to do
// don't allow image to change while animating out
if (HasProcessed() && IsAnimating(ANIM_TYPE_HIDDEN) && !IsVisibleFromSkin())
return;
if (
item)
SetFileName(m_info.GetItemLabel(itemtrue, &m_currentFallback));
else
SetFileName(m_info.GetLabel(m_parentIDtrue, &m_currentFallback));


Now I'm not entirely sure as my C is a bit rusty, but I think this line is incorrect
PHP Code:
if (HasProcessed() && IsAnimating(ANIM_TYPE_HIDDEN) && !IsVisibleFromSkin()) 

I think the " !IsVisibleFromSkin()) " (is NOT visible) means that the image is not released if it is animated when it becomes no longer visible in the skin.

Have I got that right, or does the problem exist elsewhere?

At any rate, it would seem if you have a Hidden type animation fading out your image, the image will not be released, and so will cause a memory issue on low speced machines (Raspberry Pi's and probably AppleTV's) when you try to play certain videos (HD content). Our advise would be to avoid this type of animation due to the current problems they cause.

Wyrm (AppTV)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#2
Interesting. Is there a way to trigger the memory usage issue?
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
#3
(2015-01-30, 09:01)mkortstiege Wrote: Interesting. Is there a way to trigger the memory usage issue?
Mkortstiege,

Is triggered in AppTV 1.0.0 from Helix skin repo. My background image includes (in my includes.xml file, 3rd and 4th include from top of that file) has a fade animation for when control block is hidden that basically stops the image controls memory being freed up when full screen video screen is launched.

If I remove the animation tags from that code, memory is dealocated after about 5 seconds as it should be and HD videos then have plenty of 'graphics' memory available for play back. Popcornmix provided a custom raspberry Pi build for Marcel of Titan skin to show in the log graphics memory usage. Tests of my skin with the animation code in is about 40M less available memory than when animation code is removed.

I had a trawl through the Kodi source code and spotted the above code and thought that the "!IsVisibleFromSkin" was a bit hinky. I then tried removing the hidden animation tag and that's when we saw the improvement in memory usage. So while it may not be that code in particular, there does seem to be an issue with freeing up memory when hidden animation types are used.

Hopefully that is enought for you to investigate this further (sorry I'm away from my computer at the moment, so typing this in on my iPad from memory). Let me know if you need further details, and I will post the section of code that is causing the issue.

Wyrm (AppTV)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply

Logout Mark Read Team Forum Stats Members Help
Possible bug in image free code.0