Auto3D plugin for MediaPortal 1.2 - 1.12 (GUI & TV/Beamer) (1 Viewer)

Marcus Venturi

MP Donator
  • Premium Supporter
  • March 23, 2012
    614
    745
    57
    Home Country
    Germany Germany
    Added new version with a modified UPnP.dll. The old version had 2 problems. A memory leak and high CPU usage, which where found by @Sebastiii while searching for the reason of a MediaPortal crash described here:

    https://forum.team-mediaportal.com/threads/fontengine-crash-need-help.122889/

    @Sebastiii fixed the memory leak and I (hopefully) fixed the high CPU usage. I did some test on my machine and everything seems to work again.
    So it's time to see if this really solves all Problems. I attached a new version of the plugin containing a new UPnP.dll at the first post in this thread.

    Auto3D_1.6.pre_4.mpe1
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi Marcus,

    I have let running mp the whole night :

    upload_2013-12-6_7-19-53.png


    I have stop the music and now on Home screen it stay @ 14-17 % on my i7 3770k (it's too high) :(
    Starting a video and it take too long to start and in fact didn't start and @ the end i need to kill MP :(

    So the change maybe didn't go as fast memory/cpu usage than before but still not ok.
    In Auto3D, it was set as 'No device', maybe when set to 'No device', we should get ride of UPNP scanning ?

    Ps : i will try to set a device (even if i can't setup one) to see if it's different :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi,

    I have let running MP this morning (with Samsung TV as setting) and it's the same 12-13% and 620mb.

    I have try the app that use UPnP.dll alone and on each network scan (i do it manually) APP take around 2-5 mb and a little CPU usage is happening while the scan.
    So it lead to MS method that does that.

    This APP tool scan only one and not always (that is that i have try to avoid) but here for Auto3D we need to scan @ regular basis to detect new arrived material.
    how we can fix that ?

    For sure for now it's not usable :( and it's not cool :)
     

    Marcus Venturi

    MP Donator
  • Premium Supporter
  • March 23, 2012
    614
    745
    57
    Home Country
    Germany Germany
    So it lead to MS method that does that.
    how we can fix that ?

    Good question. Which API-call do you mean that causes the Problem?

    I used the Intel UPnP Library, because it was free and I didn't want to invent the wheel a second time.

    Perhaps I should think of switching to another UPnP framework. :(
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi,
    I have do a quick look and i think it's in :
    Code:
                    ArrayList CurrentAddressTable = new ArrayList();
                    NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
                    foreach (NetworkInterface i in interfaces)
                    {
                        if (i.IsReceiveOnly == false && i.OperationalStatus == OperationalStatus.Up && i.SupportsMulticast == true)
                        {
                            IPInterfaceProperties i2 = i.GetIPProperties();
                            foreach (UnicastIPAddressInformation i3 in i2.UnicastAddresses)
                            {
                                if (!CurrentAddressTable.Contains(i3.Address) && !i3.Address.Equals(IPAddress.IPv6Loopback)) { CurrentAddressTable.Add(i3.Address); }
                            }
                        }
                    }

    If i'm not wrong from memory it's :
    NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
    for sure it eat memory about cpu usage maybe too but not 100% sure.
     

    Marcus Venturi

    MP Donator
  • Premium Supporter
  • March 23, 2012
    614
    745
    57
    Home Country
    Germany Germany
    Hi Sebastiii, I did a further test with the DeviceSpy.exe and can confirm that there is still memory lost. :(
    So the error in the UPnP.dll is still existing, and as I could reproduce it with the DeviceSpy.exe it should happen also with the other Apps using the UPnP.dll, maybe nobody has recognized this yet. :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    And it seems that it trigger CPU usage quickly after MP start (for it does) lol.
    That's a pain and will be hard to fix it seems.
     

    Users who are viewing this thread

    Top Bottom