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 6904267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:02:13+00:00 2026-05-27T08:02:13+00:00

I have a class residing inside of a dll and an exe using that

  • 0

I have a class residing inside of a dll and an exe using that dll. Exe simply creates the class within the dll and call its methods. Everything works fine when compiled in release mode. But if I compile everything (including the OpenCV library my class uses) in debug mode with MDd flag then I get:

Debug Assertion Failed! _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

All of the binaries involved are using the exact same version of the runtime dlls and everything is compiled on the same computer with VS 2008. As far as I understand (based on my debuggings) the problem is the following:

I am creating an instance of my class using the “new” operator in the exe (under main) then as soon as the constructor of my class does something requiring a memory allocation, memory location of the class itself is overwritten as if both the dll and exe are using the same memory space but different “next available position to allocate” offsets. Therefore the dll does not see that there was already an allocation done inside of the exe hence overwriting the memory area my class resides. Clearly this causes a memory problem.

Any idea why can this happen? I tried my best to explain the situation but I can of course provide more info if required.

Thanks in advance.

  • 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-27T08:02:14+00:00Added an answer on May 27, 2026 at 8:02 am

    I found out that the problem was 2 public member variables that were missing from the header file of the class by my mistake. When I added them, the problem is solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have class method that returns a list of employees that I can iterate
I have class with a member function that takes a default argument. struct Class
I have a multi module Spring project that I set up using Maven: my-root
I have a weird problem using the Java Box class. I am using JDK
I have a UIImageView that I dynamically load with an Image using myTableViewCell.myImageView.image =
We have data that's updated nightly in a database residing in the same instance
I have an ImageManipulator class that performs some cropping, resizing and rotating of camera
I have a div container with class embed and unique id. Inside the container
I have the following class definition, written in C++, residing in it's own header
I have a search component that contains a text and span inside a div

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.