python / cpython

The Python programming language
https://www.python.org
Other
63.29k stars 30.3k forks source link

simple example give a Linux core dumped with atk-bridge #82777

Closed 06d38814-a5c0-4927-aa6b-f738a6aa142c closed 3 years ago

06d38814-a5c0-4927-aa6b-f738a6aa142c commented 5 years ago
BPO 38596
Nosy @tirkarthi, @catafest, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = created_at = labels = ['interpreter-core', '3.7', 'type-crash'] title = 'simple example give a Linux core dumped with atk-bridge' updated_at = user = 'https://github.com/catafest' ``` bugs.python.org fields: ```python activity = actor = 'iritkatriel' assignee = 'none' closed = True closed_date = closer = 'iritkatriel' components = ['Interpreter Core'] creation = creator = 'catafest' dependencies = [] files = [] hgrepos = [] issue_num = 38596 keywords = [] message_count = 4.0 messages = ['355408', '355411', '355413', '401505'] nosy_count = 3.0 nosy_names = ['xtreak', 'catafest', 'iritkatriel'] pr_nums = [] priority = 'normal' resolution = 'out of date' stage = 'resolved' status = 'closed' superseder = None type = 'crash' url = 'https://bugs.python.org/issue38596' versions = ['Python 3.7'] ```

06d38814-a5c0-4927-aa6b-f738a6aa142c commented 5 years ago

My simple notepad code with QtWidgets.QPlainTextEdit() give me a crash dump on Linux Fedora 30 with python3

Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux

[mythcat@desk pyqt5_examples]$ uname -a Linux desk 5.3.7-200.fc30.x86_64 #1 SMP Fri Oct 18 20:13:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

[mythcat@desk pyqt5_examples]$ python3 notepad.py

* (python3:3077): WARNING *\: 11:26:06.007: AT-SPI: Could not obtain desktop path or name

* (python3:3077): WARNING *\: 11:26:06.029: atk-bridge: GetRegisteredEvents returned message with unknown signature

* (python3:3077): WARNING *\: 11:26:06.029: atk-bridge: get_device_events_reply: unknown signature

** (python3:3077): WARNING **: 11:26:06.029: atk-bridge: get_device_events_reply: unknown signature
Traceback (most recent call last):
  File "notepad.py", line 222, in assign_syntax_py
    self.syntax = mytext(self.text_widget.document())
NameError: name 'mytext' is not defined
Traceback (most recent call last):
  File "notepad.py", line 222, in assign_syntax_py
    self.syntax = mytext(self.text_widget.document())
NameError: name 'mytext' is not defined
Aborted (core dumped)

The code is self.syntax = my_notepad.mytext(self.text_widget.document())

tirkarthi commented 5 years ago

Can you please attach a simple reproducer script without any third party modules like qtwidgets to ensure crash is due to CPython and not due to the code in third party module itself.

06d38814-a5c0-4927-aa6b-f738a6aa142c commented 5 years ago

No. I don't have a reproducer script for this issue with Linux OS. The mytext is a class from another script named my_notepad. The problem comes with time when I use the menu to change the syntax value, as you can see: self.syntax = mytext(self.text_widget.document()) My code is based on this example from GitHub account lfsando: https://github.com/lfsando/notepad/blob/master/highlighter.py maybe has the same error.

iritkatriel commented 3 years ago

Python 3.7 is no longer maintained. If you are still seeing crashes in a current version (>= 3.9) then please create a new issue.

However, note that a bug report is more likely to get attention if it shows a bug in python, rather than just reporting that a complicated a system built on top of python is crashing.