Unhandled exception in CoreMessaging.dll during program shutdown

0

I have a simple program that just displays a window, waits for a key press, and then exits. During shutdown, the app crashes, complaining about CoreMessaging.dll. Here is the sample code that has the issue:

sf::RenderWindow window;

void waitForKeyPress() {
  Event event;
  bool done = false;
  while (!done) {
    while (window.pollEvent(event)) {
      if (event.type == Event::KeyPressed) {
        done = true;
      }
    }
  }
}

int main() {
  // If I don't create the window, there's no crash.
  window.create(VideoMode::getDesktopMode(), "test", Style::Default); 
  waitForKeyPress();
  return 0; // Crashes upon returning.
}

This is the crash I get:

Unhandled exception at 0x64260032 (CoreMessaging.dll) in game.exe: 0xC0000602: A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.

The call stack doesn't seem particularly helpful

>   CoreMessaging.dll!64260032()    Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for CoreMessaging.dll] 
    [External Code] 
    InputHost.dll!5bb78a40()    Unknown
    [External Code] 

The project was built using Visual Studio Community 2015. What is CoreMessaging.dll and why is it having an issue with this simple app that just shows a window and closes?

c++
windows
dll
sfml
asked on Stack Overflow Jul 15, 2017 by Alex

1 Answer

1

Your problem is testing using a bugged, outdated build of Windows 10 that's affected by a bug now fixed with update KB4025342 (Win10 build 15063.483)

The bug fix summary that matches to your issue: "Addressed issue with CoreMessaging.dll that may cause 32-bit apps to crash on the 64-bit version of the Windows OS."

Read more about this issue here: MSDN bugreport link

Please update your Windows build and check that the crash will be gone, then select my reply as answer if solved.

answered on Stack Overflow Jul 18, 2017 by Blooker

User contributions licensed under CC BY-SA 3.0