title: matplotlib is throwing segmentation fault when running on non-gui machine(web server)
body: <p>I want to save images without showing plotted images when using marplotlib library. Here is the sample example which I have been trying out for a while now.  </p>
  
  <pre><code>import matplotlib as mpl
  mpl.use('Agg')
  import matplotlib.pyplot as plt
  
  fig = plt.figure()
  ax = fig.add_subplot(111)
  ax.plot(range(10))
  extent = ax.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
  fig.savefig('temp.jpg', format='jpg', bbox_inches=extent, pad_inches=0)
  </code></pre>
  
  <p>But I am getting this error,</p>
  
  <pre><code>The program received signal SIGSEGV, Segmentation fault.
  </code></pre>
  
  <p>I used gdb tool to debug, where went wrong.. Then I can see this error log...</p>
  
  <pre><code>Program received signal SIGSEGV, Segmentation fault.
  copy_hline (c=..., len=27822, y=19297, x=0, this=0x364f9a8) at  extern/agg24-svn/include/agg_pixfmt_rgba.h:1741
  1741    extern/agg24-svn/include/agg_pixfmt_rgba.h: No such file or directory.
  </code></pre>
  
  <p>I have no idea why this is happing. Any help on this really appreciated.</p>
  
  <p>I am using matplotlib '1.5.3'.</p>