Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Debug Assertion Failed error by WaitForMultipleObjectsEx in 64 bit application

Debug Assertion Failed error by WaitForMultipleObjectsEx in 64 bit application

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structurestestingdebuggingbeta-testing
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 12335695
    wrote on last edited by
    #1

    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.

    L A 3 Replies Last reply
    0
    • M Member 12335695

      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.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Member 12335695 wrote:

      Please let me know how we can resolve it.

      Step 1 is to use your debugger to trap the assertion and find out why it is occurring.

      1 Reply Last reply
      0
      • M Member 12335695

        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.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • M Member 12335695

          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.

          A Offline
          A Offline
          Albert Holguin
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          • L Lost User

            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

            M Offline
            M Offline
            Member 12335695
            wrote on last edited by
            #5

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

            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?

            M L 2 Replies Last reply
            0
            • M Member 12335695

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

              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?

              M Offline
              M Offline
              Member 12335695
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • M Member 12335695

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

                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?

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                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"
                END

                You may be missing other resource strings. Best Wishes, -David Delaune

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups