Opened 8 years ago

#48 new defect

Hidden plot raises ValueError

Reported by: flip Owned by: flip
Priority: minor Milestone:
Component: general/unknown Version:
Keywords: Cc: bsoher


So far, I've recreated this on OS X but haven't been able to on Windows (and haven't tried Linux). This might be specific to a given wx implementation.

  1. Open a dataset
  2. On the basic tab, slide the slider all the way to the right so that the plot is hidden.
  3. move to spectral tab
  4. move back to basic. Python raises this error:
    Traceback (most recent call last):
      File "/Users/me/w/duke/src/vespa/analysis/src/", line 84, in on_tab_changed
      File "/Users/me/w/duke/src/vespa/analysis/src/", line 387, in on_tab_changed
        tab.process_and_plot()     # update the plots
      File "/Users/me/w/duke/src/vespa/analysis/src/", line 658, in process_and_plot
      File "/Users/me/w/duke/src/vespa/analysis/src/", line 764, in plot
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/", line 61, in draw
        self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/", line 163, in _convert_agg_to_wx_bitmap
        agg.buffer_rgba(0, 0))
      File "/usr/local/lib/wxPython-unicode-", line 886, in BitmapFromBufferRGBA
        return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
    ValueError: Invalid data buffer size.

I think the problem is due to the plot being completely hidden, so the canvas size is (0, 0) or something like that.

What's even more annoying than the error printed to the console is that the slider/gripper has disappeared completely and I can't figure out how to reveal it again without closing and re-opening the dataset.

Under Windows, when I do the same the gripper doesn't disappear and there's always a little sliver of the plot visible. That avoids both problems described above. We might want to implement something like that ourselves, or sanity check the slider values when a tab is activated, or just live with it.

Change History (0)

Note: See TracTickets for help on using tickets.