On Mon, Aug 25, 2014 at 01:51:39PM +0200, Filippo Rusconi <lopi...@debian.org> 
sent from wrote:
> On Sat, Aug 23, 2014 at 07:18:40PM +1200, Olly Betts wrote:
> >http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git
> 
> Thank you for your bug report. I tried to perform the migration using
> your script and it seemed to run fine. Roughly 10 files were updated.
> 
> I then set Depends to python-wxgtk3.0. But I get the the
> following run-time error:
> 
> Traceback (most recent call last):
> 
>  File "/usr/share/mmass/mmass.py", line 168, in <module>
>    app = mMass(0)
> 
>  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8631, 
> in __init__
>    self._BootstrapApp()
> 
>  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8196, 
> in _BootstrapApp
>    return _core_.PyApp__BootstrapApp(*args, **kwargs)
> 
>  File "/usr/share/mmass/mmass.py", line 45, in OnInit
>    self.frame = mainFrame(None, -1, 'mMass')
> 
>  File "/usr/share/mmass/gui/main_frame.py", line 135, in __init__
>    self.makeGUI()
> 
>  File "/usr/share/mmass/gui/main_frame.py", line 733, in makeGUI
>    self.spectrumPanel = panelSpectrum(self, self.documents)
> 
>  File "/usr/share/mmass/gui/panel_spectrum.py", line 57, in __init__
>    self.makeGUI()
> 
>  File "/usr/share/mmass/gui/panel_spectrum.py", line 68, in makeGUI
>    self.makeSpectrumCanvas()
> 
>  File "/usr/share/mmass/gui/panel_spectrum.py", line 89, in makeSpectrumCanvas
>    self.spectrumCanvas.draw(self.container)
> 
>  File "/usr/share/mmass/mspy/plot_canvas.py", line 1080, in draw
>    dc = wx.BufferedDC(wx.ClientDC(self), self.plotBuffer)
> 
>  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_gdi.py", line 5100, 
> in __init__
>    _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))
> 
> PyAssertionError: C++ assertion "m_window" failed at 
> ../src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn't work without 
> window
[...]
> Apparently this is related to drawing to a given window context. But
> my knowledge is very sparse in this field. If you wanted to look to
> it, I'd be delighted.

It looks to me like its trying to draw on a window which doesn't
actually yet exist at the Gtk level - this probably means that
Show() hasn't yet been called (or at least that it hasn't yet
resulted in the window actually being shown).

The quick fix is to disable such checks (they are off by default in
wx 2.8, so this probably isn't actually a new issue) - details are
here:

http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git/tree/README#n30

If you want to address the reported issue, then I think gating this
drawing code on IsShown() returning true for the window should work.

Cheers,
    Olly


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to