After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657681 - Crash when destroying an actor while dragging it
Crash when destroying an actor while dragging it
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterAction
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-30 09:27 UTC by Emilio Pozuelo Monfort
Modified: 2011-08-30 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
actions/drag: Be more reliable when destroying the drag handle (3.38 KB, patch)
2011-08-30 09:54 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
actions/drag: Be more reliable when destroying the drag handle - v2.0 (4.01 KB, patch)
2011-08-30 10:21 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Emilio Pozuelo Monfort 2011-08-30 09:27:18 UTC
If you destroy an actor while it's being dragged, your app will crash. See bug #656886
Comment 1 Emmanuele Bassi (:ebassi) 2011-08-30 09:54:38 UTC
Created attachment 195171 [details] [review]
actions/drag: Be more reliable when destroying the drag handle

Whenever the drag handle gets destroyed mid-drag we need to cancel any
current drag operation and reset the state of the DragAction.
Comment 2 Emilio Pozuelo Monfort 2011-08-30 10:12:00 UTC
With the attached patch on top of git master, on every drag end (when not destroying the actor during the drag) I get

(empathy-call:2026): Clutter-CRITICAL **: clutter_event_get_device: assertion `event != NULL' failed

Empathy doesn't crash anymore when destroying the actor during the drag though, but after the drag I get a lot of warnings like:

(empathy-call:2026): Clutter-WARNING **: Attempting to map a child that does not meet the necessary invariants: the actor 'EmpathyRoundedTexture' has no parent

I guess the last warning may be my fault and not a regression though.
Comment 3 Emmanuele Bassi (:ebassi) 2011-08-30 10:21:01 UTC
yes, the second warning is not something coming from DragAction - but the first warning is correct. updating the patch now.
Comment 4 Emmanuele Bassi (:ebassi) 2011-08-30 10:21:50 UTC
Created attachment 195177 [details] [review]
actions/drag: Be more reliable when destroying the drag handle - v2.0

now we check for the input device of the last motion event as well.
Comment 5 Emilio Pozuelo Monfort 2011-08-30 11:50:20 UTC
This patch works nicely!
Comment 6 Emmanuele Bassi (:ebassi) 2011-08-30 12:34:13 UTC
attachment 195177 [details] [review] pushed to master, thanks for testing.