# Glfw main return not stopping nvoglv32.dll

**URL:** <https://discourse.glfw.org/t/glfw-main-return-not-stopping-nvoglv32-dll/289>\
**Category:** support\
**Created:** [February 18, 2011, 12:22am UTC](https://discourse.glfw.org/t/glfw-main-return-not-stopping-nvoglv32-dll/289 "2011-02-18T00:22:59Z")\
**Posts on this page:** 2\
**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 18, 2011, 12:22am UTC](https://discourse.glfw.org/t/glfw-main-return-not-stopping-nvoglv32-dll/289/1 "2011-02-18T00:22:59Z")

</div>

**[pyrce007](https://sourceforge.net/u/pyrce007/)** wrote on [Friday, February 18, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/36c0c3fc/#acb4):

I’ve got a project that’s been using OpenGL C++ with glfw and I recently  
figured out how to make my program use it’s Nvidia card by default instead of  
built in graphics card (it has optimus so it default to the built-in chip).  
This however has caused my program to always leave an Nvidia thread running  
when I’ve returned from main.

I’ve called glfw terminate and terminated all other threads. The problem only  
occurs if I use glfwOpenWindow with 8 bits for rgb and any value for the other  
fields (tried changing those a lot to test possible context errors). I set  
my program to terminate right after window creation and it still hangs on the  
nvidia thread (I can see it in processor explorer and it’s the only live  
thread) and refuses to end the program until I force quit the debug mode.  
Actually running my program produces the same result once I quit via closing  
the window or my quit key. This problem does not occur in my glut programs  
using the nvidia card. I’ve also both updated to the most recent nvidia driver  
for my card (Geforce GT 330M) and tried rolling back to an older driver with  
no luck.

I’m using Windows7 64bit with visual studio 2008. I really like glfw over it’s  
alternatives, but I can’t find what would cause this bug despite a few days of  
internet searching and program testing. If someone has an idea for how to get  
the nvidia thread to correctly terminate after my main thread returns it’d be  
greatly appreciated.

---

<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:** [March 6, 2011, 1:26am UTC](https://discourse.glfw.org/t/glfw-main-return-not-stopping-nvoglv32-dll/289/2 "2011-03-06T01:26:05Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Sunday, March 06, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/36c0c3fc/#203a):

This sounds like a driver issue, but I have no idea as to how it may be  
resolved. Sorry.
