Skip to content

Conversation

XINJIANGMO
Copy link
Contributor

🦟 Bug fix

Fixes #3060

Summary

When gi is being disabled (Enabled changes from true to false), the code sets the debug visualization mode to None, marks it as dirty, and sets a flag. After releasing the mutex lock, if the flag is set, it emits the DebugVisualizationModeChanged signal to notify the GUI to update.

This ensures internal state consistency and prevents crashes by forcing the debug visualization mode to None when gi is off. Emitting the signal outside the lock avoids deadlocks and keeps the GUI synchronized with the internal state.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can reproduce the issue and confirms that this fixes the crash.

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Sep 4, 2025
@azeey azeey merged commit 42ab45a into gazebosim:main Sep 4, 2025
13 of 14 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Sep 4, 2025
@iche033
Copy link
Contributor

iche033 commented Sep 5, 2025

@mergify backport gz-sim10 gz-sim9 gz-sim8

Copy link
Contributor

mergify bot commented Sep 5, 2025

mergify bot pushed a commit that referenced this pull request Sep 5, 2025
…ualization mode (#3062)

When gi is being disabled (Enabled changes from true to false), the code sets the debug visualization mode to None, marks it as dirty, and sets a flag. After releasing the mutex lock, if the flag is set, it emits the DebugVisualizationModeChanged signal to notify the GUI to update.

This ensures internal state consistency and prevents crashes by forcing the debug visualization mode to None when gi is off. Emitting the signal outside the lock avoids deadlocks and keeps the GUI synchronized with the internal state.

Signed-off-by: momo <[email protected]>
(cherry picked from commit 42ab45a)
mergify bot pushed a commit that referenced this pull request Sep 5, 2025
…ualization mode (#3062)

When gi is being disabled (Enabled changes from true to false), the code sets the debug visualization mode to None, marks it as dirty, and sets a flag. After releasing the mutex lock, if the flag is set, it emits the DebugVisualizationModeChanged signal to notify the GUI to update.

This ensures internal state consistency and prevents crashes by forcing the debug visualization mode to None when gi is off. Emitting the signal outside the lock avoids deadlocks and keeps the GUI synchronized with the internal state.

Signed-off-by: momo <[email protected]>
(cherry picked from commit 42ab45a)
mergify bot pushed a commit that referenced this pull request Sep 5, 2025
…ualization mode (#3062)

When gi is being disabled (Enabled changes from true to false), the code sets the debug visualization mode to None, marks it as dirty, and sets a flag. After releasing the mutex lock, if the flag is set, it emits the DebugVisualizationModeChanged signal to notify the GUI to update.

This ensures internal state consistency and prevents crashes by forcing the debug visualization mode to None when gi is off. Emitting the signal outside the lock avoids deadlocks and keeps the GUI synchronized with the internal state.

Signed-off-by: momo <[email protected]>
(cherry picked from commit 42ab45a)
@XINJIANGMO XINJIANGMO deleted the fixbug-3060 branch September 5, 2025 13:36
iche033 pushed a commit that referenced this pull request Sep 5, 2025
…ualization mode (#3062)

When gi is being disabled (Enabled changes from true to false), the code sets the debug visualization mode to None, marks it as dirty, and sets a flag. After releasing the mutex lock, if the flag is set, it emits the DebugVisualizationModeChanged signal to notify the GUI to update.

This ensures internal state consistency and prevents crashes by forcing the debug visualization mode to None when gi is off. Emitting the signal outside the lock avoids deadlocks and keeps the GUI synchronized with the internal state.

Signed-off-by: momo <[email protected]>
(cherry picked from commit 42ab45a)
iche033 pushed a commit that referenced this pull request Sep 5, 2025
…ualization mode (#3062)

When gi is being disabled (Enabled changes from true to false), the code sets the debug visualization mode to None, marks it as dirty, and sets a flag. After releasing the mutex lock, if the flag is set, it emits the DebugVisualizationModeChanged signal to notify the GUI to update.

This ensures internal state consistency and prevents crashes by forcing the debug visualization mode to None when gi is off. Emitting the signal outside the lock avoids deadlocks and keeps the GUI synchronized with the internal state.

Signed-off-by: momo <[email protected]>
(cherry picked from commit 42ab45a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants