Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Fix gzclient crash when deleting a model that's being manipulated #2856

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 9, 2020

The crash happens because the visual pointer in ModelManipulator is not reset when the model is being deleted.

To reproduce:

  1. launch gazebo, gazebo --verbose
  2. insert box model using toolbar
  3. On separate terminal, publish a delay msg to delete the box model
    sleep 5 && gz model -d -m unit_box
    
  4. Go back to the gazebo window, press 'T' to go into translation mode, and continuously drag and move the box around until it's deleted
  5. Release mouse button to see the crash

The fix is to reset the visual pointer when detaching the model. I also had to fix a material transparency issue that happens when I tried to insert the same model back into the world (after being deleted while dragging) and found that It always reverted to use old semi-transparent material. The workaround is to also reset the transparency before resetting the visual pointer.

Signed-off-by: Ian Chen ichen@osrfoundation.org

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 added the 9 Gazebo 9 label Oct 9, 2020
@osrf-jenkins
Copy link
Collaborator

Build finished. 1371 tests run, 0 skipped, 18 failed.

@osrf-jenkins
Copy link
Collaborator

Build finished. 15 tests run, 0 skipped, 2 failed.

@osrf-jenkins
Copy link
Collaborator

Build finished. No test results found.

@osrf-jenkins
Copy link
Collaborator

Build finished. 2121 tests run, 0 skipped, 10 failed.

@j-rivero
Copy link
Contributor

@osrf-jenkins run tests please

@chapulina chapulina requested a review from ahcorde October 12, 2020 18:28
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

LGTM, I reproduced the crash and the fix

@iche033 iche033 merged commit 6d6568b into gazebo9 Oct 13, 2020
@iche033 iche033 deleted the mouse_move_del branch October 13, 2020 23:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
9 Gazebo 9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants