C++/CLI DLL crashes on load after port to VS2015 / .NET 4.6

后端 未结 2 1688
广开言路
广开言路 2021-01-23 01:19

Honestly, this is may be a dupe of VS2015: Migrated project compiles, but won't run ("Debug Assertion Failed!") but that has no answer and I have more details.

2条回答
  •  余生分开走
    2021-01-23 02:01

    Is it possible that you are mixing up debug and release code? ucrtbased.dll is the debug universal CRT DLL. Windows maintains different heaps for debug versus release and mixing them can definitely cause errors like these. The different C runtime DLL's (e.g., VS2010, 2012, 2015) also maintain different heaps. Allocating memory on one heap and deallocating on another will cause these types of errors too.

    See http://www.qtcentre.org/threads/29475-HEAP-VariousTests-exe-Invalid-Address-specified-to-RtlValidateHeap for example.

提交回复
热议问题