Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-3098

Startup occasionally hangs at "Loading your personal settings"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Win32SS
    • None
    • Operating System: ReactOS
      Platform: x86 Hardware

    Description

      Created an attachment (id=2682)
      Fix race condition in msgina

      There is a race condition in msgina/gui.c that will occasionally cause startup to hang at "Loading your personal settings". To demonstrate, add a Sleep in StartupWindowThread after DialogBoxParam returns, and it will happen every time.

      The problem: GUIRemoveStatusMessage destroys the dialog, but does not clear pgContext->SignaledStatusWindowCreated. It relies on the old dialog thread to do that. But sometimes, the old dialog thread doesn't get to do so before GUIDisplayStatusMessage is called again. When the new dialog thread initializes, it sees that SignaledStatusWindowCreated is TRUE, and so it doesn't set the event; the main thread hangs in WaitForSingleObject forever.

      All the cleanup needs to be done in GUIRemoveStatusMessage only, to ensure that it gets done before a new dialog is created, and never after.

      Attachments

        Activity

          People

            hpoussin hpoussin
            goplat Goplat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: