GNOME Bugzilla – Bug 660140
contacts_contact_find_persona_from_store: assertion `store != NULL' failed
Last modified: 2011-09-26 22:58:18 UTC
I clicked on a Jabber contact, select 'Edit' and hit: ** CRITICAL **: contacts_contact_find_persona_from_store: assertion `store != NULL' failed Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff16fb66c in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=0x7ffff17836b8 "%s: assertion `%s' failed", args1=0x7fffffffbc20) at gmessages.c:570 570 G_BREAKPOINT (); (gdb) bt
+ Trace 228579
Marking my only evo abook as default in evolution solved this. Could be an Evolution or folks bug; one of them could consider the only abook as the default one.
Created attachment 197499 [details] [review] Fall back to the "system" address book as the default, in case one isn't set Patch from branch: http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo660140-missing-default
Review of attachment 197499 [details] [review]: Some really minor comments. ::: backends/eds/lib/edsf-persona-store.vala @@ +1951,3 @@ + * "default" property, we include EDS's fallback logic for the "system" + * address book */ + E.SourceList sources; This could be moved inside the try block, I think. @@ +1963,3 @@ { + /* Translators: the first parameter is error message. */ + warning (_("failed to get the set of ESources while looking for a default address book: %s"), e); Warnings don't need to be translated. s/failed/Failed/.
Created attachment 197515 [details] [review] Fall back to the "system" address book as the default, in case one isn't set (try 2) Patch from branch: http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo660140-missing-default
Review of attachment 197515 [details] [review]: ::: backends/eds/lib/edsf-persona-store.vala @@ +1948,3 @@ bool is_default = false; + + E.SourceList sources; Still outside the try block! @@ +1956,3 @@ + E.BookClient.get_sources (out sources); + var default_source = sources.peek_default_source (); + if (default_source != null && When can default_source be null? Should we manually fall back to “system” in this case? (You've probably thought of this, so I'm fine for this to be committed if that's the case.)
(In reply to comment #5) > Review of attachment 197515 [details] [review]: > > ::: backends/eds/lib/edsf-persona-store.vala > @@ +1948,3 @@ > bool is_default = false; > + > + E.SourceList sources; > > Still outside the try block! Whoops! Fixed. > @@ +1956,3 @@ > + E.BookClient.get_sources (out sources); > + var default_source = sources.peek_default_source (); > + if (default_source != null && > > When can default_source be null? Should we manually fall back to “system” in > this case? (You've probably thought of this, so I'm fine for this to be > committed if that's the case.) If you check out the source in EDS, "system" is included as a fallback default in the logic for peek_default_source(). We were skipping this logic before because we were just checking if the property "default" was true (and it isn't true for the "system" address book in most cases; it only is if the user set it as such through gconf-editor (the UI to do this in Evo was recently stripped, it seems)).
commit 506baeb119df6a2288754dbbb9ce48a802e0e82b Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Sep 26 15:44:47 2011 -0700 More-tightly scope variable in EDS backend. backends/eds/lib/edsf-persona-store.vala | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cbf4373f265914e179d64457f74d209f28beffdd Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Sep 26 09:44:39 2011 -0700 Actually fall back to eds:system in case there's no default address book. Closes: bgo#660140 - contacts_contact_find_persona_from_store: assertion `st != NULL' failed NEWS | 2 ++ backends/eds/lib/edsf-persona-store.vala | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-)