Bug#1077677: Python Gtk.Clipboard.request_rich_text() crashes

Jakub Wilk jwilk at jwilk.net
Wed Jul 31 21:33:10 BST 2024


Package: gir1.2-gtk-3.0
Version: 3.24.38-2~deb12u1

Gtk.Clipboard.request_rich_text() segfaults for me:

    $ python3 request_rich_text.py
    Segmentation fault

Backtrace:

#0  0xf5b23141 in gtk_clipboard_request_rich_text (clipboard=0x877a8f8, buffer=0x877b180, callback=0xf7647008, user_data=0x877fb80) at ../../../gtk/gtkclipboard.c:1177
#1  0xf7fac7d8 in ffi_call_i386 () at ../src/x86/sysv.S:121
#2  0xf7fabd97 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, rvalue at entry=0xffffd0a4, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi.c:406
#3  0xf7fac001 in ffi_call (cif=<optimized out>, fn=<optimized out>, rvalue=0xffffd0a4, avalue=0x8780090) at ../src/x86/ffi.c:415
#4  0xf758f00e in pygi_invoke_c_callable (function_cache=<optimized out>, state=<optimized out>, py_args=<optimized out>, py_kwargs=<optimized out>) at gi/pygi-invoke.c:684
#5  0xf7583334 in _function_cache_invoke_real (function_cache=0x8840530, state=0xffffd10c, py_args=(<Clipboard at remote 0xf77288e8>, <TextBuffer at remote 0xf75ff508>, <built-in method print of module object at remote 0xf77315a0>), py_kwargs=0x0) at gi/pygi-cache.c:783
#6  0xf7584710 in pygi_function_cache_invoke (function_cache=0x8840530, py_args=(<Clipboard at remote 0xf77288e8>, <TextBuffer at remote 0xf75ff508>, <built-in method print of module object at remote 0xf77315a0>), py_kwargs=0x0) at gi/pygi-cache.c:862
#7  0xf758f96c in pygi_callable_info_invoke (user_data=0x0, cache=<optimized out>, kwargs=0x0, py_args=(<Clipboard at remote 0xf77288e8>, <TextBuffer at remote 0xf75ff508>, <built-in method print of module object at remote 0xf77315a0>), info=<optimized out>) at gi/pygi-invoke.c:727
#8  _wrap_g_callable_info_invoke (self=0xf69bd900, py_args=(<Clipboard at remote 0xf77288e8>, <TextBuffer at remote 0xf75ff508>, <built-in method print of module object at remote 0xf77315a0>), kwargs=0x0) at gi/pygi-invoke.c:764
#9  0xf7589066 in _callable_info_call (self=0xf5330f00, args=(<TextBuffer at remote 0xf75ff508>, <built-in method print of module object at remote 0xf77315a0>), kwargs=0x0) at gi/pygi-info.c:548
#10 0x0815c82b in _PyObject_MakeTpCall (tstate=0x86b6bcc <_PyRuntime+84940>, callable=<gi.FunctionInfo at remote 0xf5330f00>, args=0xf7fb6040, nargs=2, keywords=0x0) at ../Objects/call.c:214
#11 0x0817c7b4 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=2147483650, args=0xf7fb6040, callable=<gi.FunctionInfo at remote 0xf5330f00>, tstate=0x86b6bcc <_PyRuntime+84940>) at ../Include/internal/pycore_call.h:90
#12 _PyObject_VectorcallTstate (kwnames=0x0, nargsf=2147483650, args=0xf7fb6040, callable=<gi.FunctionInfo at remote 0xf5330f00>, tstate=0x86b6bcc <_PyRuntime+84940>) at ../Include/internal/pycore_call.h:77
#13 PyObject_Vectorcall (callable=<gi.FunctionInfo at remote 0xf5330f00>, args=0xf7fb6040, nargsf=2147483650, kwnames=0x0) at ../Objects/call.c:299
#14 0x0816ec6d in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:4772
#15 0x08167099 in _PyEval_EvalFrame (throwflag=0, frame=0xf7fb6010, tstate=0x86b6bcc <_PyRuntime+84940>) at ../Include/internal/pycore_ceval.h:73
#16 _PyEval_Vector (args=0x0, argcount=0, kwnames=0x0, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), func=0xf7738d98, tstate=0x86b6bcc <_PyRuntime+84940>) at ../Python/ceval.c:6435
#17 PyEval_EvalCode (co=<code at remote 0xf76c1728>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated)) at ../Python/ceval.c:1154
#18 0x08285c28 in run_eval_code_obj (tstate=0x86b6bcc <_PyRuntime+84940>, co=0xf76c1728, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated)) at ../Python/pythonrun.c:1714
#19 0x0828375a in run_mod (mod=<optimized out>, filename=<optimized out>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), flags=0xffffd448, arena=0xf7776d10) at ../Python/pythonrun.c:1735
#20 0x0828ec64 in pyrun_file (fp=fp at entry=0x86e35c0, filename=filename at entry='/home/jwilk/request_rich_text.py', start=start at entry=257, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/jwilk/request_rich_text.py') at remote 0xf7765b70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0xf77315a0>, '__file__': '/home/jwilk/request_rich_text.py', '__cached__': None, 'gi': <module at remote 0xf7682a28>, 'Gtk': <GtkProxyModule(__name__='gi.repository.Gtk', __doc__=None, __package__='gi.repository.Gtk', __loader__=<DynamicImporter(path='gi.repository') at remote 0xf7675950>, __spec__=<ModuleSpec(name='gi.repository.Gtk', loader=<...>, origin=None, loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=False, _cached=None) at remote 0xf7622110>, _introspection_module=<IntrospectionModule(_namespace='Gtk', _version='3.0', __name__='gi.repository.Gtk', __path__=['/usr/lib/i386-linux-gnu/girepository-1.0/Gtk-3.0.typelib'], Buildable=<GObjectMeta(__info__=<InterfaceInfo at remote 0xf60de4b8>, __module__='gi.repos...(truncated), closeit=1, flags=0xffffd448) at ../Python/pythonrun.c:1630
#21 0x0828e9c6 in _PyRun_SimpleFileObject (fp=0x86e35c0, filename='/home/jwilk/request_rich_text.py', closeit=1, flags=0xffffd448) at ../Python/pythonrun.c:440
#22 0x0828e7ec in _PyRun_AnyFileObject (fp=0x86e35c0, filename='/home/jwilk/request_rich_text.py', closeit=1, flags=0xffffd448) at ../Python/pythonrun.c:79
#23 0x0828d5ed in pymain_run_file_obj (skip_source_first_line=0, filename='/home/jwilk/request_rich_text.py', program_name='/usr/bin/python3') at ../Modules/main.c:360
#24 pymain_run_file (config=0x86a9b84 <_PyRuntime+31620>) at ../Modules/main.c:379
#25 pymain_run_python (exitcode=0xffffd444) at ../Modules/main.c:601
#26 Py_RunMain () at ../Modules/main.c:680
#27 0x08267b87 in Py_BytesMain (argc=2, argv=0xffffd5e4) at ../Modules/main.c:734
#28 0x08267abb in main (argc=2, argv=0xffffd5e4) at ../Programs/python.c:15


-- System Information:
Architecture: i386

Versions of packages gir1.2-gtk-3.0 depends on:
ii  gir1.2-atk-1.0        2.46.0-5
ii  gir1.2-freedesktop    1.74.0-3
ii  gir1.2-gdkpixbuf-2.0  2.42.10+dfsg-1+deb12u1
ii  gir1.2-glib-2.0       1.74.0-3
ii  gir1.2-pango-1.0      1.50.12+ds-1
ii  libgtk-3-0            3.24.38-2~deb12u1
ii  libgtk-3-common       3.24.38-2~deb12u1

-- 
Jakub Wilk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: request_rich_text.py
Type: text/x-python
Size: 241 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20240731/ae60fecb/attachment-0001.py>


More information about the pkg-gnome-maintainers mailing list