# glfwCreateWindow return

**URL:** <https://discourse.glfw.org/t/glfwcreatewindow-return/559>\
**Category:** support\
**Created:** [February 15, 2016, 12:04am UTC](https://discourse.glfw.org/t/glfwcreatewindow-return/559 "2016-02-15T00:04:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [February 15, 2016, 12:04am UTC](https://discourse.glfw.org/t/glfwcreatewindow-return/559/1 "2016-02-15T00:04:17Z")

</div>

**[lotusword](https://sourceforge.net/u/lotusword/)** wrote on [Monday, February 15, 2016](https://sourceforge.net/p/glfw/discussion/247562/thread/7e39167a/#58fc):

I tried to use glfwCreateWindow on Parallel Desktop 11 of Visual Studio Community 2015, Windows 10 64bits, but it returns NULL. I have added all the include files, all the lib files, and put the glfw3.dll file into Windows/System32 and Windows/SysWOW64. I have also checked that my driver is the latest version. Can someone tell me if it is the virtual machine’s problem or I missed something in the process? Thanks a lot for your help.

---

<div class="post-metadata">

**Author:** ![elmindreda](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/elmindreda/32/26_2.png) [@elmindreda](https://discourse.glfw.org/u/elmindreda)\
**Post date:** [March 8, 2016, 5:32pm UTC](https://discourse.glfw.org/t/glfwcreatewindow-return/559/2 "2016-03-08T17:32:22Z")

</div>

Set an [error callback](http://www.glfw.org/docs/latest/intro.html#error_handling) and see what it tells you. Whenever `glfwCreateWindow` returns `NULL` (or any other error occurs) you should get a human-readable error description.

---

<div class="post-metadata">

**Author:** ![kundelstein](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@kundelstein](https://discourse.glfw.org/u/kundelstein)\
**Post date:** [May 15, 2016, 5:24pm UTC](https://discourse.glfw.org/t/glfwcreatewindow-return/559/3 "2016-05-15T17:24:27Z")

</div>

I second this question.

Randomly (quite rare) glfwCreateWindow returns NULL. There is no error callback in such case and all I can do is to terminate application. If there is a way of reading error message without callback, I would use it.

All I can tell is that the only way to recreate this error on Windows 7, DellXPS17 is when I use Chrome to scroll Facebook until it eats up its share. My guess is that glfw cares too much and tries to protect my brain from damage due to FB overload.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [May 23, 2016, 1:43pm UTC](https://discourse.glfw.org/t/glfwcreatewindow-return/559/4 "2016-05-23T13:43:32Z")

</div>

> [@system](#):
>
> Parallel Desktop 11

Note that Parallels Desktop currently only supports OpenGL 2.1 or lower (and then only if the host system does so). So if you’re asking for a higher OpenGL version you can get NULL returned.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [May 23, 2016, 1:48pm UTC](https://discourse.glfw.org/t/glfwcreatewindow-return/559/5 "2016-05-23T13:48:23Z")

</div>

Your question is slightly different as lotusword gets NULL all the time.

Occasionally getting a NULL is a different problem, use the [error callback](http://www.glfw.org/docs/latest/intro.html#error_handling) as elmindreda mentions to get more information. You may also want to try updating your drivers.
