Title: glfwSwapBuffers(window) causing a segfault
Tags: c++;opengl;cmake;glfw
Question: I was having a problem with code from a GLFW tutorial (open.gl) and I narrowed it down to it being caused by

```glfwSwapBuffers(window);
```

The full code: http://pastebin.com/Evtf5PRf

The CMakeLists.txt I am using: http://pastebin.com/vKUQiMtf

This is on Ubuntu 12.04

Changing to the proprietary drivers has fixed the issue! (See answer from me below)

Comment: Have you checked that `window` isn't NULL?

Comment: Works fine for me.  What does gdb say?

Comment: Maybe my graphics card doesn't support OpenGL3.2 on Ubuntu (HD7970 should handle OpenGL3.2 right?)

Comment: Problem seems to have been resolved by changing my graphics driver from the Ubuntu default to the AMD proprietary drivers. Interestingly enough it is giving me a Unsupported Hardware watermark in the bottom right of my screen.

Am going to install the updates graphics drivers form AMD in the hopes of getting rid of the watermark.

Here is the accepted answer: This issue is caused by GLFW not interacting properly with the drivers Ubuntu provides. To solve this, change to the proprietary drivers.

How to change your graphics drivers to the proprietary drivers:


Open System Settings (Icon is a gear with a wrench)
Open Software and Updates
Go to the Additional Drivers tab
Select the proprietary graphics drivers for you graphics card. 
Restart your computer for the changes to apply




{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 4, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:11/07/13', 'FavoriteCount': 0.0, 'PostTypeId': 1, 'Tags': '<c++><opengl><cmake><glfw>', 'Title': 'glfwSwapBuffers(window) causing a segfault', 'ViewCount': 653, 'id': 19827763, 'user_AboutMe': '', 'user_AccountId': 451994.0, 'user_DisplayName': 'Andy Rama', 'user_Reputation': 43.0, 'user_Views': 9.0, 'user_id': 848179.0}}