IddCx leaks memory - where to ask for help?

Hey everyone,

I’ve developed a virtual display driver using the IddCx framework in Windows 10, but I have a small problem. The framework seems to be leaking about ~2-3 MB of memory each time the display is “plugged in” and eventually disconnected.

According to https://docs.microsoft.com/en-us/windows-hardware/drivers/display/iddcx-objects the IDDCX_MONITOR object is destroyed upon calling IddCxMonitorDeparture and should not be reused, but since this leaks memory I’ve also tried the following with poor success:

  • Deleting IDDCX_MONITOR with WdfObjectDelete before or after IddCxMonitorDeparture results in a crash.
  • Reusing the object with another call to IddCxMonitorArrival after calling IddCxMonitorDeparture gives an errornous result.

For what it’s worth, a commercial driver by Spacedesk seems to exhibit the same behaviour of leaking a few MB of memory each time the virtual display is plugged in.

I suppose I could just let this be, but I’m curious if there’s a mailing list or similar where someone from Microsoft could take a look at this?

Otto

I developed spacedesk and its IddCx driver. This is funny - nobody ever noticed this memory leak - even though our installed base is a two digit million number of Windows PCs. Probably because people never plug and unplug their display monitors hundreds of times before rebooting their PCs…

We are in contact with the IddCx team at Microsoft - I can forward this if applicable (needs to be thoroughly verified first, though). Just file a case in the spacedesk support forum, then I can contact you by email.

PS: You can also try the Microsoft WDK forum. However, I have hardly ever seen any answers to WDDM display driver questions there beside my own ones.

Marcel Ruedinger
datronicsoft

Hey Marcel, thanks for the reply!

I agree that a few MB per plug-in/plug-out cycle is not a very big deal, but I don’t see harm in letting the IddCx team know either. You can contact me at kelocube@kelocube.com - unless you need me to file a case on your support forum? Although I’m not sure how that would look given that I’m working on a competing product :wink:

If you feel like you don’t want to spend the time verifying and reporting this, then that’s fine too - it can’t be a very big issue if not one user in a million has been bothered by it. I was mostly asking if there’s something akin to https://www.freelists.org/list/wdmaudiodev for Windows display drivers, which you’ve answered. :smile:

Otto

There are various ways you can file a bug on this with MSFT. I guess if you’re asking here, you’re not on Collaborate? That would be the first and best place to file. You can also go through paid WDK support (if it’s a bug you ultimately won’t be charged).

I don’t do display drivers, so I can’t hook you up with anyone on that team, but it sounds like @Marcel_Ruedinger can. Marcel… off line send him to a helpful PM or something.

Peter

Thanks for the pointers, Peter. I registered for Collaborate but I’ll wait for Marcel’s comment before filing any feedback.

Otto

Private emails exchanged. Public info: Solid prerequisite before reporting to Microsoft involves reproducing with DisplayLink USB display, with Microsoft Windows Miracast IddCx driver and a minimum possible modification to WDK IddCx Indirect Display driver sample (e.g. hardcoded loop plugging and unplugging the display monitor).

Marcel Ruedinger
datronicsoft

Thank you, Mr. Ruedinger…I agree it’s important to do your homework before running off to the dev team with error reports.

SpaceDesk looks like quite a nice little utility, btw. Bravo.

Peter

I am not sure if this helps. Running WHQL test might help to catch the
culprit. When I was developing IDDCX driver for my company, I still
remembered that there are so many leaks caught by the WHQL test back then.
Eventually I got it all fixed.

KeloCube 於 2020年5月22日 週五
上午8:08寫道:

Thank you for all the comments. I spoke with Marcel and agreed to test this out on some reference hardware before moving forward with an error report. I haven’t tried setting up any WHQL tests yet as I’m working on a software product and so far I’ve been quite happy with attestation signing, but I will look into them if the issue is not reproduced on the reference hardware.

Otto