calibre misbehaves when bad jpeg in mobi file

Bug #1404590 reported by Bruce Stevenson on 2014-12-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

calibre 2.13, 2.12 and…

Windows 8.0

Attached is an example of a .mobi file containing a corrupted Jpeg image that causes calibre to behave in a less-than-graceful manner.

File ShowJpegBug.mobi contains a corrupt .jpeg and very little else. I extracted the .jpeg from a real .mobi book that shows the same problems.

Problem 1. Drag the mobi into an open calibre library window. The worker process crashes with the message shown in AddMobiToLib.txt.

Problems 2 and 3. To demonstrate the next problems requires the mobi file to already be in the calibre library—in this case more difficult than usual!. To make it easier, I attach the equivalent epub file, ShowJpegBug.epub. I suggest drag the epub into the library then convert to mobi. Both these steps were uneventful for me.

Problem 2. Try to open the mobi in the built-in viewer and get the message "calibre-parallel.exe has stopped working"

Problem 3. Try to convert the mobi to azw3 (or probably anything else) and get the error shown in ConvMobiToAzw3.txt.

Conclusion. Bad images are always going to exist and it seems to me that calibre could handle them more gracefully. For example, accept them as is—as the internal viewer does when viewing the epub. Or display instead "Not a Valid Image" as the Files Browser does when you double-click the bad image.

As a new feature, might it be possible for the Check Book function (F7) to also check images? For this problem book it happily reports "No problems found", but there is a problem, just not in the html.

Attachments in zip file BadJpegInMobi.zip:
ShowJPegBug.mobi: The problem mobi file.
ShowJPegBug.epub: The non-problem epub file.
AddMobiToLib.txt: The error message when you try to add the mobi to the library.
ConvMobiToAzw3.txt: The error message when you try to convert the problem mobi.

Merry Christmas to Kovid and all on the calibre team.

Bruceee

Bruce Stevenson (bruceee) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers