program freezes up crashes on large picture

Bug #822103 reported by Shane Thomasson on 2011-08-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mypaint (Ubuntu)

Bug Description

Continued to draw and back out using mouse adding more details to picture, After doing this for 20 mins the program froze up and lost latest info. Error message follows:
Traceback (most recent call last):
  File "/usr/share/mypaint/gui/", line 230, save_cb(self=<gui.filehandling.FileHandler object>, action=<gtk.Action object at 0xba9e2ac (GtkAction at 0x9c5aa98)>)
  variables: {'self.save_file': ('local', <bound method FileHandler.wrapper of <gui.filehandling.FileHandler object at 0xba97a8c>>), 'self.filename': ('local', '/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora')}
  File "/usr/share/mypaint/gui/", line 41, wrapper(self=<gui.filehandling.FileHandler object>, *args=('/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora',), **kwargs={})
                func(self, *args, **kwargs)
  variables: {'self': ('local', <gui.filehandling.FileHandler object at 0xba97a8c>), 'args': ('local', ('/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora',)), 'func': ('local', <function save_file at 0xa07f9cc>), 'kwargs': ('local', None)}
  File "/usr/share/mypaint/gui/", line 180, save_file(self=<gui.filehandling.FileHandler object>, filename='/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora', **options={})
                    raise document.SaveLoadError, _('Did not save, the canvas is empty.')
      , **options)
            except document.SaveLoadError, e:
  variables: {'options': ('local', None), '': ('local', <bound method of <lib.document.Document instance at 0xba97d2c>>), 'filename': ('local', '/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora')}
  File "/usr/share/mypaint/lib/", line 254, save(self=<lib.document.Document instance>, filename='/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora', **kwargs={})
                save(filename, **kwargs)
            except gobject.GError, e:
  variables: {'kwargs': ('local', None), 'save': ('local', <bound method Document.save_ora of <lib.document.Document instance at 0xba97d2c>>), 'filename': ('local', '/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora')}
  File "/usr/share/mypaint/lib/", line 383, save_ora(self=<lib.document.Document instance>, filename='/media/85a5534c-0359-4234-b77c-4e4e3c7d3d33/jovas/Pictures/Work/aug6mc.ora', options=None)
            # save background as layer (solid color or tiled)
            s = pixbufsurface.Surface(x0, y0, w0, h0)
  variables: {'h0': ('local', 11072), 's': (None, None), 'pixbufsurface.Surface': ('global', <class lib.pixbufsurface.Surface at 0x9ebe53c>), 'w0': ('local', 13824), 'y0': ('local', -2176), 'x0': ('local', -896)}
  File "/usr/share/mypaint/lib/", line 43, __init__(self=<lib.pixbufsurface.Surface instance>, x=-896, y=-2176, w=13824, h=11072, alpha=False, data=None)
            self.epixbuf = gdk.Pixbuf(gdk.COLORSPACE_RGB, alpha, 8, self.ew,
            dx = x-self.ex
RuntimeError: could not create GdkPixbuf object

I am using Linux Mint 10 with a Wacom Tablet and program running.
MyPaint 0.8.2

I had been expanding picture to add detail previously and usually it is able to handle it with no problem. Today was the
first it froxe up. It could be just the nature of the size of the picture and I am going be more careful to watch the size of the picture and prevent future losses.

Martin Renold (martinxyz) wrote :

The message stands for "out of memory" while trying to save the file.

MyPaint was trying to create a 3824 x 11072 (127MB) pixbuf, which would be the size of your image. If your image should have been much smaller, you probably made some accidental faint strokes while zoomed out. Check whether your tablet pressure goes to exactly zero when you lift the pen.

The good news: starting with MyPaint 0.9 we no longer allocate such a large pixbuf while saving, and saving is around 5 to 10 times faster than 0.8.

The bad news: we still allocate the same sized pixbuf while loading (but drop it after). And people still occasionally report out of memory when working with huge images.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers