Solved

Debug Assertion Failed.

Posted on 1997-09-06
5
578 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
5 Comments
 
LVL 2

Expert Comment

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

Author Comment

by:Mark Ebden
Comment Utility
Tooltip.cpp is not something I wrote.

0
 
LVL 5

Accepted Solution

by:
dirtdart earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now