Visual Studio 2010 kills (there is no other word) data in one of the arguments of the function in the unsafe block. What could cause this error? The following message shows
Also In VS 2015 Community Edition
go to Debug->Options or Tools->Options
and check Debugging->General->Suppress JIT optimization on module load (Managed only)