-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Handle leak when having LNM open but no simulator running #891
Comments
Thank you for the detailed report! Very good. I can reproduce this with increasing number of handles in the Task Manager. Unfortunately I do not see anything in the Resource Monitor which could also tell me what handles are left. I have to dig into the SimConnect code and check if something is not closed there. |
Great to hear that it is not only on my side. I just tried to find out which kind of handle is leaking and it seems like its an I only know about htrace to track the creation call stack of every handle, but I don't have the Driver SDK installed on my machine to check for that by myself right now. I would probably need a lot of time to get into LNM source code, so I can't give you any more detailed hint right now. |
This is a SimConnect issue. Handles get lost as soon as I call No other parts of LNM cause this. No handles leaked as soon as I comment in No idea how to fix this. Using latest MSFS SimConnect requires a 64 bit build. 32 bit build is kept to have FSX support. |
…to mitigate handler leak. Needs more research. #891
No idea how to work around this. Maybe unload and reload the whole DLL. |
Unloading the DLL won't fix the issue. Handles are bound to the process in Windows afaik - so a process restart is the only option to unload the handles. I just thought about it as well and got four ideas for a work-around (and do be honest, all of them are quite ugly in my opinion):
Those are the options which just came to my mind. Don't know if you really want to implement any of those though. |
Thank you for the hints. Very helpful.
Overhead. Another program to maintain and build.
Sounds tempting but also dangerous. You never know what you're closing there.
Not really but I can stop autoconnect (not disable the option, just stop) after half an hour or so and show a warning dialog.
Overhead and support (need to help people installing). I know FSUIPC from FSX but I'd rather not use this path. The hooks and the warning seem feasible. Again thanks for the help. I'll see what can be done. Alex |
…to mitigate handler leak. Needs more research. #891 # Conflicts: # src/common/constants.h
…nnect to avoid loss of internal SimConnect handles. After 30 minutes, an attempt is made to connect every 30 seconds, and after one hour, every minute. Workaround for albar965/littlenavmap#891 which is most likely a SimConnect issue.
…nnect to avoid loss of internal SimConnect handles. After 30 minutes, an attempt is made to connect every 30 seconds, and after one hour, every minute. Workaround for #891 which is most likely a SimConnect issue.
…nnect to avoid loss of internal SimConnect handles. After 30 minutes, an attempt is made to connect every 30 seconds, and after one hour, every minute. Workaround for albar965/littlenavmap#891 which is most likely a SimConnect issue. # Conflicts: # CHANGELOG.txt
…nnect to avoid loss of internal SimConnect handles. After 30 minutes, an attempt is made to connect every 30 seconds, and after one hour, every minute. Workaround for #891 which is most likely a SimConnect issue.
Postponing since workaround 2629de452118862dc9f2881fc84abf6652676563 mitigates the issue. |
Hi,
first of all, thank you for this lovely tool - I really like it a lot. But: I've noticed that LNM has a handle leak.
Environment:
Windows 10 64 bit
P3D
+MSFS
+X-Plane
Steps to reproduce:
Connect automatically
option checkedDetails
tab and include the ColumnHandles
littlenavmap.exe
entry and look at theHandles
count - it will increase about every ~5 seconds. The number will continuously grow.Observations:
Connect automatically
option is unchecked, the handle count won't increase anymore.MSFS
while keeping LNM open, the handle increase will stop as soon as a connection to the sim is established.I hope you can reproduce the issue with the steps mentioned above.
The text was updated successfully, but these errors were encountered: