DelphiFMX4Python
DelphiFMX4Python copied to clipboard
Python is freezing on exit
On Windows 10, run the Todo.py and click the 'X' button, the window will be closed but the python won't exit. Taskman shows "no response".
From the debug window, I can see python is dead in the directx/graphics driver.
I found a workaround. I can add a string to the Edit.Text, even a '
But if I add a Calendar to the form, it freezes again on exit.
My other Windows PC (same Python, different gfx card) has no such issue. I'm currently using Python 3.9.12 installed from Microsoft Store.
By the way, seems that TNumberBox, TComboTrackBar, etc. are not supported.
I couldn't simulate this issue on my devices, but I will try to figure out something.
Not fixed in the latest release.
@zwm88, I still can't reproduce this issue.
Can you attach your sample script?
This is the script I used:
DelphiFMX4Python\samples\ToDoList.py
And the Edit has no cursor when focused.
I also tried this script:
DelphiFMX4Python\samples\ControlsDesktop\controlsdemo.py
It has the cursor, and the exit looks OK. But if I use back key to delete the "some text" in the Edit box, it will hang again after exit.
Conclusion: empty text box will cause the hanging on exit.
Another finding: If I add these two lines after "print('Exiting...')":
Application.Destroy()
dir(Application)
The script can exit.
What "dir(Application)" does to pull the application out of freezing?