Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logged out of user when running Tkinter #84428

Closed
Jordan mannequin opened this issue Apr 10, 2020 · 4 comments
Closed

Logged out of user when running Tkinter #84428

Jordan mannequin opened this issue Apr 10, 2020 · 4 comments
Labels
3.7 (EOL) end of life topic-tkinter type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@Jordan
Copy link
Mannequin

Jordan mannequin commented Apr 10, 2020

BPO 40247
Nosy @ned-deily, @jordan
Files
  • 2.png
  • 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:

    assignee = None
    closed_at = <Date 2020-04-18.20:55:34.512>
    created_at = <Date 2020-04-10.20:49:55.653>
    labels = ['3.7', 'expert-tkinter', 'type-crash']
    title = 'Logged out of user when running Tkinter'
    updated_at = <Date 2020-04-18.20:55:34.511>
    user = 'https://github.com/Jordan'

    bugs.python.org fields:

    activity = <Date 2020-04-18.20:55:34.511>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-04-18.20:55:34.512>
    closer = 'ned.deily'
    components = ['Tkinter']
    creation = <Date 2020-04-10.20:49:55.653>
    creator = 'Jordan'
    dependencies = []
    files = ['49048']
    hgrepos = []
    issue_num = 40247
    keywords = []
    message_count = 4.0
    messages = ['366153', '366684', '366708', '366740']
    nosy_count = 2.0
    nosy_names = ['ned.deily', 'Jordan']
    pr_nums = []
    priority = 'normal'
    resolution = 'works for me'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue40247'
    versions = ['Python 3.7']

    @Jordan
    Copy link
    Mannequin Author

    Jordan mannequin commented Apr 10, 2020

    Whenever I run a python script with any Tkinter command, I get instantly logged out of my user. I have been using Tkinter for weeks now and it was running just fine until yesterday when I clicked the demo button in the default taskbar that shows up when launching a Tkinter GUI. It has been crashing now ever since if I include any Tkinter bits in the code. I have been using Python 3.7.7 with the Tkinter version that came with it before this problem started showing up. I have furiously tried everything I could think of (mind me, I'm pretty new to this) including installing preceding and later versions from the official python.org page (3.8.2, 3.8.1, 3.8.0, 3.7.0, 3.6.6 etc.). On some version of python, Tkinter runs and creates the main window with command tk.Tk(), however it would embed it into another window (see attached screenshot). Weird stuff. I've searched across the internet for similar issues to no avail.

    Operation System: MacOS Mohave 10.14.6

    I hope I'm in the right place to report this abnormal crashing. I would be very thankful for any guidance.

    @Jordan Jordan mannequin added 3.7 (EOL) end of life topic-tkinter type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 10, 2020
    @ned-deily
    Copy link
    Member

    Can you give the exact sequence of steps to reproduce the problem you see, please?

    @Jordan
    Copy link
    Mannequin Author

    Jordan mannequin commented Apr 18, 2020

    Thanks for reaching out. I solved the issue following @tcarroll2's solution from: pyenv/pyenv#1375
    The issue doesn't occur when using pyenv. It seems that the issue may have been caused by python sticking to the mac provided tkinter (version 8.5) instead of using a compatible version. With pyenv, I get python 3.7.4 and tkinter version 8.6.10 and it works flawlessly :)

    Steps to reproduce crash:

    • Downloading Python version 3.8+ from python.org
    • Typing python3 in terminal, importing tkinter as tk and starting a window with tk.Tk()
      I am immediately logged out of my user. TkVersion is 8.6

    Steps to reproduce weird window in window (my guess due to python using mac provided tkinter version 8.5):

    • Downloading Python version 3.7.7 or older from python.org or homebrew
    • Typing python3 in terminal, importing tkinter as tk and starting a window with tk.Tk()
    • Voila! window in window created.

    No logging out here, but the window created is unusable and glitchy. I tried running a tkinter GUI that works fine on other setups and the output was missing some widgets etc.

    @ned-deily
    Copy link
    Member

    Thanks for the additional info but it still leaves open questions. The current versions of python.org installers for macOS (3.8.2 and 3.7.7) and various others over the past couple of years all come with a built-in version of Tk 8.6 and that normally cannot be overriden. So if you are seeing indications that Tk 8.5.x is in use, you are somehow not really using those current versions of python.org installers or you are calling out within them directly to an older version of Tk (via a subprocess call, for example). The Apple-provided Tk 8.5.x on macOS systems is woefully out-of-date and has known critical bugs, like crashing when typing in composite characters (like option-u then U to produce Ü on an English keyboard). Anyway, since you have solved the issue for you, I am going to close this issue.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life topic-tkinter type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant