"Out of memory error" with "Error in JPX stream" and "Error: invalid width/height"
Submitted by Russell J
Link to original bug (#761214)
Description
Using Evince Document Viewer 2.32.0.145 (from PortableApps.com), I received an "Out of memory" message: when I tried to programatically (with a Python script) open a "fuzzed" version of the PDF file (5,009 KB The_Practical_Spelling_book_with_Reading.pdf (which I believe was originally from Google Books) with Evince.
By "fuzzed", I mean that 1 byte of the file had been randomly changed.
Note that (successfully) opening the original version of the PDF file resulted in the following being written to stdout/stderr:
Error: No display font for 'ArialNarrow'
Error: No display font for 'ArialNarrow,Bold'
Error: No display font for 'ArialNarrow,Italic'
Error: No display font for 'ArialNarrow,BoldItalic'
Error: No display font for 'ArialNarrow-Bold'
Error: No display font for 'ArialNarrow-Italic'
Error: No display font for 'ArialNarrow-BoldItalic'
Error: No display font for 'HelveticaNarrow'
Error: No display font for 'HelveticaNarrow,Bold'
Error: No display font for 'HelveticaNarrow,Italic'
Error: No display font for 'HelveticaNarrow,BoldItalic'
Error: No display font for 'HelveticaNarrow-Bold'
Error: No display font for 'HelveticaNarrow-Italic'
Error: No display font for 'HelveticaNarrow-BoldItalic'
Error: No display font for 'BookAntiqua'
Error: No display font for 'BookAntiqua,Bold'
Error: No display font for 'BookAntiqua,Italic'
Error: No display font for 'BookAntiqua,BoldItalic'
Error: No display font for 'BookAntiqua-Bold'
Error: No display font for 'BookAntiqua-Italic'
Error: No display font for 'BookAntiqua-BoldItalic'
Error (39895): Error in JPX stream
Error (96797): Error in JPX stream
and that opening the fuzzed version did not have "Error (96797): Error in JPX stream", but instead added:
Error: invalid width/height
Out of memory
Once I have the Bug #, I will put copies of the original and fuzzed versions of the PDF file in an appropriately named folder on Google Drive, along with:
The corresponding .outerr (stdout/stderr) files.
A screenshot of a WinMerge comparison of the 2 PDF files.
Here's the "guts" of my Python code:
app = r'Evince\bin\Evince.exe'
fn_process_outerr = '%s.outerr' % os.path.splitext(os.path.basename(pdf_file))[0]
with open(fn_process_outerr, 'w') as f_process_outerr:
process = subprocess.Popen([app, pdf_file],
stdout=f_process_outerr, stderr=f_process_outerr)
time.sleep(5)
poll_code = process.poll()
if poll_code:
print('Evince crashed with return code: %d.' % poll_code)
which printed "Evince crashed with return code: 1."
Version: 2.32.x