Running a server (Python built) in PyCharm with tkinter

So I created a server in Python and used tkinter for handling server logs. And because PyCharm states what type of error it is, clearly, I ran it using PyCharm. The error code on exit was `exit code -805306369 (0xCFFFFFFF)`. Also before getting this error the tkinter window went into "Not Responding" mode. Please help me understand the exit codes.


Hi, do you get the same behavior when running your code from the terminal outside of IDE? 

If negative, we would need a project sample, steps to reproduce the issue and the exact error output to investigate the issue.


Yup I do, but there the window goes into "Not Responding" mode and closes down after reporting the issue to Microsoft and the shell restarts (for some reason IDK).

To get an idea here is the main() of the

if __name__ == '__main__':
root = CZServer() # Tk class
root.SERVER.listen(5) # root.SERVER is socket(AF_INET, SOCK_STREAM)
accept_thread = Thread(target=root.accept_incoming_connections)
root.log_text.insert('1.0', 'Waiting for connection...\n')
root.after(6000, lambda _=None: accept_thread.join()) # .join() for for the execution-flow of the main-thread
root.mainloop() # Tk mainloop
root.SERVER.close() # close server after window destroyed

One more thing, the mainloop() doesn't work if placed after join() without root.after(). But when the code is run in the above manner the issue happens.


Please sign in to leave a comment.