title: KernelBase.dll exception code 0x0EEDFADE (but no crash) when Visual Studio is NOT run as administrator (GLFW/glad application)
body: <p>I'm using Visual Studio 2019 and have the following simple OpenGL program as a minimal example (using GLFW and GLAD):</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  #include &lt;glad/glad.h&gt;
  #include &lt;GLFW/glfw3.h&gt;
  
  void error_callback(int error, const char* description) {
      std::cout &lt;&lt; "GLFW error: " &lt;&lt; description &lt;&lt; " (" &lt;&lt; error &lt;&lt; ")\n";
  }
  
  int main() {
      if (!glfwInit()) exit(-1);
      glfwSetErrorCallback(error_callback);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
      glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
      GLFWwindow* window = glfwCreateWindow(640, 480, "GLFW Test Application", nullptr, nullptr);
      if (!window) exit(-1);
      glfwMakeContextCurrent(window);
      if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) exit(-1);
      glViewport(0, 0, 640, 480);
      glClearColor(0.6f, 0.6f, 0.1f, 1.f);
      while (!glfwWindowShouldClose(window)) {
          glClear(GL_COLOR_BUFFER_BIT);
          glfwSwapBuffers(window);
          glfwPollEvents();
      }
      glfwDestroyWindow(window);
      glfwTerminate();
  }
  </code></pre>
  
  <p>The program works fine but while it's running I get lines like those who follow in the debug output window in intervals of few to around 20 or even more seconds:</p>
  
  <pre><code>Exception thrown at 0x00007FFE61EEA799 (KernelBase.dll) in vcpkg_test.exe: 0x0EEDFADE (parameters: 0x0000000001D0A34E, 0x000001C13E322BA0, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000).
  Exception thrown at 0x00007FFE61EEA799 (KernelBase.dll) in vcpkg_test.exe: 0x0EEDFADE (parameters: 0x0000000001D0A34E, 0x000001C13DC7CE40, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000).
  Exception thrown at 0x00007FFE61EEA799 (KernelBase.dll) in vcpkg_test.exe: 0x0EEDFADE (parameters: 0x0000000001D0A34E, 0x000001C13DC7CDE0, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000).
  </code></pre>
  
  <p>The program keeps running though, works fine and also exits with exit code 0. It also works fine when I execute the EXE file outside of Visual Studio. When I set VS to break on <em>all</em> exceptions, then I see that the exception occurs in this call (win32_init.c, "createHelperWindow" method):</p>
  
  <pre class="lang-cpp prettyprint-override"><code>_glfw.win32.helperWindowHandle =
          CreateWindowExW(WS_EX_OVERLAPPEDWINDOW,
                          _GLFW_WNDCLASSNAME,
                          L"GLFW message window",
                          WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
                          0, 0, 1, 1,
                          NULL, NULL,
                          GetModuleHandleW(NULL),
                          NULL);
  </code></pre>
  
  <p>I already spent hours on Google trying to find a solution to this. The only "hint" I got is that the exceptions <em>do not</em> occur when I run VS19 as administator.
  Does someone have an idea what's causing this? Or should I just ignore it since it runs fine? That'd feel wrong though....</p>
  
  <h2>Update/Solution</h2>
  
  <p>I followed the tips in Ben's answer (see accepted answer). After enabling breaking on first-chance exceptions, I got the following stack trace:
  <a href="https://i.stack.imgur.com/dHbkf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHbkf.png" alt="stack trace"></a></p>
  
  <p>The DLL "ammemb64.dll" also appeared in the modules window. It belongs to the software "Actual Multiple Monitors" and after closing that application, the exception was gone.</p>