- Moderator
- #1
Yesterday i made a clean install on my HTPC. I installed Win 7 32Bit on a Gigabyte GA-MA78GM-S2H, AMD Athlon 4800+, 2GB DDR2, ATI HD4550 machine.
I only installed my drivers + SAF 5.0 SVN 100510 + MediaPortal 1.1.0 RC3 + StreamedMP 1.1.0 and BlackGlass Nova 1.1
After some time on the basichome screen using BlackGlass Nova skin, MediaPortal gets very slow and it stops working with the message "Not enough memory left".
If i look at the task manager, i see that my whole memory is full. So this message is true about my memory status
I investigated a while, why this happens:
The MediaPortal.log says following:
After this message MP begins to reset itself again and again (see attached mediaportal.log)
MP throws an exception in the method DrawTextUsingTexture(FontManagerDrawText draw, Int32 fontSize) of GUIFontManager. So i added some debug info lines to this method to see what really happens (see again mediaportal.log)
As you can see the cacheSlot var is 500 in the log. But the list _listFontTextures only have max 500 items saved (0 ... 499). So the indexer cacheSlot is to high. It should be max. 499.
So if the cacheSlot is 500 just decrease it by one:
Actually I'm not quite sure if this is the right solution and what this change causes, but i hope this error should be fixed with this. Although this error happens only if i activate InfoServic. I think this is not related to this plugin, but rather to the fadelabel which is used by InfoService to display the ticker line. It looks like the fadelabel needs the GUIFontManager to write initially every step which the ticker does to the fonttextures. And if the ticker is long enough, the max fonttexture size of 500 is reached and this exception occurs.
Attached i have the complete MediaPortal.log and a patch file with my fix for MePo 1.1.0 RC3.
Edit: This change fixed the exception and the resetting of MePo but my RAM gets still filled like hell (from 700-800 MB to 1500MB) and the fadelabel stutters also like hell now . But at least it doesn't crash anymore
Edit2: Crash.... Out of memory warning by windows. The same again, but now with no errors and a normal MediaPortal.log
Edit3: Removed fadelabel from skin. Now the problem is gone (No filling RAM anymore), but thats no solution for me.
Edit4: Updated patch file. Fadelabel works now like before without stuttering and also without the OutOfRangeExeception. My RAM gets still filled till 1500MB....
I only installed my drivers + SAF 5.0 SVN 100510 + MediaPortal 1.1.0 RC3 + StreamedMP 1.1.0 and BlackGlass Nova 1.1
After some time on the basichome screen using BlackGlass Nova skin, MediaPortal gets very slow and it stops working with the message "Not enough memory left".
If i look at the task manager, i see that my whole memory is full. So this message is true about my memory status
I investigated a while, why this happens:
The MediaPortal.log says following:
2010-05-22 18:23:50.077341 [Info.][MPMain(1)]: Exception ystem.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
bei System.Collections.Generic.List`1.get_Item(Int32 index)
bei MediaPortal.GUI.Library.GUIFontManager.DrawTextUsingTexture(FontManagerDrawText draw, Int32 fontSize)
bei MediaPortal.GUI.Library.GUIFontManager.Present()
bei MediaPortal.GUI.Library.GUILayerManager.Render(Single timePassed)
bei MediaPortalApp.Render(Single timePassed)
2010-05-22 18:23:50.078341 [Info.][MPMain(1)]: Exception er Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
2010-05-22 18:23:50.078341 [Info.][MPMain(1)]: site :Void ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
2010-05-22 18:23:50.078341 [Info.][MPMain(1)]: source :mscorlib
2010-05-22 18:23:50.079341 [Info.][MPMain(1)]: stacktrace: bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
bei System.Collections.Generic.List`1.get_Item(Int32 index)
bei MediaPortal.GUI.Library.GUIFontManager.DrawTextUsingTexture(FontManagerDrawText draw, Int32 fontSize)
bei MediaPortal.GUI.Library.GUIFontManager.Present()
bei MediaPortal.GUI.Library.GUILayerManager.Render(Single timePassed)
bei MediaPortalApp.Render(Single timePassed)
2010-05-22 18:23:54.834613 [Info.][MPMain(1)]: Main: D3DERR_INVALIDCALL - Fehler in der Anwendung.
-2005530516 (D3DERR_INVALIDCALL)
bei Microsoft.DirectX.Direct3D.Device.BeginScene()
bei MediaPortalApp.Render(Single timePassed)
Parametername: index
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
bei System.Collections.Generic.List`1.get_Item(Int32 index)
bei MediaPortal.GUI.Library.GUIFontManager.DrawTextUsingTexture(FontManagerDrawText draw, Int32 fontSize)
bei MediaPortal.GUI.Library.GUIFontManager.Present()
bei MediaPortal.GUI.Library.GUILayerManager.Render(Single timePassed)
bei MediaPortalApp.Render(Single timePassed)
2010-05-22 18:23:50.078341 [Info.][MPMain(1)]: Exception er Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
2010-05-22 18:23:50.078341 [Info.][MPMain(1)]: site :Void ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
2010-05-22 18:23:50.078341 [Info.][MPMain(1)]: source :mscorlib
2010-05-22 18:23:50.079341 [Info.][MPMain(1)]: stacktrace: bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
bei System.Collections.Generic.List`1.get_Item(Int32 index)
bei MediaPortal.GUI.Library.GUIFontManager.DrawTextUsingTexture(FontManagerDrawText draw, Int32 fontSize)
bei MediaPortal.GUI.Library.GUIFontManager.Present()
bei MediaPortal.GUI.Library.GUILayerManager.Render(Single timePassed)
bei MediaPortalApp.Render(Single timePassed)
2010-05-22 18:23:54.834613 [Info.][MPMain(1)]: Main: D3DERR_INVALIDCALL - Fehler in der Anwendung.
-2005530516 (D3DERR_INVALIDCALL)
bei Microsoft.DirectX.Direct3D.Device.BeginScene()
bei MediaPortalApp.Render(Single timePassed)
MP throws an exception in the method DrawTextUsingTexture(FontManagerDrawText draw, Int32 fontSize) of GUIFontManager. So i added some debug info lines to this method to see what really happens (see again mediaportal.log)
As you can see the cacheSlot var is 500 in the log. But the list _listFontTextures only have max 500 items saved (0 ... 499). So the indexer cacheSlot is to high. It should be max. 499.
So if the cacheSlot is 500 just decrease it by one:
Code:
if (_listFontTextures.Count >= _maxCachedTextures)
{
_listFontTextures.RemoveAt(0);
[B]cacheSlot--;[/B]
}
_listFontTextures.Add(newTexture);
}
_d3dxSprite.Draw(_listFontTextures[cacheSlot].texture, new Rectangle(0, 0, size.Width, size.Height),
Vector3.Empty,
new Vector3((int)draw.xpos, (int)draw.ypos, 0), draw.color);
Actually I'm not quite sure if this is the right solution and what this change causes, but i hope this error should be fixed with this. Although this error happens only if i activate InfoServic. I think this is not related to this plugin, but rather to the fadelabel which is used by InfoService to display the ticker line. It looks like the fadelabel needs the GUIFontManager to write initially every step which the ticker does to the fonttextures. And if the ticker is long enough, the max fonttexture size of 500 is reached and this exception occurs.
Attached i have the complete MediaPortal.log and a patch file with my fix for MePo 1.1.0 RC3.
Edit: This change fixed the exception and the resetting of MePo but my RAM gets still filled like hell (from 700-800 MB to 1500MB) and the fadelabel stutters also like hell now . But at least it doesn't crash anymore
Edit2: Crash.... Out of memory warning by windows. The same again, but now with no errors and a normal MediaPortal.log
Edit3: Removed fadelabel from skin. Now the problem is gone (No filling RAM anymore), but thats no solution for me.
Edit4: Updated patch file. Fadelabel works now like before without stuttering and also without the OutOfRangeExeception. My RAM gets still filled till 1500MB....
Code:
<control>
<description>Feed Items</description>
<type>fadelabel</type>
<id>0</id>
<width>1190</width>
<height>50</height>
<posX>45</posX>
<posY>688</posY>
<font>font14</font>
<textcolor>ff888888</textcolor>
<label>#infoservice.feed.alltitles</label>
<animation effect="fade" time="250">VisibleChange</animation>
<wrapString> : : : </wrapString>
<visible>plugin.isenabled(InfoService)+string.equals(#infoservice.feed.enabled, true)+!control.hasfocus(1112)</visible>
</control>