June 8, 200619 yr I created my application as a dll in the modules dir from the MSFS panels SDK and make calls to "lookup_var" which work fine until I click on "Reset Flight" from the menu. I then get an unhandled exception "Access Violation in PANELS.DLL" or "Sim1.DLL".Anyone else that has worked with the SDK run into this type of problem? What should I be looking for in order to prevent calls to "lookup_var" while the sim is reseting or loading?Thanks for any assistance.
August 7, 200619 yr I'm guessing that the way you have programmed it, your pointer is becoming invalid on reset of the panel.So, you have to program defensively and make sure you have a valid pointer before you use it in the function.
August 7, 200619 yr >So, you have to program defensively and make sure you have a>valid pointer before you use it in the function.That was the first thing I tried but it didn't help since I would still get random crashes when the pointer would become invalid right after checking for it. The reason for this is because I'm calling the function from a multithreading DLL. In a standard DLL, this would never happen while the pointer is invalid (during reset, load, etc.) since the DLL is not being executed.Solution was to trap the exception and handle it with try{...}catch{...}
Create an account or sign in to comment