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

Reconnect a terminal to a different output does not work well #83

Open
vespos opened this issue Sep 16, 2024 · 2 comments
Open

Reconnect a terminal to a different output does not work well #83

vespos opened this issue Sep 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working high priority

Comments

@vespos
Copy link
Contributor

vespos commented Sep 16, 2024

Describe the bug
When disconnecting a terminal and reconnecting it to another box, the underlying subprocess might not update itself correctly. This seems to be linked to the fact that the Flowchart does not communicate the updated topology to the Node's subprocess.
This results in the mapping of the terminal to the internal variables not working properly, and being overwritten.

Solution might involve replicating some of the step in the build_views function of the FlowchartWidget, in particular self.chart.broker.send_pyobj(fcMsgs.DisplayNode(**args))

For now, deleting the problematic node (typically a filter box) and making a new one does allow one to move past the issue.

@vespos vespos added bug Something isn't working high priority labels Sep 26, 2024
@syamajala
Copy link
Contributor

syamajala commented Oct 22, 2024

It seems like we should be blocking signals here:
https://github.com/slac-lcls/ami/blob/master/ami/client/flowchart.py#L233

Right now that causes a checkpoint to be sent on display, which I dont think we should be doing.

Another issue I found is that custom widgets seem to be sending checkpoints as many times as you open and close the window. The filter widget for example if you open it and close it then change a control in the widget it will emit 2 signals for the state changed. I'm not sure why. I can also reproduce this with the calculator.

@syamajala
Copy link
Contributor

I think I know what the bug is. We create the widget in two places. One in the subprocess and one in the Flowchart class. The one in the subprocess is getting updated when we close the window and reopen it, but the one in the Flowchart never does. We probably need to a send a message to the flowchart when the window gets closed to destroy the widget.

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

No branches or pull requests

2 participants