We generate large collage image files for printing.
thumbgen consistently crashes on a directory containing a 24213x14173 pixel 200Mbyte image. All images are valid jpegs and can be opened and viewed using 'feh'
Setup: AMD 4750G / 32GB RAM / 512GB SSD / 50TB NAS / Fedora 37
Error message:
$ thumbgen -i -r -d /imgs/prn_420x240cm_color
Found 1 files in the directory: /filer/imgs/prn_420x240cm_color
Found 1 images
0%| | 0/1 [00:00<?, ?it/s]
2022-12-31 10:12:31.215 | ERROR | thumbgen.thumbgen:main:94 - An error has been caught in function 'main', process 'MainProcess' (4133634), thread 'MainThread' (140614882113344):
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/thumbgen/thumbgen.py", line 39, in make_thumbnail
thumbnail = factory.generate_thumbnail(uri, mime_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-spawn-exit-error-quark: Child process exited with code 1 (1)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/thumbgen", line 8, in
sys.exit(main())
│ │ └
│ └
└ <module 'sys' (built-in)>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function BaseCommand.main at 0x7fe365efd620>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x7fe366296f90>
│ └ <function Command.invoke at 0x7fe365efcb80>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'only_images': True, 'recursive': True, 'img_dirs': '/imgs/prn_420x240cm_color', 'workers': 1}
│ │ │ │ └ <click.core.Context object at 0x7fe366296f90>
│ │ │ └ <function main at 0x7fe360b4f4c0>
│ │ └
│ └ <function Context.invoke at 0x7fe365efdc60>
└ <click.core.Context object at 0x7fe366296f90>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
│ │ └ {'only_images': True, 'recursive': True, 'img_dirs': '/imgs/prn_420x240cm_color', 'workers': 1}
│ └ ()
└ <function main at 0x7fe360b4f4c0>
File "/usr/local/lib/python3.11/site-packages/thumbgen/thumbgen.py", line 94, in main
thumbnail_folder(dir_path=img_dir, workers=workers, only_images=only_images, recursive=recursive)
│ │ │ │ │ │ │ └ True
│ │ │ │ │ │ └ True
│ │ │ │ │ └ True
│ │ │ │ └ True
│ │ │ └ 1
│ │ └ 1
│ └ PosixPath('/imgs/prn_420x240cm_color')
└ <function thumbnail_folder at 0x7fe360b4ef20>
File "/usr/local/lib/python3.11/site-packages/thumbgen/thumbgen.py", line 56, in thumbnail_folder
list(tqdm(p.imap(make_thumbnail, all_files), total=len(all_files)))
│ │ │ │ │ └ ['/imgs/prn_420x240cm_color/410x240cm_srgb_023_20211218_144233.jpg']
│ │ │ │ └ ['/imgs/prn_420x240cm_color/410x240cm_srgb_023_20211218_144233.jpg']
│ │ │ └ <function make_thumbnail at 0x7fe364580a40>
│ │ └ <function Pool.imap at 0x7fe360b88540>
│ └ <multiprocessing.pool.Pool state=TERMINATE pool_size=1>
└ <class 'tqdm.std.tqdm'>
File "/usr/lib/python3.11/site-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
└ <multiprocessing.pool.IMapIterator object at 0x7fe364718e90>
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 873, in next
raise value
└ GLib.Error('Child process exited with code 1', 'g-spawn-exit-error-quark', 1)
gi.repository.GLib.GError: g-spawn-exit-error-quark: Child process exited with code 1 (1)