Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Without code it's difficult to say what is the problem. But when you say, the crash happens (sometimes) during the application is closing, you probably can't provide the right piece of code easily.</p> <p>The reasons could be, some code of the program uses some data, which is already destroyed. If the internal implementation of your DLL is C++ e.g. a destructor could access data already deleted or created statically before the instance of the class. This would be mean, the DLL causes the crash internally. For that explicite calling of some kind of close API function could be the only help. </p> <p>Another cause is possibly, you instantiate the DLL in a C# class, which is destroyed in garbage collection. As the instances are destroyed "uncontrolled" they can call the already unloaded DLL API. A flag signaling the validity of DLL API would help for that cause.</p> <p>So my suggestion are:</p> <ul> <li><p>Check, If your DLL provides an API function for closing or cleaning up or unloading - call it and don't call any other API-function from DLL after that. Use e.g. a global flag tor that, and access DLL only if the flag allows it. (poor man's approach, better - ecapsulate the DLL in a C# class)</p></li> <li><p>Try to load and unload DLL in any test-function of your C# for making the error easier reproducible. </p></li> <li><p>Make sure, when your C# begins the closing process not to call any DLL function any more (except the once calling clean/close/unload)</p></li> </ul> <p>Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload