Why do I get "Access violation reading location 0xFFFFFFFFFFFFFFFF" error while running .NET application which uses .DLL generated by MATLAB Coder R2024a?
Show older comments
I am generating a .DLL from my MATLAB Code using MATLAB Coder R2024a. When I call the generated entry-point function in my .NET application and run it, my application crashes with the following error message:
Access violation reading location 0xFFFFFFFFFFFFFFFF
It seems that some pointers defined in my .NET structures are likely being freed or becoming invalid before the C code finishes using them.
However, I'm not sure how to properly avoid this. My .NET structures are designed after the corresponding C structures found in the generated <dll_name>_types.h header file.
What is the root cause of this error, and how do I fix it?
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Microsoft .NET in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!