-
June 3rd, 2008, 05:48 AM
#1
Debug Assertion in occcont.cpp Line: 926
Hi
I'm moving VC++ solution from VS 6 to VS 2005.
When application tries to load dialog with ocxes, follow error appears (on CDialog:oModal() call):
Debug Assertion Failed!
Program: j:\nd_d\bin\are\AR_Pam.exe
File: f:\sp\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)
Even if I try to place only one activex (e.g. some microsoft's one) onto dialog, error appears.
Some other projects from solution working ok but i can't find out what can cause such difference.
I'm using VS2005 SP1. AfxEnableControlContainer is called from CWinApp InitInstance
Please advice.
Thanks
-
June 3rd, 2008, 05:58 AM
#2
Re: Debug Assertion in occcont.cpp Line: 926
Well, do what this "Assertion failed..." dialog recommends yo to:
Press Retry to debug the application, step into the source code and see the code/comments at the Line: 926 and some lines above it.
Victor Nijegorodov
-
June 3rd, 2008, 06:28 AM
#3
Re: Debug Assertion in occcont.cpp Line: 926
Thank you, Victor.
I've reviewed occcont.cpp and found that
HWND hwndCtrl=AfxGetDlgItemStartFromHWND(pOccDlgInfo->m_pItemInfo[i].nId, hwndSearchFrom);
returns 0.
There is comment also:
//If not found, revert to prev method of GetDlgItem, this means Win32 children list and resource item array are out of sync
But I don't understand what should I do to fix this 'out of sync'.
Does it mean *.rc file should store controls in same order as resource.h ?
-
June 3rd, 2008, 06:43 AM
#4
Re: Debug Assertion in occcont.cpp Line: 926
Sorry, I don't know the reason: perhaps, something is wrong with one or more OCX controls in your VS2005 build?
And no, .rc file does NOT need to store controls in same order as resource.h (except in some rare cases as radio buttons in the group)
Victor Nijegorodov
-
June 3rd, 2008, 06:51 AM
#5
Re: Debug Assertion in occcont.cpp Line: 926
OCX'es are Ok. They are working in other project.
Generally it looks like problem is in some other place then in FillListSitesOrWnds (occcont.cpp).
Ocx are just not created:
GetWindow(..,GW_HWNDNEXT) 'jumps' over them.
Last edited by starcevas; June 3rd, 2008 at 07:15 AM.
-
June 3rd, 2008, 09:01 AM
#6
Re: Debug Assertion in occcont.cpp Line: 926
I've dug deeper and found that error caused by OleInitialize fail (OleInitialize returned scode = RPC_E_CHANGED_MODE).
I've tried to find out where COINIT_MULTITHREADED model is set but can't find this place.
Can anybody advice how can it be set if nobody calls CoInitializeEx?
-
February 12th, 2009, 05:36 AM
#7
Re: Debug Assertion in occcont.cpp Line: 926
Hi Guys!
I'v the same problem, and I can't debug my application, does anyone kwon a kind of solution?
In msdn network I found that article:
http://support.microsoft.com/kb/949107
But I don't understand the real problem that mak ethe assertion... is only an ocx control unregisterd?
Best Regards
Franco Tampieri
-
February 12th, 2009, 05:56 AM
#8
Re: Debug Assertion in occcont.cpp Line: 926
Originally Posted by dr.dran
No, not "unregisterd". I seems to be "not registered"! From this article:
This problem can occur when the ActiveX controls are not properly registered on the deployment machine.
So the first thing you should do is
Resolution
Register ActiveX controls using regsvr32.exe.
Victor Nijegorodov
-
February 12th, 2009, 06:04 AM
#9
Re: Debug Assertion in occcont.cpp Line: 926
Franco walter melon, you should stop messing your stupid ideas around. Stimulate Gal-spot, beating around the bush instead of the main one, you don't see your lack of debug and sourly bad-looking face of the GUI after all ? I only see your mouth and tongue all over one or two places to lick the secreted fluid of the debugg machine
-
February 12th, 2009, 06:46 AM
#10
Re: Debug Assertion in occcont.cpp Line: 926
It is not stupid, it is a problem with register, I am glad you see the online strategies
-
February 19th, 2009, 02:20 AM
#11
Re: Debug Assertion in occcont.cpp Line: 926
Hi guys!
I'm of the same idea of yuenqi.
@ Thu! Please don't bugging or trolling me, but suggest me a solution :P
I'm new of the vc++ studiointerface debug, can you suggest me if there is a function to show me the ocx dependencies or whatelse?
@VictorN I tryed to registe alla the ocx present in the program, but the result si the same, I can compile the program, but i can't debug it... grr very nasty!
Cheers
Franco
-
February 19th, 2009, 04:25 AM
#12
Re: Debug Assertion in occcont.cpp Line: 926
Originally Posted by dr.dran
@VictorN I tryed to registe alla the ocx present in the program, but the result si the same, I can compile the program, but i can't debug it... grr very nasty!
Sorry! I avoid using third party ActiveX controls since the last at least six years. So I don't have any experience with solving such "register"-problems.
Victor Nijegorodov
-
February 19th, 2009, 05:07 AM
#13
Re: Debug Assertion in occcont.cpp Line: 926
Hi at all!
I found that the assert error is on that line:
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey); }
in the file msflexgrid.h
Anyone have experience on it?
Best regards
Franco
-
February 19th, 2009, 05:16 AM
#14
Re: Debug Assertion in occcont.cpp Line: 926
Originally Posted by dr.dran
Hi at all!
I found that the assert error is on that line:
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey); }
in the file msflexgrid.h
But you wrote in your OP it was in occcont.cpp:
Originally Posted by starcevas
Hi
I'm moving VC++ solution from VS 6 to VS 2005.
When application tries to load dialog with ocxes, follow error appears (on CDialog: oModal() call):
Debug Assertion Failed!
Program: j:\nd_d\bin\are\AR_Pam.exe
File: f:\sp\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)
So WHERE is the ASSERT statement that failed? What is the statement asserted? What are any comments around this ASSERT?
What does the GetClsid() return?
What are the values of other parameters passed in CreateControl?
Victor Nijegorodov
-
February 19th, 2009, 05:29 AM
#15
Re: Debug Assertion in occcont.cpp Line: 926
Hi Victorn!
Well, I try do debug and isolate the problem in the code, and I place some brakepoint to block the program before the assertion.
If I run that string then the debugger give me the message in object in this forum.
I found that the parameters bstrLicKey that was a BSTR return me a bad pointer, but before is initialized to null...
this i s the string before used to give a default parameter to the funciont...
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
The joke is that if I compile for release the program compile wiwhout an error... grrrrrr
Best Regards
Franco
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|