Runtime Error from savefig( )

Good afternoon group,

I am developing an application that had always before plotted a variable 2D numpy array of floats using contourf(), and then saved the figure produced as .png. Certain runs of the application (the ones with best precision) result in a failure while saving the figure using savefig(), and as consequence the message says at the end: "Runtime Error: Failure to gain raw access to bitmap data", here is the complete complaint, does someone know what is happening please?
I use windows machines and Python 2.5.4.

Traceback (most recent call last):

File "C:/OSGeo4W/apps/Python25/Scripts/Jan_7_2010/" , line 667 in CalculateCG:
      savefig(fname, dpi=600, facecolor='w', edgecolor='w', orientation='portrait', papertype=None, format=None, transparent=False)

File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/", line 269, in savefig

      return fig.savefig(*args, **kwargs)

File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/", line 782, in savefig

      self.canvas.print_figure(*args, **kwargs)

File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/backends/", line 101, in print_figure

      FigureCanvasAgg.print_figure(self, filename, *args, **kwargs)

File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/", line 1195, in print_figure


File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/backends/"), line 396, in print_png


File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/backends/", line 63, in draw

      self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)

File "C:/OSGeo4W/apps/Python25/Lib/site-packages/matplotlib/backends/", line 226, in _py_WX28_convert_agg_to_wx_bitmap


File "C:/OSGeo4W/apps/Python25/Lib/site-packages/wx-2.8-msw-unicode\wx\", line 889, in BitmapFromBufferRGBA

      return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)

      RuntimeError: Failed to gain raw access to bitmap data.

M. Angelica Echavarria-Gregory, M.Sc., E.I.
Ph.D Candidate
University of Miami
Phone 305 284-3611