[liblouis-liblouisxml] Re: Crash in Python hyphenation

  • From: Milan Zamazal <pdm@xxxxxxxxxxxx>
  • To: Christian Egli <christian.egli@xxxxxx>
  • Date: Tue, 05 Jun 2012 08:28:18 +0200

>>>>> "CE" == Christian Egli <christian.egli@xxxxxx> writes:

    CE> Can you produce a core dump and open it with gdb?

(gdb) r -c 'import louis; print louis.hyphenate(["en-us-g1.utb", 
"hyph_en_US.dic"], u"straightforward")'
Starting program: /usr/bin/python-dbg -c 'import louis; print 
louis.hyphenate(["en-us-g1.utb", "hyph_en_US.dic"], u"straightforward")'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000004b2f81 in subtype_dealloc (self=<c_char_Array_15 at remote 
0xa90c60>) at ../Objects/typeobject.c:999
999     ../Objects/typeobject.c: No such file or directory.
(gdb) where
#0  0x00000000004b2f81 in subtype_dealloc (self=<c_char_Array_15 at remote 
0xa90c60>)
    at ../Objects/typeobject.c:999
#1  0x000000000048f71a in _Py_Dealloc (op=<c_char_Array_15 at remote 0xa90c60>) 
at ../Objects/object.c:2243
#2  0x0000000000463a05 in frame_dealloc (f=
    Frame 0x9f5a20, for file 
/usr/lib/python2.7/dist-packages/louis/__init__.py, line 273, in hyphenate ())
    at ../Objects/frameobject.c:458
#3  0x000000000048f71a in _Py_Dealloc (op=
    Frame 0x9f5a20, for file 
/usr/lib/python2.7/dist-packages/louis/__init__.py, line 273, in hyphenate ())
    at ../Objects/object.c:2243
#4  0x00000000005266ec in PyEval_EvalCodeEx (co=0xb31460, globals=
    {'backTranslate': <function at remote 0xbf2990>, 'Union': 
<_ctypes.UnionType at remote 0x7ffff6749040>, 'c_wchar': <_ctypes.PyCSimpleType 
at remote 0xc2e300>, 'c_bool': <_ctypes.PyCSimpleType at remote 0xc2d070>, 
'CFUNCTYPE': <function at remote 0xb8e648>, '__path__': 
['/usr/lib/python2.7/dist-packages/louis'], 'byref': <built-in function byref>, 
'pointer': <built-in function pointer>, 'underline': 2, 'alignment': <built-in 
function alignment>, 'c_longlong': <_ctypes.PyCSimpleType at remote 0xc21810>, 
'struct': <module at remote 0xbe1cf8>, 'c_short': <_ctypes.PyCSimpleType at 
remote 0xc1ef00>, 'get_errno': <built-in function get_errno>, 'c_int32': 
<_ctypes.PyCSimpleType at remote 0xc24300>, '__file__': 
'/usr/lib/python2.7/dist-packages/louis/__init__.pyc', 'plain_text': 0, 
'noContractions': 1, 'compbrlAtCursor': 2, 'c_ulong': <_ctypes.PyCSimpleType at 
remote 0xc22bf0>, 'c_int': <_ctypes.PyCSimpleType at remote 0xc24300>, 
'hyphenate': <function at remote 0xbf2ae0>, 'compileString': <function at 
remote 0xbf2b88...(truncated), locals=0x0, args=0xbbc740, argcount=2, 
kws=0xbbc750, kwcount=0, defs=0xb82a98, 
    defcount=1, closure=0x0) at ../Python/ceval.c:3264
#5  0x0000000000529462 in fast_function (func=<function at remote 0xbf2ae0>, 
pp_stack=0x7fffffffdd60, n=2, 
    na=2, nk=0) at ../Python/ceval.c:4117
#6  0x0000000000529051 in call_function (pp_stack=0x7fffffffdd60, oparg=2) at 
../Python/ceval.c:4042
#7  0x0000000000523d46 in PyEval_EvalFrameEx (f=Frame 0xbbc5b0, for file 
<string>, line 1, in <module> (), 
    throwflag=0) at ../Python/ceval.c:2666
#8  0x000000000052664e in PyEval_EvalCodeEx (co=0xb0ce00, globals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
locals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
    closure=0x0) at ../Python/ceval.c:3253
#9  0x000000000051c7f2 in PyEval_EvalCode (co=0xb0ce00, globals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
locals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}) at 
../Python/ceval.c:667
#10 0x0000000000559210 in run_mod (mod=0xbceeb0, filename=0x619ff5 "<string>", 
globals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
locals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
flags=0x7fffffffe2c0, arena=0xae42a0) at ../Python/pythonrun.c:1353
#11 0x00000000005590c1 in PyRun_StringFlags (str=
    0x973010 "import louis; print louis.hyphenate([\"en-us-g1.utb\", 
\"hyph_en_US.dic\"], u\"straightforward\")\n", start=257, globals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
locals=
    {'__builtins__': <module at remote 0x7ffff7fbe470>, '__name__': '__main__', 
'louis': <module at remote 0xb8bbc0>, '__doc__': None, '__package__': None}, 
flags=0x7fffffffe2c0) at ../Python/pythonrun.c:1316
#12 0x0000000000557b46 in PyRun_SimpleStringFlags (command=
    0x973010 "import louis; print louis.hyphenate([\"en-us-g1.utb\", 
\"hyph_en_US.dic\"], u\"straightforward\")\n", flags=0x7fffffffe2c0) at 
../Python/pythonrun.c:969
#13 0x000000000057248e in Py_Main (argc=3, argv=0x7fffffffe408) at 
../Modules/main.c:583
#14 0x000000000041b934 in main (argc=3, argv=0x7fffffffe408) at 
../Modules/python.c:23

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: