This project has moved and is read-only. For the latest updates, please go here.

Assertion failed: import != null

Dec 3, 2010 at 1:32 PM
Edited Dec 3, 2010 at 1:59 PM

Hi,

Whenever I add VLD to a simple Win32 project (empty project with one .cpp containing generic "basic win32 tutorial"-type code) I get failed assertions from the utility.cpp file. This is both in VS2008 Express and VS2010 Premium.

The following link contains code to get some information about what happens: http://efreedom.com/Question/1-3170377/Visual-Leak-Detector-Crash

To cut a long story short: I added CoTaskMemAlloc(1) to the beginning of my code and VLD stops giving that error. But that's really weird and I don't like that.

But still, I'm totally stumped by it and cannot figure out what's the cause. Perhaps some knowledgeable person can enlighten me (and others)?

 

Edit: I suppose I should expand a little more. After I modified the assertions to show the name of the modules I saw CoTaskMemAlloc (and others), which I looked up and happen to reside in the ole32 libraries. I suppose my code doesn't use ole32.lib and will not be linked. My usage of CoTaskMemAlloc is there to force the linking of ole32.lib and I think this pleases VLD. Perhaps that's twisted and a mortal sin, but forgive me, I'm still new in the C++ world.

Jun 6, 2011 at 11:51 PM

Fixed already in trunk