I am very new to python. We have the need to login to multiple servers on a daily basis using RDP. So I created a program using pywinauto to automate the process. This program works fine. Then I added a tkinter UI to display the list of servers in a dropdown. This is when the problem started.
I use pycharm. As soon as I added tkinter code to the program, pycharm started throwing a non-zero exit code. The pywinauto code still worked but the code exited with the message - Process finished with exit code -1073740771 (0xC000041D) in pycharm. I used cx_freeze to freeze this code as an executable. The exe program crashes after it finishes running. Event viewer has the below message -
Faulting application name: ServerLogin.exe, version: 0.0.0.0, time stamp: 0x5e111c3a
Faulting module name: python38.dll, version: 3.8.2150.1013, time stamp: 0x5e55a7c4
Exception code: 0xc0000005
Fault offset: 0x000000000001cb2d
Faulting process id: 0x2f0c
Faulting application start time: 0x01d651c2f128f713
Faulting application path: C:\Users\username\PycharmProjects\ServerLogin\build\exe.win-amd64-3.8\ServerLogin.exe
Faulting module path: C:\Users\username\PycharmProjects\ServerLogin\build\exe.win-amd64-3.8\python38.dll
Report Id: ff281b07-5ad9-4150-8722-49cc3bf7d0a3
After a lot of research I found that using tkinter with pywinauto - 0.6.8 causes crashes. So I downgraded pywinauto to the version 0.6.5. After this I was getting zero exit code in pycharm but when this was frozen with cx_freeze I saw the same behavior as before with the same message logged in event viewer.
I have tested this on windows 10 and windows 7 64-bit machines using python 3.8.2.
I dont think my code is the problem since it runs fine on pycharm so I dont think there is a need to post the code here. But if you require it please let me know, I will post it.
I am wondering why the frozen application crashes even though pycharm gives me a clean exit. Any help on this appreciated. Please let me know if you need any more information. Thank you!
User contributions licensed under CC BY-SA 3.0