Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 09-18-2019, 07:27 PM   #1
ratinox
Fanatic
ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.
 
Posts: 531
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
CBZ conversion crashes with large images

I would provide a conversion log but there isn't one. ebook-convert -d crashes during the rendering phase without writing anything but the README.txt. This is large (500MB-1GB) CBZ files with high resolution PNG images (3550x4950 up to 10115x14450). Humble Bundle can deliver quite high resolution scans. The Python traceback isn't much help to me:

Code:
5% Rendered /tmp/calibre_3.39.1_tmp_ULi06y/q46NYH_comic_extract/v01/004.png
5% Rendered /tmp/calibre_3.39.1_tmp_ULi06y/q46NYH_comic_extract/v01/063.png
Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 391, in main
    plumber.run()
  File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 1106, in run
    accelerators, tdir)
  File "/usr/lib/calibre/calibre/customize/conversion.py", line 244, in __call__
    log, accelerators)
  File "/usr/lib/calibre/calibre/ebooks/conversion/plugins/comic_input.py", line 182, in convert
    pages = self.get_pages(fname, cdir)
  File "/usr/lib/calibre/calibre/ebooks/conversion/plugins/comic_input.py", line 146, in get_pages
    self.report_progress, tdir2)
  File "/usr/lib/calibre/calibre/ebooks/comic/input.py", line 271, in process_pages
    job.log_file.read())
Exception: Failed to process comic:
I can downscale with ImageMagick and then feed into ebook-convert but IM requires increased memory, map, area etc. limits in policy.xml from Debian's defaults so I'm wondering if there's a memory allocation limit I'm hitting in Calibre. 64-bit version if it matters.
ratinox is offline   Reply With Quote
Old 09-18-2019, 08:30 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
First of use the official binaries, not the debian package. Then if you are still getting a crash, get a backtrace. I'm not familiar with how one does it on debian, but on a systemd based distro, something like

echo bt | coredumpctl gdb

And calibre has no allocation limits, it just uses system malloc
kovidgoyal is offline   Reply With Quote
Old 09-19-2019, 10:02 AM   #3
ratinox
Fanatic
ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.
 
Posts: 531
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
Quote:
Originally Posted by kovidgoyal View Post
First of use the official binaries, not the debian package. Then if you are still getting a crash, get a backtrace. I'm not familiar with how one does it on debian, but on a systemd based distro, something like

echo bt | coredumpctl gdb

And calibre has no allocation limits, it just uses system malloc
Will try that and let you know how it goes. Thank you.
ratinox is offline   Reply With Quote
Old 09-19-2019, 11:13 AM   #4
ratinox
Fanatic
ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.
 
Posts: 531
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
Tried current and it doesn't crash! Yay!
It's a memory exhaustion problem. Boo.

Code:
Rendered /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/048.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/049.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/050.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/051.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/052.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/053.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/054.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/055.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/056.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/057.png
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/058.png
Rendered /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/059.jpg
Rendered /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/060.jpg
Rendered /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/061.jpg
Rendered /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/062.jpg
QImage: out of memory, returning null image
Failed /tmp/calibre_3.48.0_tmp_gttcnB/UUtd8B_comic_extract/v01/063.png
So looks like my options are to rewrite the rendering process to use RAM more efficiently and don't do that. I'll stick with "don't do that" for now.

Thanks.
ratinox is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CBZ Images Auto Rotating sekazi Kobo Reader 5 03-08-2019 03:58 PM
CC on iPad Crashes with large file karl1c Calibre Companion 2 07-13-2017 01:05 PM
CBZ to MOBI -> Getting distorted images Skeeve Conversion 4 04-14-2014 02:27 PM
How to Modify large Images without conversion mehetabelo Plugins 4 03-31-2014 08:07 PM
.cbz conversion hangs roguesith Conversion 5 12-10-2011 03:14 AM


All times are GMT -4. The time now is 10:35 AM.


MobileRead.com is a privately owned, operated and funded community.