Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft that provides a user with a graphical interface to connect to another computer over a network connection. The user employs RDP client software, while the other computer must run RDP server software. This post is intended to identify the cause of the issue, as well as the workaround as it concerns RDP connection (mstsc.exe) memory issues when sound plays on Windows systems.
RDP connection disconnects when you enable Sound
Let’s take a look at a typical scenario where you can encounter this RDP connection memory leak issue.
In a Remote Desktop connection (mstsc.exe) to a Windows computer, the connection leaks memory when you play any sound. This includes simple beep tones that are generated on the PC speaker.
In this situation, mstsc.exe may disconnect suddenly and prompt you to reconnect to the remote computer.
MSTSC.exe creates connections to Remote Desktop Session Host servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.
RDP connection (mstsc.exe) memory issues when sound plays
This issue occurs because the Remote Desktop ActiveX control, Mstscax.dll, allocates memory for the sound to be played on the client computer, but the memory is never released. This out-of-memory condition causes the remote desktop connection to disconnect and restart itself.
To work around this memory leak issue when sound plays during the RDP connection on Windows, reconnect to the remote computer.
Bear in mind that because this is a new session, you must re-enter your RDP credentials.
Bonus information
Remote Desktop Connection is built into Windows but also exists as a Universal app in the Microsoft Store. If you want to access and control a computer from a non-Windows device, Microsoft’s RDC app is available for Mac, iOS, and Android.