MATLAB: MATLAB crashes when creating plots in Linux

MATLAB

The problem seems to occur when plotting figures but also when closing the figures.  Why is MATLAB crashing in my Linux machine?  
The resulting crash log shows this:
 
Stack Trace (from fault):
[ 0] 0x00007f4564af80a0 /usr/local/MATLAB/bin/glnxa64/libosg.so.80+01073312 _ZN3osg14GLBufferObject5clearEv+00000000

Best Answer

The cause of this crash appears to be a bug in the NVidia drivers.
Other users were able to work around the crash by using the software version of OpenGL that MATLAB ships with. To use this workaround, start MATLAB with the "-softwareopengl" flag. You can also use the MATLAB command "opengl('save', 'software');" once MATLAB starts to save this configuration so MATLAB starts using OpenGL software without using the startup flag.