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 683561 - Do main channel handlers clean-up
Do main channel handlers clean-up
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks: 683042
 
 
Reported: 2012-09-07 10:45 UTC by Marc-Andre Lureau
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do main channel handlers clean-up (2.56 KB, patch)
2012-09-07 10:45 UTC, Marc-Andre Lureau
accepted-commit_now Details | Review
Do main channel handlers clean-up (2.81 KB, patch)
2012-09-07 15:03 UTC, Marc-Andre Lureau
committed Details | Review

Description Marc-Andre Lureau 2012-09-07 10:45:07 UTC
This patch should solve the crash observed in
https://bugzilla.gnome.org/show_bug.cgi?id=683042
Comment 1 Marc-Andre Lureau 2012-09-07 10:45:09 UTC
Created attachment 223745 [details] [review]
Do main channel handlers clean-up

Spice-gtk has a peculiar (and annoying) channel object memory
management model... Channels are actually removed from the session
when the refcount reaches 0. If not, bad interactions with new
channels happen (if the session is recycled on reconnect or migration).

I wish spice-gtk would be fixed to be simpler to use, but Boxes can
also learn to clean up old handlers.
Comment 2 Alexander Larsson 2012-09-07 14:44:25 UTC
Review of attachment 223745 [details] [review]:

::: src/spice-display.vala
@@ +108,3 @@
+            return;
+
+        var o = main_channel as Object;

Why do you have to cast to object?
Comment 3 Marc-Andre Lureau 2012-09-07 14:45:54 UTC
(In reply to comment #2)
> Review of attachment 223745 [details] [review]:
> 
> ::: src/spice-display.vala
> @@ +108,3 @@
> +            return;
> +
> +        var o = main_channel as Object;
> 
> Why do you have to cast to object?

Because SpiceChannel also has spice_channel_connect().
Comment 4 Alexander Larsson 2012-09-07 14:52:46 UTC
Ah, I see, then Ack.
Comment 5 Marc-Andre Lureau 2012-09-07 15:03:01 UTC
Created attachment 223768 [details] [review]
Do main channel handlers clean-up

Spice-gtk has a peculiar (and annoying) channel object memory
management model... Channels are actually removed from the session
when the refcount reaches 0. If not, bad interactions with new
channels happen (if the session is recycled on reconnect or migration).

I wish spice-gtk would be fixed to be simpler to use, but Boxes can
also learn to clean up old handlers.
Comment 6 Marc-Andre Lureau 2012-09-07 16:27:58 UTC
Attachment 223768 [details] pushed as fbfdb72 - Do main channel handlers clean-up