Bug 688713 - [abrt] fonttools-2.3-2.fc14: sstruct.py:74:pack:error: integer out of range for 'L' format code
Summary: [abrt] fonttools-2.3-2.fc14: sstruct.py:74:pack:error: integer out of range f...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: fonttools
Version: 14
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:fe1ca5fc
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-17 19:36 UTC by Paul Flo Williams
Modified: 2011-06-30 09:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-30 09:44:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.49 KB, text/plain)
2011-03-17 19:36 UTC, Paul Flo Williams
no flags Details

Description Paul Flo Williams 2011-03-17 19:36:30 UTC
abrt version: 1.1.17
architecture: i686
cmdline: /usr/bin/python /usr/bin/ttx MTLmr3m.ttx
comment: ttx crashes after reporting that it is parsing the vmtx table. This is a very big font!
component: fonttools
executable: /usr/bin/ttx
kernel: 2.6.35.11-83.samsung.fc14.i686.PAE
package: fonttools-2.3-2.fc14
reason: sstruct.py:74:pack:error: integer out of range for 'L' format code
release: Fedora release 14 (Laughlin)
time: 1300390438
uid: 500

backtrace
-----
sstruct.py:74:pack:error: integer out of range for 'L' format code

Traceback (most recent call last):
  File "/usr/bin/ttx", line 11, in <module>
    ttx.main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttx.py", line 296, in main
    process(jobs, options)
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttx.py", line 281, in process
    action(input, output, options)
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttx.py", line 187, in ttCompile
    ttf.save(output)
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttLib/__init__.py", line 203, in save
    writer.close()
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttLib/sfnt.py", line 153, in close
    directory = directory + entry.toString()
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttLib/sfnt.py", line 224, in toString
    return sstruct.pack(sfntDirectoryEntryFormat, self)
  File "/usr/lib/python2.7/site-packages/FontTools/sstruct.py", line 74, in pack
    data = apply(struct.pack, (formatstring,) + tuple(elements))
error: integer out of range for 'L' format code

Local variables in innermost frame:
elements: ['OS/2', -613424631, 2824236, 86]
name: 'length'
format: '\n\t\t> # big endian\n\t\ttag:            4s\n\t\tcheckSum:       L\n\t\toffset:         L\n\t\tlength:         L\n'
object: {'checkSum': -613424631, 'length': 86, 'tag': 'OS/2', 'offset': 2824236}
fixes: {}
formatstring: '>4sLLL'
value: 86
names: ['tag', 'checkSum', 'offset', 'length']

How to reproduce
-----
1. Install motoya-lmaru-fonts
2. ttx MTLmr3m.ttf to convert to XML
3. ttx MTLmr3m.ttx to try to convert back to TTF

Comment 1 Paul Flo Williams 2011-03-17 19:36:33 UTC
Created attachment 486089 [details]
File: backtrace

Comment 2 Paul Flo Williams 2011-06-21 12:10:30 UTC
Anything happening here? ttx is completely broken on F14 right now.

Here is another simple reproducer:

$ cd
$ ttx -d . /usr/share/fonts/dejavu/DejaVuSans.ttf
$ ttx DejaVuSans.ttx 
Compiling "DejaVuSans.ttx" to "DejaVuSans.ttf"...
Parsing 'GlyphOrder' table...
Parsing 'head' table...
Parsing 'hhea' table...
Parsing 'maxp' table...
Parsing 'OS/2' table...
Parsing 'hmtx' table...
Parsing 'cmap' table...
Parsing 'fpgm' table...
Parsing 'prep' table...
Parsing 'cvt ' table...
Parsing 'loca' table...
Parsing 'glyf' table...
Parsing 'kern' table...
Parsing 'name' table...
Parsing 'post' table...
Parsing 'gasp' table...
Parsing 'FFTM' table...
Parsing 'GDEF' table...
Parsing 'GPOS' table...
Parsing 'GSUB' table...
Traceback (most recent call last):
  File "/usr/bin/ttx", line 11, in <module>
    ttx.main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttx.py", line 296, in main
    process(jobs, options)
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttx.py", line 281, in process
    action(input, output, options)
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttx.py", line 187, in ttCompile
    ttf.save(output)
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttLib/__init__.py", line 203, in save
    writer.close()
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttLib/sfnt.py", line 153, in close
    directory = directory + entry.toString()
  File "/usr/lib/python2.7/site-packages/FontTools/fontTools/ttLib/sfnt.py", line 224, in toString
    return sstruct.pack(sfntDirectoryEntryFormat, self)
  File "/usr/lib/python2.7/site-packages/FontTools/sstruct.py", line 74, in pack
    data = apply(struct.pack, (formatstring,) + tuple(elements))
struct.error: integer out of range for 'L' format code

Comment 3 Parag Nemade 2011-06-22 05:39:05 UTC
I don't have F14 machine with me now but on F15 I see no issues.

Comment 4 Paul Flo Williams 2011-06-22 06:00:28 UTC
Is that F15.i686?

Comment 5 Parag Nemade 2011-06-22 06:31:42 UTC
fonttools-2.3-3.fc15.x86_64

Comment 6 Parag Nemade 2011-06-22 06:37:45 UTC
Ok I managed to test on 32 bit machine also and it worked fine.

Comment 7 Paul Flo Williams 2011-06-23 07:56:52 UTC
I've updated my laptop to F15 32-bit this morning, and I can confirm that the problem no longer occurs.

This must be down to something in the core Python libraries, then. As soon as my desktop goes to F15, I'll no longer care!

Comment 8 Parag Nemade 2011-06-30 09:44:41 UTC
Thanks.


Note You need to log in before you can comment on or make changes to this bug.