[Pkg-phototools-devel] Bug#958506: trimage hangs when processing certain jpeg files

Cody Brownstein cbrownstein at liquidityllc.com
Thu Apr 23 04:08:52 BST 2020

Package: trimage
Version: 1.0.6-1
Severity: important

Dear Maintainer,

trimage hangs when processing certain jpeg files. An example jpeg[1] is
attached. trimage must then be terminated (Ctrl+C).

[1]: Source: https://avatars.githubusercontent.com/u/41970

Below is a log file:

--- begin log ---
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
 pngcrush 1.8.13, uses libpng 1.6.36 and zlib 1.2.11
 Check http://pmt.sf.net/
 for the most recent version.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/trimage/ThreadPool/ThreadPool.py", line 90, in execute
    return_value = self.callable(*self.arguments) #IGNORE:W0142
  File "/usr/lib/python3/dist-packages/trimage/trimage.py", line 381, in compress
    copy(self.fullpath, backupfullpath)
  File "/usr/lib/python3.8/shutil.py", line 415, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 241, in copyfile
    raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/tmp/41970.jpeg' and '/tmp/41970.jpeg' are the same file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
  File "/usr/lib/python3/dist-packages/trimage/ThreadPool/ThreadPool.py", line 131, in run
  File "/usr/lib/python3/dist-packages/trimage/ThreadPool/ThreadPool.py", line 93, in execute
    logger.warning("A job in the ThreadPool raised an exception: ", excep)
  File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1577, in _log
  File "/usr/lib/python3.8/logging/__init__.py", line 1587, in handle
  File "/usr/lib/python3.8/logging/__init__.py", line 1648, in callHandlers
    if record.levelno >= hdlr.level:
AttributeError: '_io.TextIOWrapper' object has no attribute 'level'
Traceback (most recent call last):
  File "/usr/bin/trimage", line 23, in <module>
    subprocess.call([sys.executable, path] + sys.argv[1:])
  File "/usr/lib/python3.8/subprocess.py", line 342, in call
    return p.wait(timeout=timeout)
  File "/usr/lib/python3.8/subprocess.py", line 1079, in wait
    return self._wait(timeout=timeout)
  File "/usr/lib/python3.8/subprocess.py", line 1804, in _wait
    (pid, sts) = self._try_wait(0)
  File "/usr/lib/python3.8/subprocess.py", line 1762, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
--- end log ---

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.5.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages trimage depends on:
ii  advancecomp    2.1-2.1
ii  jpegoptim      1.4.6-1
ii  optipng        0.7.7-1+b1
ii  pngcrush       1.8.13-0.1
ii  python3        3.8.2-3
ii  python3-pyqt5  5.14.2+dfsg-1+b1

trimage recommends no packages.

trimage suggests no packages.

-- no debconf information

More information about the Pkg-phototools-devel mailing list