Crash report
What happened?
When calling simpledialog to get user input, then later calling filedialog to save a text file, the python interpreter often crashes. Without both dialog boxes called, there is no crash.
Reproducible on macOS Sierra 14.4.1 Macbook Air M1
Could not reproduce on Windows
Python 3.12
ips crash report generated and available
fromtkinterimport*fromtkinterimportfiledialog, scrolledtext, simpledialog# BEGIN CODE THAT CAUSES CRASH ******# BEGIN CODE THAT CAUSES CRASH ******# BEGIN CODE THAT CAUSES CRASH ******# prompt for settingstime_out_seconds=simpledialog.askinteger(title="Title", prompt="Prompt")
# set defaults if dialogs are cancelledifnottime_out_seconds:
time_out_seconds=10# END CODE THAT CAUSES CRASH ********# END CODE THAT CAUSES CRASH ********# END CODE THAT CAUSES CRASH ********defsave_to_file():
""" Saves File """# CRASH OCCURS HERE ******# CRASH OCCURS HERE ******# CRASH OCCURS HERE ******# while it does crash without filetypes defined, it crashes more often when filetypes are defined.file_path=filedialog.asksaveasfilename(defaultextension=".txt",
filetypes=[("Text files", "*.txt"), ("All files", "*.*")])
iffile_path:
withopen(file_path, 'w') asfile:
text_content="Sample text document text"file.write(text_content)
# Window configwindow=Tk()
# User inputtext_box=scrolledtext.ScrolledText()
text_box.pack()
# Save Buttonsave_button=Button(window, text="Save", command=save_to_file)
save_button.pack()
window.mainloop()CPython versions tested on:
3.12
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
2024-04-07 20:30:19.525 Python[3024:88005] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
Crash report
What happened?
When calling simpledialog to get user input, then later calling filedialog to save a text file, the python interpreter often crashes. Without both dialog boxes called, there is no crash.
Reproducible on macOS Sierra 14.4.1 Macbook Air M1
Could not reproduce on Windows
Python 3.12
ips crash report generated and available
CPython versions tested on:
3.12
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
2024-04-07 20:30:19.525 Python[3024:88005] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)