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

Bug: UI unresponsive after click run with fsg/psg #22

Open
2 tasks done
mokurin000 opened this issue Oct 5, 2024 · 4 comments
Open
2 tasks done

Bug: UI unresponsive after click run with fsg/psg #22

mokurin000 opened this issue Oct 5, 2024 · 4 comments
Assignees
Labels
bug Something isn't working need more info

Comments

@mokurin000
Copy link
Contributor

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar issues in the project's issue tracker.
  • I have searched closed issues to see if a similar problem was reported
    before.

Issue Details

  1. start cli2gui UI
  2. enter arguments
  3. click Run
  4. UI will get stuck and warn unresponsive state

Description

This problem only occurs on pysimpleguiwrapper

Expected Behavior

UI should not be blocked

Actual Behavior

Unresponsive warn happens.

System Information

Please provide the following additional information about your system or
environment:

  • Operating System (OS): Windows 11
  • OS Version: 22631.4249
  • Browser (if applicable):
  • Browser Version (if applicable):
  • Project Version (if applicable): 2024.2
@mokurin000 mokurin000 added the bug Something isn't working label Oct 5, 2024
@FredHappyface
Copy link
Member

Hey thanks for the issue, I wasn't able to replicate this locally. I've created a test file based on the code you'd shared with me previously (just removing most of the business type logic). Seems not to freeze up the ui.

image

@mokurin000
Copy link
Contributor Author

mokurin000 commented Oct 5, 2024

Hey thanks for the issue, I wasn't able to replicate this locally. I've created a test file based on the code you'd shared with me previously (just removing most of the business type logic). Seems not to freeze up the ui.

image

could you please send your test script
I'm testing on mokurin000/fuckingfast-batch-download@test-freeze

also, did you add some fake payload (for exmaple time.sleep() ?

@FredHappyface
Copy link
Member

Yeah sure its https://github.com/FHPythonUtils/Cli2Gui/blob/master/tests/argparse/test_22.py

Can't seem to view the image

Ah could it be the threading do you think? Shouldn't block dearpygui though? Unless I need to think about spawning a UI thread perhaps

@mokurin000
Copy link
Contributor Author

mokurin000 commented Oct 5, 2024

Yeah sure its https://github.com/FHPythonUtils/Cli2Gui/blob/master/tests/argparse/test_22.py

Can't seem to view the image

Ah could it be the threading do you think? Shouldn't block dearpygui though? Unless I need to think about spawning a UI thread perhaps

Ah, I think I may have misundescribe. I encountered blocking when I did not open another thread to start the main function. If Thread.start() is replaced with Thread.run(), it will run the task in the current thread, and then because the task is running in the UI thread, it will block the UI. What I did to solve the problem was to open the task in another thread (the wrapper)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info
Projects
None yet
Development

No branches or pull requests

2 participants