assertions failing

As I have been developing my mfc dialog I have run into a 
strange problem.  I added a new button, check and text 
box and set up an event handler or two.  My project 
builds and compiles, but when I try to run it, two debug 
assertions fail and I can't understand how they could 
fail this time.

first one is in wincore.cpp line 331 and it is the 
assertion:

ASSERT(FromHandlePermanent(hWndNew)==NULL);

The second one is also inwincore.cpp line 4892
ASSERT(oldWndProc!=AfxGetAfxWndProc());

I can't understand how anything I could have done would 
break these assertions, but I also don't really know what 
the assertions are saying.  Any help would be 
tremendously appreciated.

thanks in advance;

Danny

p.s.  In an effort to avoid a million emails with a 
supposed patch(virus) from microsoft I am not putting my 
email in on the sender's email, but you can email me at 
danny@meshwerks.com




0
anonymous (74719)
10/15/2003 8:40:56 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
851 Views

Similar Articles

[PageSpeed] 54

I never did figure out what the problem was.  Fortunately 
I had saved a backup copy of the project folder just 
before the changes that crashed it.  As I am repeating 
the changes it doesn't seem to be causing any problems.  
If anyone knows what caused the problem, it would be good 
to know.
>-----Original Message-----
>As I have been developing my mfc dialog I have run into 
a 
>strange problem.  I added a new button, check and text 
>box and set up an event handler or two.  My project 
>builds and compiles, but when I try to run it, two debug 
>assertions fail and I can't understand how they could 
>fail this time.
>
>first one is in wincore.cpp line 331 and it is the 
>assertion:
>
>ASSERT(FromHandlePermanent(hWndNew)==NULL);
>
>The second one is also inwincore.cpp line 4892
>ASSERT(oldWndProc!=AfxGetAfxWndProc());
>
>I can't understand how anything I could have done would 
>break these assertions, but I also don't really know 
what 
>the assertions are saying.  Any help would be 
>tremendously appreciated.
>
>thanks in advance;
>
>Danny
>
>p.s.  In an effort to avoid a million emails with a 
>supposed patch(virus) from microsoft I am not putting my 
>email in on the sender's email, but you can email me at 
>danny@meshwerks.com
>
>
>
>
>.
>
0
anonymous (74719)
10/15/2003 10:08:20 PM
In the debugger you can trace back into your code to find 
out what function called what en route to the ASSERT 
statement. You do this via the "Context" combo box at top 
of the variables dialog.

Not sure if this is your prob, but in the early days I had 
this habit of deleting a control from a dialog ; I had 
previously added a variable for that control using class 
wizard, however the variable remained after deleting the 
control. The code in DoDataExchange then tried to do its 
stuff with the now-deleted control and that gave rise to 
an exception.

TTFN,
   Jon




>-----Original Message-----
>I never did figure out what the problem was.  Fortunately 
>I had saved a backup copy of the project folder just 
>before the changes that crashed it.  As I am repeating 
>the changes it doesn't seem to be causing any problems.  
>If anyone knows what caused the problem, it would be good 
>to know.
>>-----Original Message-----
>>As I have been developing my mfc dialog I have run into 
>a 
>>strange problem.  I added a new button, check and text 
>>box and set up an event handler or two.  My project 
>>builds and compiles, but when I try to run it, two debug 
>>assertions fail and I can't understand how they could 
>>fail this time.
>>
>>first one is in wincore.cpp line 331 and it is the 
>>assertion:
>>
>>ASSERT(FromHandlePermanent(hWndNew)==NULL);
>>
>>The second one is also inwincore.cpp line 4892
>>ASSERT(oldWndProc!=AfxGetAfxWndProc());
>>
>>I can't understand how anything I could have done would 
>>break these assertions, but I also don't really know 
>what 
>>the assertions are saying.  Any help would be 
>>tremendously appreciated.
>>
>>thanks in advance;
>>
>>Danny
>>
>>p.s.  In an effort to avoid a million emails with a 
>>supposed patch(virus) from microsoft I am not putting my 
>>email in on the sender's email, but you can email me at 
>>danny@meshwerks.com
>>
>>
>>
>>
>>.
>>
>.
>
0
anonymous (74719)
10/16/2003 12:17:50 PM
Reply:

Similar Artilces:

ASSERT
The WM_CREATE documentation says that: Return Value If an application processes this message, it should return zero to continue creation of the window. If the application returns 1, the window is destroyed and the CreateWindowEx or CreateWindow function returns a NULL handle ...but if I return 1, the window is not destroyed. What is wrong? The return value for a failed creation is -1, not 1, it's also what the documentation says, i believe that's the problem. "Ander" <a69032@gaviota.tecnun.es> escribi� en el mensaje news:059301c37059$5f1b49d0$a101280a@phx.gbl...

Advanced queue failed to deliver message #2
Hi, We have a problem receiving mail from someone. The messages come in to the server, and then it gets submitted to the Advanced Queue, and then I get the error message that the Advanced Queue failed to deliver message. Where is the message? Is there any way to retrieve it? How do I resolve the issue? Thanks! Jeff Hi Jeff, Do you have any anti-spam anti-virus products installed on your server, or ISA in your environment? This can sometimes be the cause, check the logs for these products. Regards -- Ben Hoffman MCP (Win2000 Pro/Server & Exchange 2003 Admin) http://www.Excha...

Subclassing CDialog fails to attach?
I am trying to make a CDialog appear to be (and act as such) part of a Child Form. I do not have control over the form, it is in a separate program which calls my DLL. //Here I have am being passed the HWND to the form. void CMyDLL::MakeNewPanel( HWND hwnd ) { CWnd * myCwnd = CWnd::FromHandle( hwnd ); pPanel = new CPanel( CPanel::IDD, myCwnd ); BOOL worked = pPanel->Create( CPanel::IDD, myCwnd ); pPanel->ShowWindow( SW_SHOW ); } // Panel (CDialog class) CPanel::CPanel( UINT id, CWnd* pParent ) : CDialog( id, pParent ) { // Do panel initial...

CString ASSERTions
I keep getting ASSERTions in the CString constructor, at the line ASSERT(stringSrc.GetData()->nRefs != 0); All I'm doing is returning a CString member variable from a class. When I do, I get the ASSERT. What am I doing wrong? -- Thanks, Brian Toothill CString only has one member variable, m_pchData, and it's protected. What does your function look like? "Brian Toothill" <.> wrote in message news:#iClwSmhDHA.2512@TK2MSFTNGP09.phx.gbl... > I keep getting ASSERTions in the CString constructor, at the line > > ASSERT(stringSrc.GetData()->nRefs !=...

Outlook 2003 Addin fails to be recognised when install for 23 bit Outlook 2010
Hi All: The subject pretty much sums up my problem. I have an Outlook Addin that fails to load in Outlook 2010. If someone could shed some light or point me to the correct resources I would appreciate it. Thanks in advance, Kevin Are you going to tell us what the add-in is, or what it does, or do we have to guess? "Kevin Derhak" <kderhak@gmail.com> wrote in message news:9f631e3a-bac6-4348-9281-2d2ed9f7c57d@g19g2000yqc.googlegroups.com... > Hi All: > > The subject pretty much sums up my problem. I have an Outlook Addin > that fails to load in Outlook 2010. ...

Reminders Fail on Messages Sorted to Favorite Folder -- HELP
I've got favorite folders and rules created so incoming and outgoing mail sorts itself into folders to help me keep track. However, I've found that any incoming message in one of these folders for which I set up an alert/reminder -- will fail to notify me with a reminder. Alerts set on messages in the inbox work no problem -- it's only the alert failure on messages sorted to a specific box that fail. Any help with this GREATLY appreciated! Paul <lindy_ngo_spam_corp@bellsouth.net> wrote: > I've got favorite folders and rules created so incoming and outgoing &...

assertion
Hello, When running my mfc application I get a popup window giving me an assert error. The program compiles\links ok. Debug Assertion Failed Program : C:\.... File : dlgdata.cpp Line: 44 Have done a bit of debugging. The problem occurs during OnInitDialog() BOOL CReceiverDlg::OnInitDialog() { CDialog::OnInitDialog(); <-- get error when run this function. // more code... } The assertion occurs when executing the If sentence below, BOOL CDialog::OnInitDialog() { //more code if (!UpdateData(FALSE)) { TRACE(traceAppMsg, 0, "Warning: UpdateData failed during dialog init.\n&...

CAsyncSocket::DoCallBack, the ASSERT
Hi, I have an MFC application using CAsyncSocket and I have a problem when I try to close the socket. CAsyncSocket occasionally asserts while accepting connections in CAsyncSocket::DoCallBack, the ASSERT just below the "Must be in the middle of an Accept call" comment. I wonder if anyone is familiar with this problem. Thank you, Adrian It sounds like something is calling the callback function prior to the call to Accept. When the socket is created, what events are you handling? -- Frank "Adrian Rapiteanu" <adrian_rapiteanu@hotmail.com> wrote in message news:eGy...

InitInstance gives a "Failed to create empty document" message
Hi, I have an MFC application that was working, and I'm not sure what I changed, but now in my InitInstance(), I get the above mentioned error message, in the line: if (!ProcessShellCommand(cmdInfo)) return FALSE; And my program bombs out with the return FALSE; line. After stepping into the functions, I find that it returns FALSE in the following code segment in ProcessShellCommand()" case CCommandLineInfo::FileNew: if (!AfxGetApp()->OnCmdMsg(ID_FILE_NEW, 0, NULL, NULL)) OnFileNew(); if (m_pMainWnd == NULL) bResult = FALSE; break; OnFileNe...

Excel
Thanks in advance for any assistance. On some machines, when a user opens an Excel file from SharePoint and checks out for edit and -does not- use the local drafts folder, you see a dialog with "File Conversion In Progress", then "Converter Failed To Save File" message, but the file is checked out to the user and will not open in the Excel. A kind-of workaround, is to use local drafts for the Check Out, but if the user tries to launch the file via the link in SharePoint, the "Converter Failed To Save File" message is displayed. Both machines have SP1 and the la...

Asserts in Vista
I've alredy know, that ASSERT macro in drivers doesn't cause BSOD in vista and further. But in user-mode applications assert is also doesn't cause the debug prompt dialog "Break, Retry, Ignore". For the drivers, I can use NT_ASSERT, but what can I do in user mode? How can I make it stop on assertion and wait until I connect debugger? ...

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....

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? ...

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 __...

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...

IsCRMSysAdmin : WhoAmI failed.
I have a newly installed V1.2. When I try to start the Deployment Snap-in It fails. The following is from the event viewer. Event Type: Error Event Source: DMSNAPIN Event Category: None Event ID: 0 Date: 3/3/2004 Time: 11:16:37 AM User: N/A Computer: CRM Description: dmLog: IsCRMSysAdmin : WhoAmI failed. Any Ideas ? Thanks in advance. Justin > I have a newly installed V1.2. > When I try to start the Deployment Snap-in It fails. > The following is from the event viewer. What happens, if you open a new MMC.EXE and manually add the Deployment Manager snap-in? -- Ich hoffe, ...

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...

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...

Office apps fail to launch after Security Update 2006-007
As reported on MacFixIt : > While most issues apparent after the update have reasonable workarounds, the > inability to launch specific applications -- particularly Microsoft Office v.X > and 2004 apps -- continues to be a sticking point for a surprisingly high > number of users. For more info see <http://www.macfixit.com/article.php?story=20061206235336119> Uninstalling Security Update 2006-007 is the only viable option in some cases. To remove do an Archive and Install of the OS. <http://www.entourage.mvps.org/glossary/archive_install.html> Before resorting to an...

"Reply to all" fails to send to members of GAL
I sent an email to a GAL using the GAL name. I received a reply from one of the members of the GAL but none of the other members received it. The sender of the reply received the following error from my exchange server. From: postmaster@poison.org [mailto:postmaster@poison.org] Sent: Thursday, July 15, 2004 4:37 PM To: Richard J. Geller Subject: Delivery Status Notification (Failure) Your message To: 'Toby Litovitz'; 'AAPCC Board' Subject: RE: Request for TESS data for SPI webcast Sent: Thu, 15 Jul 2004 19:32:44 -0400 did not reach the following recipient(s)...

CString ASSERT
I have a CString object declared in a class. When I attempt to return it via a member function, I get an ASSERT in CString::CString(const CString& stringSrc) ASSERT(stringSrc.GetData()->nRefs != 0); What's that all about? -- Thanks, Brian Toothill How about a code snippet of the offending code? "Brian Toothill" <.> wrote in message news:#H0N51QfDHA.1872@TK2MSFTNGP09.phx.gbl... > I have a CString object declared in a class. When I attempt to return it > via a member function, I get an ASSERT in CString::CString(const CString& > stringSrc) > &...

Exchange failing weekly
Scenario: Usually every 4-5 days, sometimes more, sometimes less users will say that Outlook is saying that it is connected but no emails are coming through. If they restart Outlook then it doesn't connect properly to Exchange. If I try and restart Exchange server, it takes ages then fails with a 1053 error. The state then gets stuck in the "stopping" state and the only way to resolve in a complete server restart. May not happen for weeks then happens weekly again for a few weeks. Failure generally seems to happen overnight at some time as compliants already come...