Hello,
I'm encountering the following unhandled exception in nddsdotnet40.dll when my application shuts down:
System.AccessViolationException was unhandled
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=nddsdotnet40
StackTrace:
at DDS.WaitSet.!WaitSet()
at DDS.WaitSet.Dispose(Boolean )
at DDS.WaitSet.Finalize()
InnerException:
I've traced through all my Dispose() methods and it doesn't seem that anything is directly causing this exception.
I dispose of my domain participant by calling:
participant.delete_contained_entities(); DomainParticipantFactory.get_instance().delete_participant(ref participant);
The code executes with no problems, my window closes, and then I see the exception in my Visual Studio debugger.
I don't use WaitSets in my application, so I wonder if it is something internal that is not being disposed properly?
Thanks in advance for your help.
Here is some debugging information that may be useful.
Hello jsacks,
The message you are getting is usually related with trying to access to a deleted object. Are you using threads that make the application try to delete the participant several times?
Also, are you using Request-Reply? I ask this because your stack trace shows a call to WaitSet.dispose and you are not using any. Request-Reply internally uses waitsets, so this would be an explanation of getting this message.
Regards,
Javier