Debug Assertion Failed

First the problem, then I'll attempt to post all of the info I think may be pertinent.  I get the following message when I try to register a dll on a machine other than the one I built it on

Debug Assertion Failed

Program: C:\B7\DV7333\bin32\REGSVR32.EX
File: olelink.cp
Line: 29

When developing, it builds fine and I am able to register it on the development machine

This is an MFC dll which implements the class wizard generated: DllGetClassObject, DllCanUnloadNow, and DllRegisterServer functions

I have used depends.exe on the target machine and all it's dependcies are accounted for

I have another VB created dll that provides a few classes that are used in this problem dll.  I access those via the following statement: #import "vbdll.dll" no_namespac
This stuff I dont really understand, but it appears to work.  I do receive the following warning message during the mfc dll build

    d:\program files\microsoft visual studio\vc98\include\comip.h(31) : warning C4042: '_IID' : has bad storage clas
            d:\program files\microsoft visual studio\vc98\include\comip.h(57) : see reference to class template instantiation '_com_IIID<struct _vbdllObject,&struct __s_GUID  _GUID_22b44757_efef_4c0b_be51_32138fe6eb04>' being compile
            S:\VC++\dllProject\dllCode.cpp(328) : see reference to class template instantiation '_com_ptr_t<class _com_IIID<struct __vbdllObject,&struct __s_GUID  _GUID_22b44757_efef_4c0b_be51_32138fe6eb04>>' being compile

The VB dll IS registered and IS in the path on the target machine

Thanks in advance for any insight into this problem
Jeremy
0
5/1/2004 4:06:03 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
1106 Views

Similar Articles

[PageSpeed] 51

"JR" <jeremy.ruth@comcast.net> wrote in message
news:1E5358AD-EF7E-4DAB-8DF4-19BE6DBEFBF4@microsoft.com...
> First the problem, then I'll attempt to post all of the info I think may
be pertinent.  I get the following message when I try to register a dll on a
machine other than the one I built it on:
>
> Debug Assertion Failed!
>
> Program: C:\B7\DV7333\bin32\REGSVR32.EXE
> File: olelink.cpp
> Line: 291
>
> When developing, it builds fine and I am able to register it on the
development machine.
>
> This is an MFC dll which implements the class wizard generated:
DllGetClassObject, DllCanUnloadNow, and DllRegisterServer functions.
>
> I have used depends.exe on the target machine and all it's dependcies are
accounted for.
>
> I have another VB created dll that provides a few classes that are used in
this problem dll.  I access those via the following statement: #import
"vbdll.dll" no_namespace
> This stuff I dont really understand, but it appears to work.  I do receive
the following warning message during the mfc dll build:
>
>     d:\program files\microsoft visual studio\vc98\include\comip.h(31) :
warning C4042: '_IID' : has bad storage class
>             d:\program files\microsoft visual
studio\vc98\include\comip.h(57) : see reference to class template
instantiation '_com_IIID<struct _vbdllObject,&struct __s_GUID
_GUID_22b44757_efef_4c0b_be51_32138fe6eb04>' being compiled
>             S:\VC++\dllProject\dllCode.cpp(328) : see reference to class
template instantiation '_com_ptr_t<class _com_IIID<struct
__vbdllObject,&struct __s_GUID
_GUID_22b44757_efef_4c0b_be51_32138fe6eb04>>' being compiled
>
> The VB dll IS registered and IS in the path on the target machine.

Jeremy,

A good place to start would be to see what the offending line of code is in
olelink.cpp line 291.  You will see a line of code like this:

ASSERT(a != b);

You will see the message box that you are talking about ("Debug Assertion
Failed!") if the expression inside of the ASSERT macro evaluates to FALSE.


0
trevor8021 (184)
5/3/2004 9:31:27 PM
Trevor

Thanks for the reply.  It is bombing in the function:
BOOL COleLinkingDoc::RegisterIfServerAttached(LPCTSTR lpszPathName, BOOL bMessage

	ASSERT_VALID(this)
	ASSERT(lpszPathName == NULL || AfxIsValidString(lpszPathName))

	CDocTemplate* pTemplate = GetDocTemplate()
	ASSERT_VALID(pTemplate);                                  // this where the assertion fail
My questions now:
why is it calling this function
why does the GetDocTemplate() function fail

I just can't understand why it is failing on this other machine. 

Jeremy
0
anonymous (74719)
5/3/2004 11:41:05 PM
"JR" <anonymous@discussions.microsoft.com> wrote in message
news:33AA095E-123C-48A7-A41F-E15B701132EB@microsoft.com...
> Trevor,
>
> Thanks for the reply.  It is bombing in the function:
> BOOL COleLinkingDoc::RegisterIfServerAttached(LPCTSTR lpszPathName, BOOL
bMessage)
> {
> ASSERT_VALID(this);
> ASSERT(lpszPathName == NULL || AfxIsValidString(lpszPathName));
>
> CDocTemplate* pTemplate = GetDocTemplate();
> ASSERT_VALID(pTemplate);                                  // this where
the assertion fails
> My questions now:
> why is it calling this function?
> why does the GetDocTemplate() function fail?
>
> I just can't understand why it is failing on this other machine.
>
> Jeremy

Jeremy,

    The assertion is fired because GetDocTemplate is returning 0.  The MSDN
docs say this function will return NULL "if the document is not managed by a
document template".  I guess you need to try to figure out why the document
is not managed as a document template.  Here is a link to an archived usenet
post by Google.  The original poster had asked a question similar to yours.
It may be worth your time to read it and find other archived posts like it.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=ecUm5aCP%24GA.237%40cppssbbsa04&rnum=10&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3DGetDocTemplate%2BNULL

Watch out for linebreaks!


0
trevor8021 (184)
5/4/2004 12:41:00 PM
Reply:

Similar Artilces:

3.0 Upgrade Failed
We have recently been trying to upgrade our 1.2 installation to 3.0, but have ran into some stumbling blocks along the way. After resolving the "Invalid SQL replication data" error on the advisor we were finally able to continue on with the installation but now continuously get the below error causing a failed installation. The enviornment is as such: SQL 2000 SP4 on 2003 std CRM 1.2 on seperate 2003 std Active Directory operating in 2003 functional Any thoughts or suggestions are welcome. Thanks! Error| Install exception.System.Exception: Action Microsoft.Crm.Setup.Server....

Update Fails to Load
I have tried several times to install KB979683 and keep getting failure message. All other updates load fine. Also, have Stopzilla and McAfee Virus Scan but can't seem to get rid of a malicious file that won't let me go to sites when I look up things on google, bing....always get sent to advertisement websites. Any ideas or helpful suggestions!! Thanks Always state your full Windows version (e.g., WinXP SP3; WinXP 64-bit SP2; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) when posting in a forum or newsgroup. Please do so in your next reply. When does your McAfee su...

Dialog and asserts
Hi, I have a dialog based application and I want to open another dialog. I have a function int CMyDialog::Execute { // CMyDialog::Execute int ret_code; CNewDialog m_NewDialog(this); ret_code = m_NewDialog.DoModal(); return ret_code; } // CMyDialog::Execute that opens this dialog but this fail :( I got at assert on this line BOOL CWnd::Attach(HWND hWndNew) { ---> ASSERT(m_hWnd == NULL); // only attach once, detach on I have realized my application with the Wizard so I am not very expert about this stuff. Can someone tell me what's happening ? Stefano Malavasi __...

The Operation on the | Object failed
I have an access database linked to a SQL server 2005 back end database and my users randomly get the above message on occasions. It appears to usually happen when running VBA code. Can anybody help? ...

Debug Assertion Faild
Debug Assertion Fail Program: C:..... File: winocc.cp Line: 22 The exception Breakpoin A breakpoint has been reache (0x80000003) occurred in the application at location 0x5f4369c This program is to scan a file and look for a matching string. Could this error be caused by code not exiting a "break;" properly? I'm not sure how to explore resolving this. The information listed in the Debug is The thread 0x3DD8 has exited with code 0 (0x0) The thread 0x3EA8 has exited with code -2147483645 (0x80000003) The program 'C:\Documents and Settings\Owner\My Documents\Dads\Programmi...

How to reinstall failed updates in Windows 7
How do i try to reinstall failed updates ? Seems windows update doesn't support that. I have Windows 7. Suggest you post this to the Windows 7 forum instead of the * Windows Update * newsgroup: http://social.answers.microsoft.com/Forums/en-US/w7install/threads "JamesW" wrote: > How do i try to reinstall failed updates ? > > Seems windows update doesn't support that. > > I have Windows 7. Ditto - another Win7 user here - when I follow recommendation to troubleshoot on the error code "WindowsUpdate_8020000E" appears as non...

When the VBA Project is locked the Save As Method fails in Excel
I cannot find a resolution. I already have the VB Code secure (the VBA Project is locked). When the Project is locked the Save As Method fails. If the VBA Project is not locked, the Save As Method works successfully. I cannot seem to find anything that addresses that situation. Do I need to get a digital signature? Do you think that will fix the problem? ...

OWA Fails to Load
Two OWA environments are failing with the same behavior. 1) The first environment is Windows NT 4 SP6a running Exchange 5.5 SP4. OWA is hosted on seperate NT box running IIS. IIS box must be restarted to temporarilly solve problem. Works for a day or so then main OWA page fails to talk to Exchange box after login and simply hangs with no erors, or gives an ASP error, but nothing in eventlogs. Cannot restart WWW service on IIS box. 2) Second environment is Windows 2000 SP4 running Exchange 5.5 SP4 and IIS on the same box. Same behavior as first environment. OWA hangs after login and does...

DEBUG
Curious, new problem has started. Evey once in a whle a new folder appears on my desktop labeled "debug"..The folder is empty and I do not know how it is formed or why..Does someone know the cause of this and a remedy so it does not appear again Thanks Running Xp professtional heshie wrote: > Curious, new problem has started. Evey once in a whle a new folder appears on > my desktop labeled "debug"..The folder is empty and I do not know how it is > formed or why..Does someone know the cause of this and a remedy so it does > not appear again &g...

An application crashes only under debugging
Hi, I'm using VC++ 6.0. I have a Win32 Application (I will call it "EXE") which is linked with a Win32 DLL and I don't have the source files of the DLL; When I execute the EXE by double-clicking on the icon reprsenting it , there are no problems; On the contrary, if I try to debug the EXE the program crashes: in fact, the debugger shows an "Access Violation" error message and informs that an istruction of the DLL attempts to read a memory location which cannot be read. Does someone know a possible cause of this problem? Thanks. M If the DLL is an MFC DLL (it is...

Portfolio Manger Fails
I see where others have a similar problem, but have read no solution. After "upgrading" from Money2004 to Money2005, the portfolio manager pages shows a blank screen. No investment information whatsoever. Any ideas on a work around.... In microsoft.public.money, brawn wrote: >I see where others have a similar problem, but have read no solution. After >"upgrading" from Money2004 to Money2005, the portfolio manager pages shows a >blank screen. No investment information whatsoever. Any ideas on a work >around.... Does Help->About show version 14.0...

Authentication failed because Entourage doesn't support any of the available authentication methods. 04-13-10
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop Out of a sudden, i can't send out email and received the above error message. <br><br>For incoming email, i've no problem receiving. <br><br>I've not done any changes in my email account setting. <br><br>Anyone encountered the same problem? Please assist and advice. <br><br>Thanks ...

Weird: CRichEditCtrl scrollbars work in debug build but not in release build
Hi, I have an App Wizard project (VS 6.0), non doc-view architecture. My view class is: class CRichTextView : public CRichEditCtrl. In MainFrm.cpp I have a member variable of: CRichTextView m_wndView;. I create the view as follows: if (!m_wndView.Create(WS_CHILD | WS_VISIBLE | ES_AUTOVSCROLL | ES_MULTILINE | WS_VSCROLL, CRect(0,0,0,0), this, AFX_IDW_PANE_FIRST)) { TRACE0("Failed to create view window\n"); return -1; } It works "just peachy" in the debug build. But, when I make...

Installation of KB982311 Failed
Running current Windows XP Pro SP3 system with Office 2002. Attempted install of latest June 2nd Tuesday updates and KB982311 failed to install. I have the same problem when the system tries to autoupdate KB982311. The error code is 0x80070643 - and the system keeps trying to install this particular update. I am running Windows XP SP3. All other updates from june 11th 2010 installed without problems - only this one failed. I don't have a genuine Microsoft Office 2003 installation - only the free Office Viewers from Microsoft - maye that's the reason, though it has ...

Debug in Release mode?
Old wine in old bottle.. being served by a new bartender :o) How do I do this? pointer would be much appreciated. >Old wine in old bottle.. being served by a new bartender :o) > >How do I do this? The subject or the content? To debug a release build see "How to: Debug a Release Build" in your VC++ help. Dave In addition to what Dave suggested you might want to just do a find on this newsgroup using those keywords. There have been several discussions on that topic in the last few days that should pop up a bunch of links. If you can't find them let me know and ...

Very strange debugging problem
I have a windows console program that interfaces with a library that interfaces with a hardware device. I run the same unmodified program with the same input and get different results on different trials. My program is the same, the test data is the same, yet different runs produce different results. There are only two sorts of things that I can think of that could cause this: (1) The state of the hardware device changes between runs. (2) Some really weird memory error that causes my program to run correctly 75% of this time and fail other times. Does anyone have any ideas on how I ca...

Outlook Operation Failed
When I click on the "send - receive" button, a window pops up saying "Operation Failed". Does my computer have some kind of infection? Hi Jennifer, please create a new profile! And please dont post twice! -- Gestern gings noch, ICH habe nichts gemacht! ;-) Bravestar@Datenschutzministerium.de "Jennifer" <jenncady@ezsg.com> schrieb im Newsbeitrag news:06e701c47528$a0a0c950$3a01280a@phx.gbl... > When I click on the "send - receive" button, a window > pops up saying "Operation Failed". Does my computer have > some kind of inf...

Debugging
Hi, I have an access violation in my program when closing, apart from that things are working in debug mode. This is difficult to deal due to a lack of information. One message I get is as below, is there anyway to turn this into something meaningful? Heap block at 009B1C68 modified at 009B2370 past requested size of 700 The stack trace shows ntdll! 77f75a58() What can I use to track problems like this down? I must be accessing restricted memory during the deallocation of objects or misusing the mfc, I do not know, though there does not appear to be any memory leaks. I did have memor...

Operation Failed Error Message when Trying to Attach Encrypted File to Message
Outlook 2003 SP1 running on Win XP for Tablet PC. Tried with Word as the email editor and without, same result. Two FAT partitions, no encryption and one NTSF partition with encryption turned on (it contains all my documents). When I create a new email or reply to an email and try to attach a file to send as an attachment, if the file is encrypted, I receive the error message "The Operation Failed." If I unencrypt the file, attaching it works fine. Also if I right-click the encrypted file from My Computer and chose Send To - Mail recipient from the menu, it works fine too....

remote debugging
Hi, I am using VC++ 6.0's remote debugger. It keeps complaining that the remote machine could not be found. I defined the remote machine as \\sty-401 or R: (a map drive that is equivalent to \\sty-401) in menu->Build->Debugger remote connection->Settings->Target machine name. I can access the machine by typing either \\stry-401 or R: in the windows explorer. That means the access has no problem. Can someone help me out? Thanks. Tony "JD" <jdt_young@yahoo.com> wrote in message news:etml8qy7GHA.3604@TK2MSFTNGP02.phx.gbl... > Hi, > > I am ...

Sort fail
Hello i am doing a simple sort.. The spreadsheet is just 20 x 350 I select select a whole worksheet and .. data, sort, header row select my column and click OK. The spreadsheet sorts but the column i sort is not sorted. It onl sorts the first number ( there are 6 and 7 digit numbers ) so the sor looks like this.. 12 15 17 2 21 23 3 41 44 45 and so on I made sure the column i sorted was numbers ( it was general ) I cut and pasted this into a new sheet and it still did not work. I think it might be releated to the format of the cells but i a unsure. any help would be great -- Message ...

XmlSerializer produces different results in debug and release buil
A few weeks ago, I upgraded an XML server of ours to .NET 2.0. All went fine. Then last week, I decided to remove all obsolete calls from the app and sign each project in the solution in the .NET 2 way so that the app compiled with no warnings. This built fine but we noticed that server was deserializing one of our XML messages incorrectly. I confirmed via source control that neither the schemas themselves nor the classes representing the messages had been altered but the problem continued. After some investigation, I found I could I could actively switch this bug on and off in debug mod...

Failed e.mail letter
Although all my other e.mails arrive at their destination ,there is th exception of one. This person does not receive my mail even though sh gets everyone elses . I have tried using the reply button back to he but that doesn't work either. Is there an answer to this and if so wha do I do. Many thanks -- milli Posted from - http://www.officehelp.i millie <millie.27hme2@NoSpamPleaze.com> wrote: > Although all my other e.mails arrive at their destination ,there is > the exception of one. This person does not receive my mail even > though she gets everyone elses . I have tr...

Debug
Hi, How can i debug a lib file that link to my project from my project in debug mode??? (i been told that i need to insert the file of the lib to my project and so.. how to do it???") Thanks. To do it easily you have to have the source for the lib adn have the lib compiled in debug mode as well. Adding the project for the lib to your solution makes this pretty easy to do. Tom "Dave" <dbg@012.net.il> wrote in message news:eR1dbIBoEHA.3684@TK2MSFTNGP10.phx.gbl... > Hi, > How can i debug a lib file that link to my project from my project in debug > mode??? &...

Slightly OT: Debugging another process while my MFC app is running...
I have a stand alone application (which renders a 3D scene) that is controlled by my MFC application via XML over TCP/IP. Because the MFC application spawns the rendering application via CreateProcess, I can't debug the initialization of my rendering application in this scenario because I have to go through the IDE's debug|processes menu and choose the rendering application and select it. What I was wondering is: Is there a way to denote a process to debug which hasn't started yet? Ergo, if I set a breakpoint in my rendering application in the initialization code (for exampl...