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

Sometimes 'main.py is not responding' message comes out #34

Open
spdkimo opened this issue May 11, 2023 · 4 comments
Open

Sometimes 'main.py is not responding' message comes out #34

spdkimo opened this issue May 11, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@spdkimo
Copy link
Collaborator

spdkimo commented May 11, 2023

[Step to reproduce]

  1. on ioter, Select a device type and click 'Start'
  2. After device onboarding, Try to close the device window (or click Power on button)
  3. 'main.py is not responding' message comes out

[Cause]
Awaiting for the subprocess to exit, the delay could make the UI not operate, resulting in the error dialog shows up. But in this case, the device window and the error dialog would be disappeared shortly.

[Enhancement]
If there are any progress dialog shows during that time, user would feel comfortable

@spdkimo spdkimo added the enhancement New feature or request label May 11, 2023
@junyong-sim
Copy link
Collaborator

https://github.com/Samsung/ioter/blob/main/src/common/process_controller.py#L104
The child.wait(timeout=10) blocks user event.
As the result, 'main.py is not responding' message shown.

I think there are three options to solve this issue.

  1. remove child.wait(timeout=10) from termination func. But, I can't convince that it doesn't make jombi process. So, we have to do many tests.
  2. make thread to execute termination func. But, main should wait termination thread before exit. I think we need to do a lot of job.
  3. just keep it as current status for stability.

@spdkimo
Copy link
Collaborator Author

spdkimo commented Jun 9, 2023

How about showing progress dialog?
It would be more descriptive way to termination process

@junyong-sim
Copy link
Collaborator

How about showing progress dialog? It would be more descriptive way to termination process

It's also good idea. My concern is only that this progress dialog will be shown whenever process terminated.
I wonder if it looks good. So, I think we might be able to decide it with a demo.

@junyong-sim
Copy link
Collaborator

How about showing progress dialog? It would be more descriptive way to termination process

It's also good idea. My concern is only that this progress dialog will be shown whenever process terminated. I wonder if it looks good. So, I think we might be able to decide it with a demo.

I tried to create a message box while terminating devices. But, it didn't work well.
It seems that all operations was stucked during child.wait(timeout=10).
Do you have any idea about that ?

+    ## Check key Press Event ##
+    def mousePressEvent(self, event):
+        print('mousePressEvent')
+        if ProcessController.is_terminating():
+            re = QMessageBox.information(self, "Info", "Please, wait for a few seconds.\nWe are terminating devices safely.",
+                                      QMessageBox.Ok, QMessageBox.Ok)
+            if re == QMessageBox.Ok:
+                event.accept()
+            else:
+                event.ignore()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants