Segfault on macOS arm64 (Apple M1), using gtk sample code
This issue is to document a segmentation fault like that in #455 (closed), with a simpler example, using only pygobject with recommended installation and python-gtk+3 sample code.
Key result: Running the "button demo" from the docs produces a segmentation fault when pressing the "close" Button.
Computer setup:
- Mac mini m1/arm64
- macOS 11.6
Software setup -- no previous homebrew (etc) on this computer:
- Following along with https://pygobject.readthedocs.io/en/latest/getting_started.html :
- Install homebrew
brew install pygobject3
brew install gtk+3
- Verify
which python3
=>/opt/homebrew/bin/python3
- Verify
file /opt/homebrew/bin/python3
=>/opt/homebrew/bin/python3: Mach-O 64-bit executable arm64
- Verify
python3 --version
=>Python 3.9.6
Steps to reproduce issue:
- Save "button demo" from the docs as button.py.
- Run
python3 button.py
- Program launches and displays the window with its buttons correctly.
- Press the "close" button
Results:
The button.py script correctly prints "Closing application", then fails with a segmentation fault:
% python3 button.py
Closing application
zsh: segmentation fault python3 button.py
Crash log reads, in part:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xa940421110fe0018 -> 0x0000421110fe0018 (possible pointer authentication failure)
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [66567]
Full log attached here: button_crashlog.txt
Edited by Windell Oskay