URL:
  <http://gna.org/bugs/?18782>

                 Summary: Undo causes crash
                 Project: MyPaint
            Submitted by: ion9
            Submitted on: Tue 04 Oct 2011 03:56:01 AM GMT
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
         Planned Release: None
        Operating System: 

    _______________________________________________________

Details:

With git HEAD, (efed132 layer: minor fix for missing argument),
undo-ing causes a non-fatal crash.

Steps to reproduce:


1. Draw a few strokes, enough to create a few undo steps.
2. Trigger undo.
3. crash occurs (apparently AFTER the undo is performed). The display
glitches but after panning, displays the image as if the undo had been
performed.



Traceback follows:

Traceback (most recent call last):
  File "/usr/share/mypaint/gui/document.py", line 248,
undo_cb(self=<gui.document.Document object>, action=<gtk.Action object at
0x27080a0 (GtkAction at 0x20b81b0)>)
        def undo_cb(self, action):
            cmd = self.model.undo()
            if isinstance(cmd, command.MergeLayer):
  variables: {'self.model.undo': ('local', <bound method Document.undo of
<lib.document.Document instance at 0x2767c20>>), 'cmd': (None, [])}
  File "/usr/share/mypaint/lib/document.py", line 226,
undo(self=<lib.document.Document instance>)
            while 1:
                cmd = self.command_stack.undo()
                if not cmd or not cmd.automatic_undo:
  variables: {'cmd': (None, []), 'self.command_stack.undo': ('local', <bound
method CommandStack.undo of <lib.command.CommandStack instance at
0x27681b8>>)}
  File "/usr/share/mypaint/lib/command.py", line 36,
undo(self=<lib.command.CommandStack instance>)
            command = self.undo_stack.pop()
            command.undo()
            self.redo_stack.append(command)
  variables: {'command.undo': ('local', <bound method Stroke.undo of
<lib.command.Stroke instance at 0x33a8050>>)}
  File "/usr/share/mypaint/lib/command.py", line 105,
undo(self=<lib.command.Stroke instance>)
        def undo(self):
            self.doc.layer.load_snapshot(self.before)
        def redo(self):
  variables: {'self.before': ('local', ([<lib.strokemap.StrokeShape instance
at 0x339e5a8>], <lib.tiledsurface.SurfaceSnapshot instance at 0x339e6c8>,
1.0)), 'self.doc.layer.load_snapshot': ('local', <bound method
Layer.load_snapshot of <lib.layer.Layer instance at 0x25bccf8>>)}
  File "/usr/share/mypaint/lib/layer.py", line 97,
load_snapshot(self=<lib.layer.Layer instance>,
data=<lib.tiledsurface.SurfaceSnapshot instance>)
            self.strokes = strokes[:]
            self._surface.load_snapshot(data)
  variables: {'data': ('local', <lib.tiledsurface.SurfaceSnapshot instance at
0x339e6c8>), 'self._surface.load_snapshot': ('local', <bound method
Surface.load_snapshot of <lib.tiledsurface.Surface; proxy of <Swig Object of
type 'TiledSurface *' at 0x2700660> >>)}
  File "/usr/share/mypaint/lib/tiledsurface.py", line 294,
load_snapshot(self=<lib.tiledsurface.Surface; proxy of <Swig Object of type
'TiledSurface *' at 0x2700660> >, sshot=<lib.tiledsurface.SurfaceSnapshot
instance>)
            for pos, tile in dirty:
                self.mark_mipmap_dirty(*pos)
            bbox = get_tiles_bbox([pos for (pos, tile) in dirty])
  File "/usr/share/mypaint/lib/mypaintlib.py", line 207,
<lambda>(self=<lib.tiledsurface.Surface; proxy of <Swig Object of type
'TiledSurface *' at 0x2700660> >, name='mark_mipmap_dirty')
        for _s in [Surface]:
__swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
        __getattr__ = lambda self, name: _swig_getattr(self, TiledSurface,
name)
        __repr__ = _swig_repr
  variables: {'_swig_getattr': ('global', <function _swig_getattr at
0x1e4e320>), 'self': ('local', <lib.tiledsurface.Surface; proxy of <Swig
Object of type 'TiledSurface *' at 0x2700660> >), 'name': ('local',
'mark_mipmap_dirty'), '__getattr__': (None, []), 'TiledSurface': ('global',
<class 'lib.mypaintlib.TiledSurface'>)}
  File "/usr/share/mypaint/lib/mypaintlib.py", line 55,
_swig_getattr(self=<lib.tiledsurface.Surface; proxy of <Swig Object of type
'TiledSurface *' at 0x2700660> >, class_type=<class
'lib.mypaintlib.TiledSurface'>, name='mark_mipmap_dirty')
        if method: return method(self)
        raise AttributeError(name)
  variables: {'AttributeError': ('builtin', <type
'exceptions.AttributeError'>), 'name': ('local', 'mark_mipmap_dirty')}
AttributeError: mark_mipmap_dirty




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?18782>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs

Reply via email to