Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session Leaks on Ctrl+C #30

Closed
MokoSan opened this issue Dec 3, 2021 · 1 comment
Closed

Session Leaks on Ctrl+C #30

MokoSan opened this issue Dec 3, 2021 · 1 comment

Comments

@MokoSan
Copy link
Contributor

MokoSan commented Dec 3, 2021

There are instances where if the user clicks Ctrl+C to close realmon, the session isn't getting disposed.

Repro Steps

  1. Run realmon normally and note the session name by putting a break point here.
  2. Ctrl+C to close the session.
  3. Open up a command line prompt / powershell in admin mode.
  4. logman query -ets to list all the sessions on the machine. Here is where I found the session still exists even after exiting the process.

Eventually, this will result in the following exception:
Unhandled exception. System.Runtime.InteropServices.COMException (0x800705AA): Insufficient system resources exist to complete the requested service. (0x800705AA).

Solution

Subscribe to the Console.CancelKeyPress event and explicitly dispose the session.

@Maoni0
Copy link
Owner

Maoni0 commented Dec 3, 2021

fixed by #31

@Maoni0 Maoni0 closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants