<span style="font-family: "Tahoma","sans-serif"; font-size: 10pt">From:<span style="font-family: "Tahoma","sans-serif"; font-size: 10pt"> R.
Sent: Monday, March 28, 2011 7:54 PM
To: Zbynek Zahradnik
Subject: Data.NET Error
..... [a customer] ..... is using Data.NET and [...] says:
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">Occasionally, my application gets stuck on exit. This seems to happen when there is no actual OPC server that client can connect to. Any attempts to communicate with the server return error as they should, but the program hangs inside __crtExitProcess()/ExitProcess()
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">The dump file is attached. Do you know of anything that may cause such behavior?
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">We do use apartment model for COM:
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">we call CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">And have _ATL_APARTMENT_THREADED flag defined.
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">Unfortunately I cannot reproduce the problem with the small app.
<span style="font-family: "Microsoft Sans Serif","sans-serif"; color: black; font-size: 8.5pt">
The dump file had an error message number 0x80000004: A trace trap or other single-instruction mechanism signaled that one instruction has been executed. I haven’t been able to find any helpful information on this error. Is he just missing the CoUnitialize?
Any ideas on this error would be great.
Thanks,
<span style="font-family: "Calibri","sans-serif"; color: black; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">R.