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

Python is freezing on exit #19

Open
zwm88 opened this issue Mar 31, 2022 · 5 comments
Open

Python is freezing on exit #19

zwm88 opened this issue Mar 31, 2022 · 5 comments
Assignees
Labels
Awaiting Feedback Waiting for feedback from submitter or others.

Comments

@zwm88
Copy link

zwm88 commented Mar 31, 2022

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".

image

From the debug window, I can see python is dead in the directx/graphics driver.
image
image

I found a workaround. I can add a string to the Edit.Text, even a '' will work. An empty string '' won't work.
image

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.

@lmbelo
Copy link
Member

lmbelo commented Mar 31, 2022

I couldn't simulate this issue on my devices, but I will try to figure out something.

@lmbelo lmbelo self-assigned this Mar 31, 2022
@lmbelo lmbelo added the Awaiting Feedback Waiting for feedback from submitter or others. label Mar 31, 2022
@zwm88
Copy link
Author

zwm88 commented Jun 22, 2022

Not fixed in the latest release.

@lmbelo
Copy link
Member

lmbelo commented Jun 29, 2022

@zwm88, I still can't reproduce this issue.

Can you attach your sample script?

@zwm88
Copy link
Author

zwm88 commented Jul 10, 2022

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.

@zwm88
Copy link
Author

zwm88 commented Aug 25, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Feedback Waiting for feedback from submitter or others.
Projects
None yet
Development

No branches or pull requests

2 participants