bugMyPaint - Bugs: bug #20988, blocking MemoryError on a large...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #20988: blocking MemoryError on a large ora file (I cannot work with it anymore)

Submitted by:  Gabriele <stramaz2>
Submitted on:  Tue 23 Jul 2013 11:04:43 AM UTC  
 
Severity: 2 - MinorPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Release: 1.0.0 and 1.1.0Planned Release: None
Operating System: Linux (Ubuntu 12.04)

(Jump to the original submission Jump to the original submission)

Mon 23 Jun 2014 05:24:30 PM UTC, comment #9:

This bug tracker will shortly be moving to github. As part of this process, we are reviewing old
bug reports on Gna!.

This report appears to be a request for help, which our tracker was never intended for. Sorry about
the lack of support through this channel, but we cannot offer detailed help with using the software
here. If you are still in need of help when using MyPaint, please try the forums or the mailing
list,

You can also use Twitter, to @MyPaintApp or #mypaint.

Andrew Chadwick <achadwick>
Project Administrator
Mon 05 Aug 2013 12:44:15 AM UTC, comment #8:

Downgrading to Minor because this seems to be a simple OOM condition.

Andrew Chadwick <achadwick>
Project Administrator
Wed 24 Jul 2013 06:30:24 PM UTC, comment #7:

Okay, thanks for all the info. It looks like you simply have a big image with many layers that actually needs more RAM than you have to work with. Nothing seems to have gone awfully wrong.

MyPaint doesn't support larger-than-RAM images at the moment. We could probably try to give the user an early warning, since the problem often happens in the worst moment. But it's tricky to guess how much RAM we are allowed to use. We could also try to optimize RAM usage in several ways, but I don't think there are any low-hanging fruits.

What you can do as a workaround is to swap some RAM to disk, as I have suggested before. Use 'free' on the commandline to check if you already have swap. I think rule of thumb is to create a swap file at most 2x your RAM size. You can also try to combine layers and then save, quit MyPaint and reopen, to continue working.

Maybe this needs a FAQ/wikipage or something.

Martin Renold <martinxyz>
Project Administrator
Wed 24 Jul 2013 07:31:05 AM UTC, comment #6:

Hi,

Yes the image is quite big, more or less the final illustration should be a bit smaller than 9856x4800 (that is the size of grano.png). I attach that layer (grano.png) in a small format. This is the layer with more details and more area painted (...forn now ;) ).
6000x9000 maybe it's a bit more than what I expected (above all 6000). If I resize a bit and cut some external areas with Gimp it isn't a problem, I imagine (I've just made some little modifications but never about sizing or cutting).
Opening every image I can see that people.png has a blank area (but it's also true that is a small layer: 1.8MB)

Yesterday after a reboot and loading just mypaint I managed to remove some not important layers (background* and sfondo) and save it. Today I try to paint a little and save...

Yes, you're right ...probably my 4Gb of ram isn't too much.

[I removed in the other pc the background* and sfondo layer]
$ file data/*.png
data/background #1.png: PNG image data, 9856 x 4928, 8-bit/color RGBA, non-interlaced
data/background #2.png: PNG image data, 9856 x 6144, 8-bit/color RGB, non-interlaced
data/background.png: PNG image data, 9856 x 4928, 8-bit/color RGBA, non-interlaced
data/bozza.png: PNG image data, 8896 x 4800, 8-bit/color RGBA, non-interlaced
data/case.png: PNG image data, 1152 x 512, 8-bit/color RGBA, non-interlaced
data/cieloburn.png: PNG image data, 6528 x 3584, 8-bit/color RGBA, non-interlaced
data/cielo.png: PNG image data, 9536 x 3584, 8-bit/color RGBA, non-interlaced
data/grano light.png: PNG image data, 4672 x 3648, 8-bit/color RGBA, non-interlaced
data/grano.png: PNG image data, 9856 x 4800, 8-bit/color RGBA, non-interlaced
data/grano up1.png: PNG image data, 1472 x 704, 8-bit/color RGBA, non-interlaced
data/hi light.png: PNG image data, 1856 x 1792, 8-bit/color RGBA, non-interlaced
data/monti.png: PNG image data, 4160 x 832, 8-bit/color RGBA, non-interlaced
data/nuvole.png: PNG image data, 6208 x 1472, 8-bit/color RGBA, non-interlaced
data/people.png: PNG image data, 2752 x 5952, 8-bit/color RGBA, non-interlaced
data/Sfondo.png: PNG image data, 8896 x 4160, 8-bit/color RGBA, non-interlaced
data/verde.png: PNG image data, 7744 x 5824, 8-bit/color RGBA, non-interlaced

I'll try to increase the alpha channel as you suggested.

Thanks again

(file #18401)

Gabriele <stramaz2>
Wed 24 Jul 2013 06:35:47 AM UTC, comment #5:

Hm, it's running out of memory when generating the thumbnail, that's sad. Maybe it's generating mipmaps for lots of empty areas of the image that are not really needed, here at least we could do something.

I'm trying to figure out now if your image really has a content area larger than memory, or if something else went wrong that we can fix more easily. The size seems to be 6000x9000 pixels (which you probably intended, I assume?). This should use something around 1GB of memory if all the area is painted, and some of the layers have a large painted area too. (Plus some memory for undo history and temporary memory.) Maybe it's simply too much for your 4GB of total RAM. But let's check for empty areas first.

Can you please run the command "file data/*.png" in the unzipped directory? (You may have to install 'file' first.) This will report the pixel size of each layer PNG - I would like to know the largest sizes, and whether you think this is much larger than you intended.

Can you then analyze the .PNG file with the largest pixel size and the .PNG with the biggest file size (grano.png) in GIMP? I would like to know if either of them has a huge area of blank space (more than 70%). If you see lots of blank space, please also increase the alpha channel (http://maxy.homeip.net/misc/increase_alpha.jpg) to check if there are a lot of very faint brush dabs hidden.

Martin Renold <martinxyz>
Project Administrator
Tue 23 Jul 2013 09:54:15 PM UTC, comment #4:

I updated mypaint with latest sources.
(Now I'm on my notebook dell XPS ubuntu 12.04 32 bit, 4Gb ram)
I loaded the illustration, I removed three not interesting layers and I tried to save but I had this error (with stack trace a bit longer than previous):

Traceback (most recent call last):
File "/usr/local/share/mypaint/gui/filehandling.py", line 416, save_cb(self=<gui.filehandling.FileHandler object>, action=<Action object at 0x9680dc4 (GtkAction at 0x96a5740)>)
else:
self.save_file(self.filename)
variables: {'self.save_file': ('local', <bound method FileHandler.wrapper of <gui.filehandling.FileHandler object at 0x93c57ac>>), 'self.filename': ('local', u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora')}
File "/usr/local/share/mypaint/gui/drawwindow.py", line 55, wrapper(self=<gui.filehandling.FileHandler object>, args=(u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora',), *kwargs={})
try:
func(self, args, *kwargs)
# gtk main loop may be called in here...
variables: {'self': ('local', <gui.filehandling.FileHandler object at 0x93c57ac>), 'args': ('local', (u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora',)), 'func': ('local', <function save_file at 0x9614b54>), 'kwargs': ('local', {})}
File "/usr/local/share/mypaint/gui/filehandling.py", line 261, save_file(self=<gui.filehandling.FileHandler object>, filename=u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora', export=False, **options={})
def save_file(self, filename, export=False, **options):
thumbnail_pixbuf = self.save_doc_to_file(filename, self.doc, export=export, **options)
if "multifile" in options or not os.path.isfile(filename):
variables: {'thumbnail_pixbuf': (None, []), 'self.doc': ('local', <gui.document.Document object at 0x96211cc>), 'filename': ('local', u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora'), 'export': ('local', False), 'self.save_doc_to_file': ('local', <bound method FileHandler.save_doc_to_file of <gui.filehandling.FileHandler object at 0x93c57ac>>), 'options': ('local', {})}
File "/usr/local/share/mypaint/gui/filehandling.py", line 298, save_doc_to_file(self=<gui.filehandling.FileHandler object>, filename=u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora', doc=<gui.document.Document object>, export=False, **options={})
w, h = tiledsurface.N, tiledsurface.N # TODO: support for other sizes
thumbnail_pixbuf = doc.model.save(filename, feedback_cb=self.gtk_main_tick, **options)
self.lastsavefailed = False
variables: {'thumbnail_pixbuf': ('local', None), 'self.gtk_main_tick': ('local', <function gtk_main_tick at 0x9614a74>), 'feedback_cb': (None, []), 'filename': ('local', u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora'), 'doc.model.save': ('local', <bound method Document.save of <lib.document.Document instance at 0x96211ec>>), 'options': ('local', {})}
File "/usr/local/share/mypaint/lib/document.py", line 531, save(self=<lib.document.Document instance>, filename=u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora', **kwargs={'feedback_cb': <function gtk_main_tick>})
try:
save(filename, **kwargs)
except GObject.GError, e:
variables: {'kwargs': ('local', {'feedback_cb': <function gtk_main_tick at 0x9614a74>}), 'save': ('local', <bound method Document.save_ora of <lib.document.Document instance at 0x96211ec>>), 'filename': ('local', u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora')}
File "/usr/local/share/mypaint/lib/document.py", line 760, save_ora(self=<lib.document.Document instance>, filename=u'/home/gabri/Immagini/MyCreations/GranPaFarm/granpaFarm_150x70.ora', options=None, **kwargs={'feedback_cb': <function gtk_main_tick>})
thumbnail_pixbuf = self.render_thumbnail()
store_pixbuf(thumbnail_pixbuf, 'Thumbnails/thumbnail.png')
variables: {'thumbnail_pixbuf': (None, []), 'self.render_thumbnail': ('local', <bound method Document.render_thumbnail of <lib.document.Document instance at 0x96211ec>>)}
File "/usr/local/share/mypaint/lib/document.py", line 595, render_thumbnail(self=<lib.document.Document instance>)
pixbuf = self.render_as_pixbuf(x, y, w, h, mipmap_level=mipmap_level)
assert pixbuf.get_width() == w and pixbuf.get_height() == h
variables: {'h': ('local', 312), 'pixbuf': (None, []), 'mipmap_level': ('local', 4), 'w': ('local', 616), 'y': ('local', 72), 'x': ('local', 0), 'self.render_as_pixbuf': ('local', <bound method Document.render_as_pixbuf of <lib.document.Document instance at 0x96211ec>>)}
File "/usr/local/share/mypaint/lib/document.py", line 582, render_as_pixbuf(self=<lib.document.Document instance>, args=(0, 72, 616, 312), *kwargs={'mipmap_level': 4})
def render_as_pixbuf(self, args, *kwargs):
return pixbufsurface.render_as_pixbuf(self, args, *kwargs)
variables: {'pixbufsurface.render_as_pixbuf': ('global', <function render_as_pixbuf at 0x948c6bc>), 'self': ('local', <lib.document.Document instance at 0x96211ec>), 'args': ('local', (0, 72, 616, 312)), 'kwargs': ('local', {'mipmap_level': 4})}
File "/usr/local/share/mypaint/lib/pixbufsurface.py", line 126, render_as_pixbuf(surface=<lib.document.Document instance>, rect=(0, 72, 616, 312), *kwargs={'mipmap_level': 4})
with s.tile_request(tx, ty, readonly=False) as dst:
surface.blit_tile_into(dst, alpha, tx, ty, mipmap_level=mipmap_level)
if feedback_cb and tn % TILES_PER_CALLBACK == 0:
variables: {'tx': ('local', 1), 'ty': ('local', 2), 'dst': ('local', array([[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
...,
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]],

[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
...,
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]],

[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
...,
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]],

...,
[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
...,
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]],

[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
...,
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]],

[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
...,
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]], dtype=uint8)), 'mipmap_level': ('local', 4), 'alpha': ('local', False), 'surface.blit_tile_into': ('local', <bound method Document.blit_tile_into of <lib.document.Document instance at 0x96211ec>>)}
File "/usr/local/share/mypaint/lib/document.py", line 388, blit_tile_into(self=<lib.document.Document instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4, layers=[<lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>, <lib.layer.Layer instance>], background=<lib.tiledsurface.Background instance>)
for layer in layers:
layer.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level)
variables: {'tx': ('local', 1), 'ty': ('local', 2), 'dst_has_alpha': ('local', False), 'dst': ('local', array([[[12923, 28006, 31143, 32768],
[13028, 28023, 31152, 32768],
[13156, 28034, 31124, 32768],
...,
[30581, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12781, 27798, 31137, 32768],
[12888, 27822, 31153, 32768],
[13341, 27813, 30709, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12687, 27611, 31132, 32768],
[12879, 27598, 31046, 32768],
[14374, 27559, 29311, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30581, 27240, 8608, 32768]],

...,
[[30645, 27091, 11575, 32768],
[30652, 27113, 11810, 32768],
[30680, 27169, 12195, 32768],
...,
[28938, 25338, 8875, 32768],
[29054, 25466, 8852, 32768],
[25090, 20184, 7727, 32768]],

[[30611, 27035, 11397, 32768],
[30652, 27076, 11599, 32768],
[30717, 27246, 12213, 32768],
...,
[24564, 18786, 7280, 32768],
[22957, 16607, 6576, 32768],
[20885, 13989, 5539, 32768]],

[[30612, 27030, 11407, 32768],
[30595, 26947, 11153, 32768],
[30684, 27160, 11938, 32768],
...,
[26224, 21739, 8475, 32768],
[25525, 20621, 7839, 32768],
[25608, 20825, 7990, 32768]]], dtype=uint16)), 'layer.composite_tile': ('local', <bound method Layer.composite_tile of <lib.layer.Layer instance at 0x93e46ac>>), 'mipmap_level': ('local', 4)}
File "/usr/local/share/mypaint/lib/layer.py", line 216, composite_tile(self=<lib.layer.Layer instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4)
opacity=self.effective_opacity,
mode=self.compositeop
)
variables: {'self.compositeop': ('local', 'svg:src-over'), 'mode': (None, [])}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 323, composite_tile(self=<lib.tiledsurface.MyPaintSurface instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4, opacity=0.0, mode='svg:src-over')
if self.mipmap_level < mipmap_level:
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
if not (tx,ty) in self.tiledict:
variables: {'opacity': ('local', 0.0), 'tx': ('local', 1), 'ty': ('local', 2), 'dst_has_alpha': ('local', False), 'dst': ('local', array([[[12923, 28006, 31143, 32768],
[13028, 28023, 31152, 32768],
[13156, 28034, 31124, 32768],
...,
[30581, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12781, 27798, 31137, 32768],
[12888, 27822, 31153, 32768],
[13341, 27813, 30709, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12687, 27611, 31132, 32768],
[12879, 27598, 31046, 32768],
[14374, 27559, 29311, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30581, 27240, 8608, 32768]],

...,
[[30645, 27091, 11575, 32768],
[30652, 27113, 11810, 32768],
[30680, 27169, 12195, 32768],
...,
[28938, 25338, 8875, 32768],
[29054, 25466, 8852, 32768],
[25090, 20184, 7727, 32768]],

[[30611, 27035, 11397, 32768],
[30652, 27076, 11599, 32768],
[30717, 27246, 12213, 32768],
...,
[24564, 18786, 7280, 32768],
[22957, 16607, 6576, 32768],
[20885, 13989, 5539, 32768]],

[[30612, 27030, 11407, 32768],
[30595, 26947, 11153, 32768],
[30684, 27160, 11938, 32768],
...,
[26224, 21739, 8475, 32768],
[25525, 20621, 7839, 32768],
[25608, 20825, 7990, 32768]]], dtype=uint16)), 'mipmap_level': ('local', 4), 'self.mipmap.composite_tile': ('local', <bound method MyPaintSurface.composite_tile of <lib.tiledsurface.MyPaintSurface instance at 0xa8d5b8c>>), 'mode': ('local', 'svg:src-over')}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 323, composite_tile(self=<lib.tiledsurface.MyPaintSurface instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4, opacity=0.0, mode='svg:src-over')
if self.mipmap_level < mipmap_level:
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
if not (tx,ty) in self.tiledict:
variables: {'opacity': ('local', 0.0), 'tx': ('local', 1), 'ty': ('local', 2), 'dst_has_alpha': ('local', False), 'dst': ('local', array([[[12923, 28006, 31143, 32768],
[13028, 28023, 31152, 32768],
[13156, 28034, 31124, 32768],
...,
[30581, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12781, 27798, 31137, 32768],
[12888, 27822, 31153, 32768],
[13341, 27813, 30709, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12687, 27611, 31132, 32768],
[12879, 27598, 31046, 32768],
[14374, 27559, 29311, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30581, 27240, 8608, 32768]],

...,
[[30645, 27091, 11575, 32768],
[30652, 27113, 11810, 32768],
[30680, 27169, 12195, 32768],
...,
[28938, 25338, 8875, 32768],
[29054, 25466, 8852, 32768],
[25090, 20184, 7727, 32768]],

[[30611, 27035, 11397, 32768],
[30652, 27076, 11599, 32768],
[30717, 27246, 12213, 32768],
...,
[24564, 18786, 7280, 32768],
[22957, 16607, 6576, 32768],
[20885, 13989, 5539, 32768]],

[[30612, 27030, 11407, 32768],
[30595, 26947, 11153, 32768],
[30684, 27160, 11938, 32768],
...,
[26224, 21739, 8475, 32768],
[25525, 20621, 7839, 32768],
[25608, 20825, 7990, 32768]]], dtype=uint16)), 'mipmap_level': ('local', 4), 'self.mipmap.composite_tile': ('local', <bound method MyPaintSurface.composite_tile of <lib.tiledsurface.MyPaintSurface instance at 0xa8d59ec>>), 'mode': ('local', 'svg:src-over')}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 323, composite_tile(self=<lib.tiledsurface.MyPaintSurface instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4, opacity=0.0, mode='svg:src-over')
if self.mipmap_level < mipmap_level:
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
if not (tx,ty) in self.tiledict:
variables: {'opacity': ('local', 0.0), 'tx': ('local', 1), 'ty': ('local', 2), 'dst_has_alpha': ('local', False), 'dst': ('local', array([[[12923, 28006, 31143, 32768],
[13028, 28023, 31152, 32768],
[13156, 28034, 31124, 32768],
...,
[30581, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12781, 27798, 31137, 32768],
[12888, 27822, 31153, 32768],
[13341, 27813, 30709, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12687, 27611, 31132, 32768],
[12879, 27598, 31046, 32768],
[14374, 27559, 29311, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30581, 27240, 8608, 32768]],

...,
[[30645, 27091, 11575, 32768],
[30652, 27113, 11810, 32768],
[30680, 27169, 12195, 32768],
...,
[28938, 25338, 8875, 32768],
[29054, 25466, 8852, 32768],
[25090, 20184, 7727, 32768]],

[[30611, 27035, 11397, 32768],
[30652, 27076, 11599, 32768],
[30717, 27246, 12213, 32768],
...,
[24564, 18786, 7280, 32768],
[22957, 16607, 6576, 32768],
[20885, 13989, 5539, 32768]],

[[30612, 27030, 11407, 32768],
[30595, 26947, 11153, 32768],
[30684, 27160, 11938, 32768],
...,
[26224, 21739, 8475, 32768],
[25525, 20621, 7839, 32768],
[25608, 20825, 7990, 32768]]], dtype=uint16)), 'mipmap_level': ('local', 4), 'self.mipmap.composite_tile': ('local', <bound method MyPaintSurface.composite_tile of <lib.tiledsurface.MyPaintSurface instance at 0xa8d592c>>), 'mode': ('local', 'svg:src-over')}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 323, composite_tile(self=<lib.tiledsurface.MyPaintSurface instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4, opacity=0.0, mode='svg:src-over')
if self.mipmap_level < mipmap_level:
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
if not (tx,ty) in self.tiledict:
variables: {'opacity': ('local', 0.0), 'tx': ('local', 1), 'ty': ('local', 2), 'dst_has_alpha': ('local', False), 'dst': ('local', array([[[12923, 28006, 31143, 32768],
[13028, 28023, 31152, 32768],
[13156, 28034, 31124, 32768],
...,
[30581, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12781, 27798, 31137, 32768],
[12888, 27822, 31153, 32768],
[13341, 27813, 30709, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768]],

[[12687, 27611, 31132, 32768],
[12879, 27598, 31046, 32768],
[14374, 27559, 29311, 32768],
...,
[30580, 27240, 8608, 32768],
[30580, 27240, 8608, 32768],
[30581, 27240, 8608, 32768]],

...,
[[30645, 27091, 11575, 32768],
[30652, 27113, 11810, 32768],
[30680, 27169, 12195, 32768],
...,
[28938, 25338, 8875, 32768],
[29054, 25466, 8852, 32768],
[25090, 20184, 7727, 32768]],

[[30611, 27035, 11397, 32768],
[30652, 27076, 11599, 32768],
[30717, 27246, 12213, 32768],
...,
[24564, 18786, 7280, 32768],
[22957, 16607, 6576, 32768],
[20885, 13989, 5539, 32768]],

[[30612, 27030, 11407, 32768],
[30595, 26947, 11153, 32768],
[30684, 27160, 11938, 32768],
...,
[26224, 21739, 8475, 32768],
[25525, 20621, 7839, 32768],
[25608, 20825, 7990, 32768]]], dtype=uint16)), 'mipmap_level': ('local', 4), 'self.mipmap.composite_tile': ('local', <bound method MyPaintSurface.composite_tile of <lib.tiledsurface.MyPaintSurface instance at 0xa8d588c>>), 'mode': ('local', 'svg:src-over')}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 327, composite_tile(self=<lib.tiledsurface.MyPaintSurface instance>, dst=array([[[12923, 28006, 31143, 32768],
[1... [25608, 20825, 7990, 32768]]], dtype=uint16), dst_has_alpha=False, tx=1, ty=2, mipmap_level=4, opacity=0.0, mode='svg:src-over')
with self.tile_request(tx, ty, readonly=True) as src:
func = svg2composite_func[mode]
variables: {'src': (None, []), 'tx': ('local', 1), 'ty': ('local', 2), 'readonly': (None, []), 'self.tile_request': ('local', <bound method MyPaintSurface.tile_request of <lib.tiledsurface.MyPaintSurface instance at 0xa8d588c>>), 'True': ('builtin', True)}
File "/usr/lib/python2.7/contextlib.py", line 17, _enter_(self=<contextlib.GeneratorContextManager object>)
try:
return self.gen.next()
except StopIteration:
variables: {'self.gen.next': ('local', <method-wrapper 'next' of generator object at 0x9cd58ec>)}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 224, tile_request(self=<lib.tiledsurface.MyPaintSurface instance>, tx=1, ty=2, readonly=True)
numpy_tile = self._get_tile_numpy(tx, ty, readonly)
yield numpy_tile
variables: {'numpy_tile': (None, []), 'self._get_tile_numpy': ('local', <bound method MyPaintSurface._get_tile_numpy of <lib.tiledsurface.MyPaintSurface instance at 0xa8d588c>>), 'readonly': ('local', True), 'tx': ('local', 1), 'ty': ('local', 2)}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 265, _get_tile_numpy(self=<lib.tiledsurface.MyPaintSurface instance>, tx=1, ty=2, readonly=True)
if t is mipmap_dirty_tile:
t = self._regenerate_mipmap(t, tx, ty)
if t.readonly and not readonly:
variables: {'self._regenerate_mipmap': ('local', <bound method MyPaintSurface._regenerate_mipmap of <lib.tiledsurface.MyPaintSurface instance at 0xa8d588c>>), 't': ('local', <lib.tiledsurface.Tile instance at 0x948e44c>), 'tx': ('local', 1), 'ty': ('local', 2)}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 237, _regenerate_mipmap(self=<lib.tiledsurface.MyPaintSurface instance>, t=<lib.tiledsurface.Tile instance>, tx=1, ty=2)
if src is mipmap_dirty_tile:
src = self.parent._regenerate_mipmap(src, tx*2 + x, ty*2 + y)
mypaintlib.tile_downscale_rgba16(src.rgba, t.rgba, x*N/2, y*N/2)
variables: {'src': ('local', <lib.tiledsurface.Tile instance at 0x948e44c>), 'tx': ('local', 1), 'ty': ('local', 2), 'self.parent._regenerate_mipmap': ('local', <bound method MyPaintSurface._regenerate_mipmap of <lib.tiledsurface.MyPaintSurface instance at 0xa8d592c>>), 'y': ('local', 0), 'x': ('local', 0)}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 237, _regenerate_mipmap(self=<lib.tiledsurface.MyPaintSurface instance>, t=<lib.tiledsurface.Tile instance>, tx=2, ty=4)
if src is mipmap_dirty_tile:
src = self.parent._regenerate_mipmap(src, tx*2 + x, ty*2 + y)
mypaintlib.tile_downscale_rgba16(src.rgba, t.rgba, x*N/2, y*N/2)
variables: {'src': ('local', <lib.tiledsurface.Tile instance at 0x948e44c>), 'tx': ('local', 2), 'ty': ('local', 4), 'self.parent._regenerate_mipmap': ('local', <bound method MyPaintSurface._regenerate_mipmap of <lib.tiledsurface.MyPaintSurface instance at 0xa8d59ec>>), 'y': ('local', 0), 'x': ('local', 0)}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 229, _regenerate_mipmap(self=<lib.tiledsurface.MyPaintSurface instance>, t=<lib.tiledsurface.Tile instance>, tx=4, ty=8)
def _regenerate_mipmap(self, t, tx, ty):
t = Tile()
self.tiledict[(tx, ty)] = t
variables: {'Tile': ('global', <class lib.tiledsurface.Tile at 0x948835c>), 't': ('local', <lib.tiledsurface.Tile instance at 0x948e44c>)}
File "/usr/local/share/mypaint/lib/tiledsurface.py", line 39, _init_(self=<lib.tiledsurface.Tile instance>, copy_from=None)
if copy_from is None:
self.rgba = zeros((N, N, 4), 'uint16')
else:
MemoryError:

Gabriele <stramaz2>
Tue 23 Jul 2013 01:10:01 PM UTC, comment #3:

Thank you very much for your quick reply.

I attach the stack.xml file.

Some more information (dimensions) about the files inside the ora "package":

$ ls -lRsh
.:
total 16K
4.0K drwxrwxr-x 2 myname myname 4.0K Jul 23 14:59 data
4.0K -rw-r--r-- 1 myname myname 16 Jan 1 1980 mimetype
4.0K -rw-r--r-- 1 myname myname 1.7K Jan 1 1980 stack.xml
4.0K drwxrwxr-x 2 myname myname 4.0K Jul 23 14:59 Thumbnails

./data:
total 101M
836K -rw-rw-r-- 1 myname myname 836K Jul 22 14:51 background #1.png
792K -rw-rw-r-- 1 myname myname 792K Jul 22 14:51 background #2.png
836K -rw-rw-r-- 1 myname myname 836K Jul 22 14:51 background.png
12M -rw-rw-r-- 1 myname myname 12M Jul 22 14:50 bozza.png
312K -rw-rw-r-- 1 myname myname 312K Jul 22 14:51 case.png
9.2M -rw-rw-r-- 1 myname myname 9.2M Jul 22 14:51 cieloburn.png
19M -rw-rw-r-- 1 myname myname 19M Jul 22 14:51 cielo.png
8.5M -rw-rw-r-- 1 myname myname 8.5M Jul 22 14:51 grano light.png
35M -rw-rw-r-- 1 myname myname 35M Jul 22 14:51 grano.png
696K -rw-rw-r-- 1 myname myname 695K Jul 22 14:51 grano up1.png
472K -rw-rw-r-- 1 myname myname 469K Jul 22 14:51 hi light.png
1.9M -rw-rw-r-- 1 myname myname 1.9M Jul 22 14:51 monti.png
4.2M -rw-rw-r-- 1 myname myname 4.2M Jul 22 14:51 nuvole.png
1.7M -rw-rw-r-- 1 myname myname 1.7M Jul 22 14:51 people.png
676K -rw-rw-r-- 1 myname myname 676K Jul 22 14:51 Sfondo.png
6.8M -rw-rw-r-- 1 myname myname 6.8M Jul 22 14:51 verde.png

./Thumbnails:
total 60K
60K -rw-rw-r-- 1 myname myname 57K Jul 22 14:52 thumbnail.png

(file #18394)

Gabriele <stramaz2>
Tue 23 Jul 2013 11:30:23 AM UTC, comment #2:

Also, you can try to create a swap file and activate it, so MyPaint has more RAM available, e.g. here is a howto: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04

Probably not a "real" solution, and be warned that excessive swapping could make your system so slow that it crashes, if MyPaint should just request more and more RAM without stopping.

(PS: please only test with 1.1.0 if you have memory problem, I think we made quite some improvement there, but maybe not enough.)

Martin Renold <martinxyz>
Project Administrator
Tue 23 Jul 2013 11:20:25 AM UTC, comment #1:

As a quick workaround, you can rename the .ORA to .ZIP and you will find the individual layers inside as .PNG files.

Can you please report the size of the individual files inside this .ZIP file in the "data" directory (.png and .dat files)? Also, please attache the stack.xml file (from the ZIP) to this bugreport.

Martin Renold <martinxyz>
Project Administrator
Tue 23 Jul 2013 11:04:43 AM UTC, original submission:

Hello,
I was painting a quite big illustration using mypaint (my target is to print it), my file was growing and now it's a 105MB. So far so good, everything was fine.
But now I cannot do anything with mypaint, it crashes almost immediately after it loads (I have a popup "A programming error has been detected." and a Traceback, at the end it's written "MemoryError"; I attach it at the end of the message).
I have the same behavior with the version 1.1.0 (until now I've painted with the 1.0.0) installed in another (Ubuntu) notebook.

Unfortunately this is blocking me working on my illustration, if I cannot find a solution I need to move on an alternative software (and I would be very sorry for that because mypaint works really fine!).

Basic system information:
Notebook fujitsu Lifebook A series
Intel core i5
4GB ram
Ubuntu 12.04 (32 bit)
mypaint 1.1.0
ora file 105MB (with more or less 10 layers)

I found a similar ticket but it was closed because the user did not give enough information (#19752).
If you need more information (system, ora file, ...) let me know.

Traceback:

Exception while analyzing the exception.
Traceback (most recent call last):
File "/usr/share/mypaint/gui/tileddrawwidget.py", line 588, in expose_cb
self.repaint(cr, event.area)
File "/usr/share/mypaint/gui/tileddrawwidget.py", line 659, in repaint
self.render_execute(cr, surface, sparse, mipmap_level, clip_region)
File "/usr/share/mypaint/gui/tileddrawwidget.py", line 802, in render_execute
self.doc.render_into(surface, tiles, mipmap_level, layers, background)
File "/usr/share/mypaint/lib/document.py", line 357, in render_into
self.blit_tile_into(dst, False, tx, ty, mipmap_level, layers, background)
File "/usr/share/mypaint/lib/document.py", line 376, in blit_tile_into
layer.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level)
File "/usr/share/mypaint/lib/layer.py", line 213, in composite_tile
mode=self.compositeop
File "/usr/share/mypaint/lib/tiledsurface.py", line 261, in composite_tile
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
File "/usr/share/mypaint/lib/tiledsurface.py", line 261, in composite_tile
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
File "/usr/share/mypaint/lib/tiledsurface.py", line 261, in composite_tile
return self.mipmap.composite_tile(dst, dst_has_alpha, tx, ty, mipmap_level, opacity, mode)
File "/usr/share/mypaint/lib/tiledsurface.py", line 265, in composite_tile
with self.tile_request(tx, ty, readonly=True) as src:
File "/usr/lib/python2.7/contextlib.py", line 17, in _enter_
return self.gen.next()
File "/usr/share/mypaint/lib/tiledsurface.py", line 172, in tile_request
numpy_tile = self._get_tile_numpy(tx, ty, readonly)
File "/usr/share/mypaint/lib/tiledsurface.py", line 200, in _get_tile_numpy
with self.parent.tile_request(tx*2 + x, ty*2 + y, True) as src:
File "/usr/lib/python2.7/contextlib.py", line 17, in _enter_
return self.gen.next()
File "/usr/share/mypaint/lib/tiledsurface.py", line 172, in tile_request
numpy_tile = self._get_tile_numpy(tx, ty, readonly)
File "/usr/share/mypaint/lib/tiledsurface.py", line 195, in _get_tile_numpy
t = Tile()
File "/usr/share/mypaint/lib/tiledsurface.py", line 35, in _init_
self.rgba = zeros((N, N, 4), 'uint16')
MemoryError

Gabriele <stramaz2>

 

Attached Files
file #18401:  grano_small.png added by stramaz2 (348kB - image/png)
file #18394:  stack.xml added by stramaz2 (2kB - text/xml)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by stramaz2 (Submitted the item)
  • -unavailable- added by stramaz2
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Jun 2014 05:24:30 PM UTCachadwickOpen/ClosedOpen=>Closed
    Mon 05 Aug 2013 12:44:15 AM UTCachadwickSeverity5 - Blocker=>2 - Minor
    Wed 24 Jul 2013 06:30:24 PM UTCmartinxyzStatusNeed Info=>None
    Wed 24 Jul 2013 07:31:05 AM UTCstramaz2Attached File-=>Added grano_small.png, #18401
    Tue 23 Jul 2013 01:10:01 PM UTCstramaz2Attached File-=>Added stack.xml, #18394
    Tue 23 Jul 2013 11:20:25 AM UTCmartinxyzStatusNone=>Need Info
    Tue 23 Jul 2013 11:04:43 AM UTCstramaz2Carbon-Copy-=>Added stramaz2
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup