GNOME Bugzilla – Bug 683561
Do main channel handlers clean-up
Last modified: 2016-03-31 13:58:29 UTC
This patch should solve the crash observed in https://bugzilla.gnome.org/show_bug.cgi?id=683042
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.
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?
(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().
Ah, I see, then Ack.
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.
Attachment 223768 [details] pushed as fbfdb72 - Do main channel handlers clean-up