Solved

Debug Assertion Failed.

Posted on 1997-09-06
5
589 Views
Last Modified: 2013-12-03
Just as my Visual C++ program begins to run, an error box appears with the title "Microsoft Visual C++ Debug Library". The box states "/Debug assertion failed.  Program: c:\mmha\mmha3.exe.  File: tooltip.cpp.  Line: 383.  For information on how your program can cause an assertion failure... (etc.) ...application."  I am stuck!
I should mention that the program was compiled for use with shared DLLs on my computer (and works fine on MY computer), but this problem occurs when I run the program on someone else's computer.  I previously had to copy several DLL files onto the other person's computer, but it is still not working of course!
0
Comment
Question by:Mark Ebden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 2

Expert Comment

by:alexxx
ID: 1405993
Do you have the source to look it up (line 383)?
0
 

Author Comment

by:Mark Ebden
ID: 1405994
Tooltip.cpp is not something I wrote.

0
 
LVL 5

Accepted Solution

by:
dirtdart earned 50 total points
ID: 1405995
There are several problems that could have happened here.   First and most simple, when you copied the dll's to your other machine, did you properly register them?  If they are all properly registered, then it is probably a problem with accessing memory.  Your program has accessed a section of memory that has been marked as not usable by the client machine.  Along with this, you don't have the correct debug symbols for the dll in which the  error is occuring.  This is where teh debug assertation is failing.  The C computer is trying to find debug information that does not exist.  Once you get the debug symbols installed, you should be able to at least find where the error is occuring.
0
 
LVL 5

Expert Comment

by:y96andha
ID: 1405996
If you are running VC 5.0, this is the source code in question. You can choose to install source code for MFC when installing, and then you'll get the file referred to. Line 383 is marked with a =>.

            // add a "dead-area" tool for areas between toolbar buttons
            TOOLINFO ti; memset(&ti, 0, sizeof(TOOLINFO));
            ti.cbSize = sizeof(TOOLINFO);
            ti.uFlags = TTF_IDISHWND;
            ti.hwnd = m_hWnd;
            ti.uId = (UINT)m_hWnd;
            if (!pToolTip->SendMessage(TTM_GETTOOLINFO, 0, (LPARAM)&ti))
            {
                  ASSERT(ti.cbSize == sizeof(TOOLINFO));
                  ASSERT(ti.uFlags == TTF_IDISHWND);
                  ASSERT(ti.hwnd == m_hWnd);
                  ASSERT(ti.uId == (UINT)m_hWnd);
=> VERIFY(pToolTip->SendMessage(TTM_ADDTOOL, 0, (LPARAM)&ti));
            }

0
 

Author Comment

by:Mark Ebden
ID: 1405997
Thank you very much dirtdart!  I didn't register the DLLs.  But I don't have a clue how to register DLLs!  What should I do?

Thanks again.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question