[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pygame: FTBFS: dh_auto_test: error: pybuild --test -i python{version} -p "3.10 3.9" --system=custom --test-args "/usr/bin/xvfb-run {interpreter} -m pygame.tests.__main__ --exclude opengl" returned exit code 13



Dnia Tue, Feb 22, 2022 at 08:57:25AM +0100, Andreas Tille napisał(a):
> I had a look into this issue since a Debian Med package received a
> testing removal warning.  I can confirm the build fails with
> 
>    Segmentation fault
> 
> in the build time test suite.

Just out of curiosity I ran the tests during build under GDB (simply
inserting "gdb --args" right before the "{interpreter}" in the
overrite_dh_auto_test rule in debian/rules).

It seems like the segfault is in the freetype library, when loading a font,
rather than in pygame (though I guess the root cause could be pygame passing
garbage to freetype? - I have zero knowledge about the API).

Cc-ing Hugh in case he can provide some hints about what might be going on here.

This does not change the fact that it would be great to move to pygame2 :-)

loading pygame.tests.freetype_test
loading pygame.tests.ftfont_test

Thread 1 "python3.10" received signal SIGSEGV, Segmentation fault.
0x00007fde9aeb34e3 in FT_Done_Face (face=0x7fde96aa04d8) at ./src/base/ftobjs.c:2836
2836	./src/base/ftobjs.c: No such file or directory.
(gdb) bt full
#0  0x00007fde9aeb34e3 in FT_Done_Face (face=0x7fde96aa04d8) at ./src/base/ftobjs.c:2836
        error = 35
        driver = <optimized out>
        memory = <optimized out>
        node = <optimized out>
#1  0x00007fde9af11479 in ftc_face_node_done (ftcnode=0x1fce450, ftcmanager=<optimized out>) at ./src/cache/ftcmanag.c:272
        node = 0x1fce450
        manager = <optimized out>
#2  0x00007fde9af11872 in FTC_MruList_New (list=0x1ec9928, key=0x7fde970bb200, anode=anode@entry=0x7ffce3eb1bc0) at ./src/cache/ftcmru.c:281
        error = 1
        node = 0x1fce450
        memory = 0x1e70c40
#3  0x00007fde9af12bbf in FTC_Manager_LookupFace (manager=<optimized out>, face_id=face_id@entry=0x7fde970bb200, aface=aface@entry=0x7ffce3eb1be0) at ./src/cache/ftcmanag.c:324
        _pfirst = <optimized out>
        _compare = 0x7fde9af102d0 <ftc_face_node_compare>
        _first = <optimized out>
        _node = <optimized out>
        error = 0
        mrunode = 0x7fde9ca14638
#4  0x00007fde982a5228 in _PGFT_GetFont (ft=ft@entry=0x20bc470, fontobj=fontobj@entry=0x7fde970bb1f0) at src_c/freetype/ft_wrap.c:321
        error = <optimized out>
        font = 0x0
#5  0x00007fde982a550c in init (ft=ft@entry=0x20bc470, fontobj=fontobj@entry=0x7fde970bb1f0) at src_c/freetype/ft_wrap.c:386
        font = <optimized out>
#6  0x00007fde982a58be in _PGFT_TryLoadFont_Filename (ft=ft@entry=0x20bc470, fontobj=fontobj@entry=0x7fde970bb1f0, filename=<optimized out>, font_index=<optimized out>) at src_c/freetype/ft_wrap.c:442
        filename_alloc = <optimized out>
        file_len = <optimized out>
#7  0x00007fde9829d3d0 in _ftfont_init (self=0x7fde970bb1f0, args=<optimized out>, kwds=<optimized out>) at src_c/_freetype.c:823
        kwlist = {0x7fde982a7bb3 "file", 0x7fde982a7cca "size", 0x7fde982a75cc "font_index", 0x7fde982a777c "resolution", 0x7fde982a75d7 "ucs4", 0x0}
        file = 0x7fde96f44d30
        original_file = 0x7fde96f2a240
        font_index = 0
        face_size = {x = 1280, y = 0}
        ucs4 = 0
        resolution = 0
        size = 0
        height = 0
        width = 0
        x_ppem = 0
        y_ppem = 0
        rval = -1
        source = <optimized out>
        ft = 0x20bc470
#8  0x0000000000599823 in  ()
#9  0x0000000000531efb in _PyObject_MakeTpCall ()
#10 0x000000000052c946 in _PyEval_EvalFrameDefault ()
#11 0x000000000053105a in _PyObject_FastCallDictTstate ()
#12 0x00000000005446ab in  ()
#13 0x0000000000532228 in  ()
#14 0x0000000000549149 in PyObject_Call ()
#15 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#16 0x000000000053b7ff in _PyFunction_Vectorcall ()
#17 0x0000000000526ca7 in _PyEval_EvalFrameDefault ()
#18 0x000000000053b7ff in _PyFunction_Vectorcall ()
--Type <RET> for more, q to quit, c to continue without paging--c
#19 0x0000000000526ca7 in _PyEval_EvalFrameDefault ()
#20 0x000000000054884c in  ()
#21 0x0000000000526aba in _PyEval_EvalFrameDefault ()
#22 0x000000000053b7ff in _PyFunction_Vectorcall ()
#23 0x0000000000526ca7 in _PyEval_EvalFrameDefault ()
#24 0x000000000053b7ff in _PyFunction_Vectorcall ()
#25 0x000000000054893a in  ()
#26 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#27 0x000000000053105a in _PyObject_FastCallDictTstate ()
#28 0x00000000005459b9 in _PyObject_Call_Prepend ()
#29 0x00000000005c2c33 in  ()
#30 0x0000000000531efb in _PyObject_MakeTpCall ()
#31 0x000000000052b9ee in _PyEval_EvalFrameDefault ()
#32 0x000000000053b7ff in _PyFunction_Vectorcall ()
#33 0x000000000054893a in  ()
#34 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#35 0x000000000053105a in _PyObject_FastCallDictTstate ()
#36 0x00000000005459b9 in _PyObject_Call_Prepend ()
#37 0x00000000005c2c33 in  ()
#38 0x0000000000531efb in _PyObject_MakeTpCall ()
#39 0x000000000052b9ee in _PyEval_EvalFrameDefault ()
#40 0x000000000053b7ff in _PyFunction_Vectorcall ()
#41 0x000000000054893a in  ()
#42 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#43 0x000000000053105a in _PyObject_FastCallDictTstate ()
#44 0x00000000005459b9 in _PyObject_Call_Prepend ()
#45 0x00000000005c2c33 in  ()
#46 0x0000000000531efb in _PyObject_MakeTpCall ()
#47 0x000000000052b9ee in _PyEval_EvalFrameDefault ()
#48 0x000000000053b7ff in _PyFunction_Vectorcall ()
#49 0x000000000054893a in  ()
#50 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#51 0x000000000053105a in _PyObject_FastCallDictTstate ()
#52 0x00000000005459b9 in _PyObject_Call_Prepend ()
#53 0x00000000005c2c33 in  ()
#54 0x0000000000531efb in _PyObject_MakeTpCall ()
#55 0x000000000052b9ee in _PyEval_EvalFrameDefault ()
#56 0x000000000053b7ff in _PyFunction_Vectorcall ()
#57 0x0000000000526ca7 in _PyEval_EvalFrameDefault ()
#58 0x000000000053b7ff in _PyFunction_Vectorcall ()
#59 0x00000000005490e2 in PyObject_Call ()
#60 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#61 0x000000000053b7ff in _PyFunction_Vectorcall ()
#62 0x00000000005490e2 in PyObject_Call ()
#63 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#64 0x000000000053b7ff in _PyFunction_Vectorcall ()
#65 0x00000000005490e2 in PyObject_Call ()
#66 0x0000000000528a93 in _PyEval_EvalFrameDefault ()
#67 0x00000000005ffd82 in  ()
#68 0x00000000005ffcbb in PyEval_EvalCode ()
#69 0x000000000060493d in  ()
#70 0x000000000053ba2e in  ()
#71 0x0000000000526aba in _PyEval_EvalFrameDefault ()
#72 0x000000000053b7ff in _PyFunction_Vectorcall ()
#73 0x0000000000526aba in _PyEval_EvalFrameDefault ()
#74 0x000000000053b7ff in _PyFunction_Vectorcall ()
#75 0x0000000000619450 in  ()
#76 0x00000000006182cd in Py_RunMain ()
#77 0x00000000005f4e89 in Py_BytesMain ()
#78 0x00007fde9cb8b7fd in __libc_start_main (main=0x5f4e50, argc=5, argv=0x7ffce3eb4ee8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffce3eb4ed8) at ../csu/libc-start.c:332
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {7033120, 4441673013700892507, 6245728, 0, 0, 0, -4442174567630989477, -4458907349788616869}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x5, 0x7ffce3eb4ee8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 5}}}
        not_first_call = <optimized out>
#79 0x00000000005f4d8a in _start ()
(gdb)   


regards,
Marcin


Reply to: