GNOME Bugzilla – Bug 686172
[patch] fix crasher on error == NULL
Last modified: 2012-11-06 16:44:44 UTC
Created attachment 226489 [details] [review] 0001-lib-fix-crasher-on-error-NULL.patch this patch fixes crash on colling error->message in case where error == NULL. It is easy reproducible on enabling/disable bluetooth headset.
Created attachment 226493 [details] [review] 0001-lib-fix-crasher-on-error-NULL.patch v2 other patch version. I included the check g_error_free too. g_error_free will not fail any way, but it produce more warnings.
How do I reproduce this bug? I don't think that those calls should ever return failure with a non-NULL error.
I is easy to reproduce with bluetooth headset. First connect it, then press disconnect it over bluetooth manager.
Instead of fixing the warning, your patch works around it: (gnome-control-center:5234): GLib-GObject-WARNING **: invalid cast from `GDBusProxy' to `Device'
Review of attachment 226493 [details] [review]: Not the root cause.
Yep, i know it. But i do not know the root cause. Is it some thing to do with bluez api change? I talked about this with cyphermox on irc:ubuntu-devel, at the end he suggested to wait for your help :)
(In reply to comment #6) > Yep, i know it. But i do not know the root cause. Then I would rather you didn't post patches that you know are wrong. > Is it some thing to do with > bluez api change? Nope, it was a bug in the GDBus port. > I talked about this with cyphermox on irc:ubuntu-devel, at > the end he suggested to wait for your help :) I would suggest not to post patches that are wrong. The backtrace from the first warning and a reproducer are immensely more useful than wrong patches.
Created attachment 227624 [details] [review] lib: Fix refcounting problems with Connect/Disconnect Proxies related to particular interfaces were unref'ed even though we never took a new reference to them, and the incorrect GDBusProxy was used in some cases, causing crashers.
Attachment 227624 [details] pushed as ca2085a - lib: Fix refcounting problems with Connect/Disconnect
(In reply to comment #7) > I would suggest not to post patches that are wrong. The backtrace from the > first warning and a reproducer are immensely more useful than wrong patches. uff, initially i didn't knew i was wrong, only after long discussion on irc. But, OK - i'll try it.
*** Bug 687777 has been marked as a duplicate of this bug. ***