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

Ask A Question

Stats

  • Questions 489k
  • Answers 489k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Nope, anonymous functions are used all over the place in… May 16, 2026 at 8:56 am
  • Editorial Team
    Editorial Team added an answer Currently, from the command line, you can only lower the… May 16, 2026 at 8:56 am
  • Editorial Team
    Editorial Team added an answer In addition to having the appropriate CSS class in your… May 16, 2026 at 8:56 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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 Studio 2008, Developing an OpenGL window. I've created several classes for
I am wondering about the delete[] operator in C++. (I am using Visual Studio
The memory leak is not happening on every machine, but reliably on a couple
I'm having problems with a slow memory leak in my mixed mode C++/CLR .NET
After many years of working on a general-purpose C++ library using the Microsoft MSVC
First of all, using delete for anything allocated with new[] is undefined behaviour according
Lets say I open some application or process. Did some work with that. Now

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.