Skip to content

In ConfigurGUI restrict SimpleSignals to only emit PySide6 Signals#188

Merged
rocco8773 merged 2 commits into
mainfrom
only_emit_w_SimpleSignals
Jun 17, 2026
Merged

In ConfigurGUI restrict SimpleSignals to only emit PySide6 Signals#188
rocco8773 merged 2 commits into
mainfrom
only_emit_w_SimpleSignals

Conversation

@rocco8773

@rocco8773 rocco8773 commented Jun 17, 2026

Copy link
Copy Markdown
Member

ConfigureGUI as getting random segmentation faults when a motor was moving. This was linked back to to Motor SimpleSignals being connected to AxisControlWidget.update_display_of_axis_status. This is inherently an unsafe thread operation since the AxisControlWidget is running in a thread managed by Qt, whereas the SimpleSingal could have been executed in the thread running the Motor's asyncio loop.

This PR changes what is connected to the SimpleSignal to only be a Qt signal. Thus, we're triggering update_display_of_axis_status to run in the Qt thread instead of running it in the asyncio loop thread. This is still inherently not thread safe, but will mitigate the chances of two threads trying to access the same memory space.


  • Crated signal AxisControlWidget.requestDisplayRefresh.
  • Removed AxisControlWidget.update_display_of_axis_status from its connection to Motor.signals.status_changed and movement_finished.
  • Connected requestDisplayRefresh.emit to Motor.signals.status_changed and movement_finished.

@rocco8773 rocco8773 added bug Something isn't working Component | Actor code touching actor functionality Component | GUI code touching the GUI functionality labels Jun 17, 2026
@rocco8773 rocco8773 merged commit 018acd9 into main Jun 17, 2026
17 checks passed
@github-project-automation github-project-automation Bot moved this from Tasks to Done in BaPSF Motion Jun 17, 2026
@rocco8773 rocco8773 deleted the only_emit_w_SimpleSignals branch June 17, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Component | Actor code touching actor functionality Component | GUI code touching the GUI functionality

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant