Page MenuHomePhabricator

Crash if measurement is closed and data element clicked
Closed, ResolvedPublic


Steps to reproduce:

  1. draw linie with measurement tools
  2. close measurement view
  3. click on measurement in data manager

> Crash!

Event Timeline

This bug is definitely present but it cannot be reproduced reliably.

Steps to reproduce:

  1. Open Workbench
  2. Open Measurement View
  3. Open Pic3D
  4. Draw line
  5. Expand Pic3D node in Data Manager
  6. Change selection a few times between Pic3D and Line1 and stop at Line1
  7. Close Measurement View
  8. Change selection to Pic3D

> Crash!

The Measurement View holds a weak pointer to the currently selected image. When the View is closed, the weak pointer's dtor is called correctly and its observer tags are removed from the image data node - at least it seems so. However, sometimes the data node still tries to inform the observing weak pointer, which was already destructed, which causes the crash. (???)

Replacing the weak pointer by a full smart pointer works. I checked that the View doesn't keep a reference to an already deleted image data node.

User kislinsk has pushed new remote branch:


[373cd8]: Merge branch 'bug-18962-ReplaceWeakPointerByFullSmartPointer'

Merged commits:

2015-04-17 10:11:23 Stefan Kislinskiy [a75ec0]
Replaced weak pointer by ref counting smart pointer.