visual C++ runtime library error

assertion failed occont.cpp Line926

Page 1 of 1

2 Replies - 5862 Views - Last Post: 23 January 2012 - 11:44 AM

#1 Guest_Gupta*


Reputation:

visual C++ runtime library error

Posted 27 July 2010 - 08:18 PM

hi,

i have my vc++ application running vs2008. and build it in debug mode.successfully done.
while runnning the exe getting error like

[b]Debug Assertion Failed!
Program: c:...\debug\appln.exe
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp
Line: 926

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)

tried removing the .ncb file and build again. but showing the same error.

thanks in advance...

Is This A Good Question/Topic? 0

Replies To: visual C++ runtime library error

#2 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: visual C++ runtime library error

Posted 30 July 2010 - 09:08 AM

Did you write this program?

No: Contact the person who actually wrote it, provide the steps you took to get the error, and copy the error message for him to look at.

Yes: It's a bug in your code. Compiling does not mean correct. It simply means that you have something syntactically acceptable. Go ahead and debug to isolate and discover the error.

In either case, this isn't a question this forum will handle. That's because if it's a custom program you didn't write, we obviously can't do anything about it. And if you wrote the program, this is a programming issue you need to resolve, not a general support question.
Was This Post Helpful? 0
  • +
  • -

#3 ParDHarD  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-February 09

Re: visual C++ runtime library error

Posted 23 January 2012 - 11:44 AM

For anyone else looking for a possible solution:

I came across the same problem after loading dmp files and resolved it by removing *.pdb in the output directory, then recompiling.

I found microsofts archive code in my "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\atlmfc\src\mfc" directory. (It also exists in the vs 9.0 and 10.0 directories as well)
Here is the code around line 926:

				HWND hwndCtrl=AfxGetDlgItemStartFromHWND(pOccDlgInfo->m_pItemInfo[i].nId, hwndSearchFrom);
				//If not found, revert to prev method of GetDlgItem, this means Win32 children list and 
				//resource item array are out of sync
				if (hwndCtrl == NULL)
				{
					hwndCtrl = ::GetDlgItem(m_pWnd->GetSafeHwnd(),pOccDlgInfo->m_pItemInfo[i].nId);
					TRACE(traceAppMsg, 0, "Warning: Resource items and Win32 Z-order lists are out of sync. Tab order may be not defined well.\n");
				}
				COleControlSiteOrWnd *pTemp =
					new COleControlSiteOrWnd(
						hwndCtrl,
						pOccDlgInfo->m_pItemInfo[i].bAutoRadioButton);
line 926 -> 			ASSERT(IsWindow(pTemp->m_hWnd));
				if (IsWindow(pTemp->m_hWnd))
				{
					hwndStart = pTemp->m_hWnd;
					// These transfer inserts will ensure pTemp is freed if insertion fails
					if(posOld)
					{
						m_listSitesOrWnds.TransferInsertBefore(posOld, pTemp);
					}
					else
					{
						m_listSitesOrWnds.TransferAddTail(pTemp);
					}
				}


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1