Debug Assertion Failed error by WaitForMultipleObjectsEx in 64 bit application
-
Hi All, We are trying to upgrade 32 bit MFC application to 64 bit application. In this process we are getting the
Debug Assertion Failed!
error when the synchronization function WaitForMultipleObjectsEx() is called as dwWaitResult=::WaitForMultipleObjectsEx(dwNumWaits,hWaits,FALSE,dwTimeout,TRUE); where dwNumWaits values is 2, dwTimeout is INFINITE and hWaits is an array of 32 handles, in which only the first 2 handles are initialized. This is perfectly worked with 32 bit application, but when we are testing the application in 64 bit, getting the above error. Please let me know how we can resolve it. Thanks, Lakshmi Chowdam.
-
Hi All, We are trying to upgrade 32 bit MFC application to 64 bit application. In this process we are getting the
Debug Assertion Failed!
error when the synchronization function WaitForMultipleObjectsEx() is called as dwWaitResult=::WaitForMultipleObjectsEx(dwNumWaits,hWaits,FALSE,dwTimeout,TRUE); where dwNumWaits values is 2, dwTimeout is INFINITE and hWaits is an array of 32 handles, in which only the first 2 handles are initialized. This is perfectly worked with 32 bit application, but when we are testing the application in 64 bit, getting the above error. Please let me know how we can resolve it. Thanks, Lakshmi Chowdam.
-
Hi All, We are trying to upgrade 32 bit MFC application to 64 bit application. In this process we are getting the
Debug Assertion Failed!
error when the synchronization function WaitForMultipleObjectsEx() is called as dwWaitResult=::WaitForMultipleObjectsEx(dwNumWaits,hWaits,FALSE,dwTimeout,TRUE); where dwNumWaits values is 2, dwTimeout is INFINITE and hWaits is an array of 32 handles, in which only the first 2 handles are initialized. This is perfectly worked with 32 bit application, but when we are testing the application in 64 bit, getting the above error. Please let me know how we can resolve it. Thanks, Lakshmi Chowdam.
Hi,
Member 12335695 wrote:
hWaits is an array of 32 handles
That is a alot of synchronization objects for a single thread. Please perform an audit/review on your code and check to see if your application is using greater than MAXIMUM_WAIT_OBJECTS which is probably defined as 64 on your operating system. Exceeding this number will cause failures at run-time that the compiler does not catch. You might want to ask your engineers to design a better architecture that does not require single threads to wait on such a large number of handles. Also please paste the entire contents of the "Debug Assertion Failed!" error message so we can further assist. Best Wishes, -David Delaune
-
Hi All, We are trying to upgrade 32 bit MFC application to 64 bit application. In this process we are getting the
Debug Assertion Failed!
error when the synchronization function WaitForMultipleObjectsEx() is called as dwWaitResult=::WaitForMultipleObjectsEx(dwNumWaits,hWaits,FALSE,dwTimeout,TRUE); where dwNumWaits values is 2, dwTimeout is INFINITE and hWaits is an array of 32 handles, in which only the first 2 handles are initialized. This is perfectly worked with 32 bit application, but when we are testing the application in 64 bit, getting the above error. Please let me know how we can resolve it. Thanks, Lakshmi Chowdam.
Look at the call stack to see what the assertion was checking, that should give you clues as to where the actual problem may be. Are you using the same exact MFC version (other than 32v64bit) on both compilations?
-
Hi,
Member 12335695 wrote:
hWaits is an array of 32 handles
That is a alot of synchronization objects for a single thread. Please perform an audit/review on your code and check to see if your application is using greater than MAXIMUM_WAIT_OBJECTS which is probably defined as 64 on your operating system. Exceeding this number will cause failures at run-time that the compiler does not catch. You might want to ask your engineers to design a better architecture that does not require single threads to wait on such a large number of handles. Also please paste the entire contents of the "Debug Assertion Failed!" error message so we can further assist. Best Wishes, -David Delaune
Please find the contents of the "Debug Assertion Failed!" error message as:
Debug Assertion Failed!
Program: C:\Windows\system32\mfc120ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\barstat.cpp
Line: 99For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.(Press Retry to debug the application)
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp(1628) : AppMsg - Warning: no message line prompt for ID 0xE001.Even though I restricted the synchronization objects to 2 only, then also I am getting the above same error. Please let me know if you need more information on this?
-
Please find the contents of the "Debug Assertion Failed!" error message as:
Debug Assertion Failed!
Program: C:\Windows\system32\mfc120ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\barstat.cpp
Line: 99For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.(Press Retry to debug the application)
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp(1628) : AppMsg - Warning: no message line prompt for ID 0xE001.Even though I restricted the synchronization objects to 2 only, then also I am getting the above same error. Please let me know if you need more information on this?
And also, the creating events are: hInterruptEvent=CreateEvent(NULL,FALSE,FALSE,NULL); hTDEvent=CreateEvent(NULL,FALSE,FALSE,NULL); hWaits[0]=hInterruptEvent; hWaits[1]=hTDEvent; Thanks, Lakshmi Chowdam.
-
Please find the contents of the "Debug Assertion Failed!" error message as:
Debug Assertion Failed!
Program: C:\Windows\system32\mfc120ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\barstat.cpp
Line: 99For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.(Press Retry to debug the application)
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp(1628) : AppMsg - Warning: no message line prompt for ID 0xE001.Even though I restricted the synchronization objects to 2 only, then also I am getting the above same error. Please let me know if you need more information on this?
Member 12335695 wrote:
Program: C:\Windows\system32\mfc120ud.dll File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\barstat.cpp Line: 99 For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. (Press Retry to debug the application) f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp(1628) : AppMsg - Warning: no message line prompt for ID 0xE001.
This means that your status bar is missing an ATL/MFC resource string for the ATL_IDS_IDLEMESSAGE. Add this to your .RC resource file:
STRINGTABLE
BEGIN
ATL_IDS_IDLEMESSAGE "Ready"
ENDYou may be missing other resource strings. Best Wishes, -David Delaune