Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 989263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:45:52+00:00 2026-05-16T05:45:52+00:00

I am using Visual Leak Detector to detect memory leaks in my program. When

  • 0

I am using Visual Leak Detector to detect memory leaks in my program. When the program has finished running, I get an assertion triggered by the following code in utility.cpp. When Visual Leak Detector’s header is excluded from the program, the program runs and exits without incident.

// Get the *real* address of the import. If we find this address in the IAT,
// then we've found that the module does import the named import.
import = GetProcAddress(exportmodule, importname);
assert(import != NULL); // Perhaps the named export module does not actually export the named import?

I am not sure why the assert is being triggered. Does anybody have an idea in what scenarios the assertion can be triggered?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:45:53+00:00Added an answer on May 16, 2026 at 5:45 am

    I am using ogre3d + vld and I get same issue!
    I debugged the error code with GetLastError():
    ERROR_PROC_NOT_FOUND, error 127: The specified procedure could not be found.

    The good thing is, that it works(tested with “new char[20]”) if you comment out that assertation and recompile,
    but if you forget to call “delete Ogre::Root::getSingletonPtr();” it wont be detected 🙁

    Edit: To report assertations to the debug console you can use this:

            // Get the *real* address of the import.
        import = GetProcAddress(exportmodule, importname);
    
        if(import == NULL){
            DWORD err=GetLastError(); 
            WCHAR buff[2048];
            wcsncpy_s(buff, 2048, L"\n============================================\nImport name: ", _TRUNCATE);
            int i=wcslen(buff);
            int n=0;
            //cast to unicode
            while(importname[n]){
                buff[i++]=importname[n++];
            }
            buff[i]=0;
            wcsncat_s(buff, 2048, L"\nExport module: ", _TRUNCATE);
            i=wcslen(buff);
            GetModuleFileName(exportmodule,&buff[i],2048-i);
            wcsncat_s(buff, 2048, L"\nError code: ", _TRUNCATE);
            i=wcslen(buff);
            _itow_s(err,&buff[i],2048-i,10);
            wcsncat_s(buff, 2048, L"\n============================================\n", _TRUNCATE);
            report(buff);
        }
        //assert(import != NULL); // Perhaps the named export module does not actually export the named import?
    

    Result will be:

    ============================================
    Import name: CoGetMalloc
    Export module: C:\data\projects\Avenon\trunk\source\..\build\Avenon_d.exe
    Error code: 127
    ============================================
    
    ============================================
    Import name: CoTaskMemAlloc
    Export module: C:\data\projects\Avenon\trunk\source\..\build\Avenon_d.exe
    Error code: 127
    ============================================
    
    ============================================
    Import name: CoTaskMemRealloc
    Export module: C:\data\projects\Avenon\trunk\source\..\build\Avenon_d.exe
    Error code: 127
    ============================================
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found a very interesting memory leak detector by using Visual C++. http://www.codeproject.com/KB/applications/visualleakdetector.aspx I
I'm using Visual CRT's memory leak detection routines from <crtdbg.h> ; when I call
I'm using Visual C++ 2003 to debug a program remotely via TCP/IP. I had
Using Visual Studio 2008 Team Edition, is it possible to assign a shortcut key
Using Visual Studio 2008 / C# / VS Unit Testing. I have a very
When using Visual Studio (though ideally this can apply to the generic case) and
I'm looking into using Visual Studio 2008's built in unit test projects instead of
I'm using Visual Studio Team System 2008 at work to do web development. I've
My company is using Visual SourceSafe (VSS) and Visual Studio 2005 (soon 2008). They
Have just started using Visual Studio Professional's built-in unit testing features, which as I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.