Gio.py Application.run() segfault
Good day! Thank you for your work and great software! I want to reported a newly discovered issue, that seems to be a problem in pygobject library.
I'm experiencing an issue with running a python flatpak app that uses your library - AdwCustomizer.
Initially the app worked great, but later it suddenly stopped working, instantly segfaulting upon launch.
Here's what I found during debugging:
Detailed error message:
[📦 com.github.ArtyIF.AdwCustomizer ~]$ PYTHONFAULTHANDLER=1 /app/bin/adwcustomizer
Fatal Python error: Segmentation fault
Current thread 0x00007fa08df96740 (most recent call first):
File "/usr/lib/python3.10/site-packages/gi/overrides/Gio.py", line 42 in run
File "/app/share/adwcustomizer/adwcustomizer/main.py", line 375 in main
File "/app/bin/adwcustomizer", line 60 in <module>
Extension modules: gi._gi, cairo._cairo, gi._gi_cairo (total: 3)
Segmentation fault (core dumped)
Report from Valgrind:
==2== Memcheck, a memory error detector
==2== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==2== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==2== Command: /app/bin/adwcustomizer
==2==
==2==
==2== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==2== Bad permissions for mapped region at address 0x8DB6240
==2== at 0x8DB6240: ???
==2== by 0x5C250FE: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7302.0)
==2== by 0x5C25302: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7302.0)
==2== by 0x5E026E7: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7302.0)
==2== by 0x5E02892: g_application_run (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7302.0)
==2== by 0x5C5F055: ??? (in /usr/lib/x86_64-linux-gnu/libffi.so.8.1.0)
==2== by 0x5C5D07A: ??? (in /usr/lib/x86_64-linux-gnu/libffi.so.8.1.0)
==2== by 0x5A507F5: ??? (in /usr/lib/python3.10/site-packages/gi/_gi.cpython-310-x86_64-linux-gnu.so)
==2== by 0x5A526D0: ??? (in /usr/lib/python3.10/site-packages/gi/_gi.cpython-310-x86_64-linux-gnu.so)
==2== by 0x4996865: _PyObject_Call (in /usr/lib/x86_64-linux-gnu/libpython3.10.so.1.0)
==2== by 0x48CAC7B: _PyEval_EvalFrameDefault (in /usr/lib/x86_64-linux-gnu/libpython3.10.so.1.0)
==2== by 0x4A21A14: ??? (in /usr/lib/x86_64-linux-gnu/libpython3.10.so.1.0)
==2==
==2== HEAP SUMMARY:
==2== in use at exit: 4,907,010 bytes in 26,679 blocks
==2== total heap usage: 331,457 allocs, 304,778 frees, 61,769,216 bytes allocated
==2==
==2== LEAK SUMMARY:
==2== definitely lost: 200 bytes in 5 blocks
==2== indirectly lost: 88 bytes in 2 blocks
==2== possibly lost: 87,403 bytes in 1,140 blocks
==2== still reachable: 4,750,847 bytes in 24,901 blocks
==2== suppressed: 0 bytes in 0 blocks
==2== Rerun with --leak-check=full to see details of leaked memory
==2==
==2== For lists of detected and suppressed errors, rerun with: -s
==2== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
The segfault occurs at Gio.py at line 42, right where Application.run() gets called:
class Application(Gio.Application):
def run(self, *args, **kwargs):
with register_sigint_fallback(self.quit):
with wakeup_on_signal():
return Gio.Application.run(self, *args, **kwargs) //SEGFAULT
I made an issue on ArtyIF's (AdwCustomizer developer) github page, and we came to a conclusion that this is a problem with pygobject.
I'm not very tech-savvy with debugging and bug reporting, sorry if this information is not enough. Feel free to ask any additional info, I greatly appreciate your effort and will be glad to help.
OS: Arch Linux
Kernel: Linux 5.18.16-arch1-1
Python: 3.10.5
pygobject: 3.43.0.dev0
Flatpak: 1.12.7
Thanks!