This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tk.quit and sys.exit cause Fatal Error
Type: Stage:
Components: Tkinter Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Tk.quit leads to crash in python.exe
View: 775544
Assigned To: loewis Nosy List: blaforge, jafo, loewis, mkiever, werneck
Priority: high Keywords:

Created on 2003-11-06 15:05 by blaforge, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue837234.py werneck, 2008-05-10 13:47 Failed to reproduce the bug
issue775544.py mkiever, 2008-05-17 16:16 demo code from issue 775544 (does not reproduce bug on linux)
Messages (7)
msg18921 - (view) Author: Bill la Forge (blaforge) Date: 2003-11-06 15:05
Fatal Python error: PyEval_RestoreThread: NULL tstate

I get this if I do a sys.exit() or a Tkinter quit() from with 
an after call or from capturing an input event.

HOWEVER, if I capture a <Destroy> event and then call 
quit(), everything works fine!
msg18922 - (view) Author: Bill la Forge (blaforge) Date: 2003-11-06 15:27
Logged In: YES 
user_id=22406

Ah! Calling destroy works.
msg55383 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2007-08-28 21:26
Is this a bug or just incorrect usage?  From reading the message it
sounds like it may just have been an incorrect usage.

If it's a bug, can we get a sample that reproduces the problem?
msg55413 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-08-29 05:13
It should not be possible to trigger Py_FatalError through pure Python
code. I still haven't tried reproducing the problem, but if it is
reproducable, it's a bug.
msg55415 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2007-08-29 06:14
blaforge: I know it's been years, but can you provide code that
reproduces this?  I'm going to switch it to "pending" state, please
re-open when you include some code to reproduce it.
msg66521 - (view) Author: Pedro Werneck (werneck) Date: 2008-05-10 13:47
I tried reproducing the bug with the info provided but neither case
worked. Since it doesn't mention platform, I'm including the file in
case anyone wants to try it on anything other than Linux/Python2.5.
msg67005 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2008-05-17 16:16
Hi,

found a related (duplicate ?) issue
which mentions a platform and has code
producing the error:
  http://bugs.python.org/issue775544
Can someone based on WinXP try the code?
Attaching it here for easier reference.
Works without problem on my Linux 2.6,
Python 2.4.1 with Tk 8.4

Guess the other issue is similar enough
to close it.

Regards,
Matthias Kievernagel
History
Date User Action Args
2022-04-11 14:56:01adminsetgithub: 39515
2008-06-01 11:30:06georg.brandlsetstatus: pending -> closed
resolution: duplicate
superseder: Tk.quit leads to crash in python.exe
2008-05-17 16:16:53mkieversetfiles: + issue775544.py
nosy: + mkiever
messages: + msg67005
2008-05-10 13:47:24wernecksetfiles: + issue837234.py
nosy: + werneck
messages: + msg66521
2007-08-29 06:14:30jafosetstatus: open -> pending
messages: + msg55415
2007-08-29 05:13:57loewissetmessages: + msg55413
2007-08-28 21:26:18jafosetnosy: + jafo
messages: + msg55383
2003-11-06 15:05:34blaforgecreate