Re: [Evolution-hackers] Got Camel backtrace, want advise...



On Tue, 2005-08-23 at 08:47 +0200, Jules Colding wrote:
> On Tue, 2005-08-23 at 10:14 +0800, Not Zed wrote:
> > Hi Jules,
> > 
> > For starters, this is nothing to do with eds, it is crashing in
> > evolution, right? (where 'eds' == evolution data server process).
> 
> Yes.
> 
> > By default, the store will support a virtual trash and junk folder, you
> > wont need to know anything about it.  You only need to know about it,
> > when at some point, you implement your override for "Deleted items"
> > folder, and then you just implement get_trash.
> 
> OK, a potential reason for the crash is that my override method returns
> NULL. I have been very thorough and actually implemented *all* virtual
> methods, assuming that the caller could handle a NULL return value,
> which might not be the case then.

I wouldn't override a method if you don't do anything with it (this
isn't always strictly the case, some are abstract and must be).  I guess
if you return NULL AND set an exception though (where available), it
would probably work.

You're probably giving yourself more work to do than you need though,
particularly for a dummy service.  Most virtual methods provide fallback
implementations which are used by all but a few special cases.

> > Since it is trying to open the virtual trash folder, it means that the
> > flag is set.  So for a dummy server, don't worry about it.
> > 
> > The trace seems to be quite incomplete though - lots of frames missing.
> > To aid debugging i recommend compiling with -O0 always.
> 
> Will do.
> 
> > My best guess is that camel_vee_summary_add_folder() is calling
> > camel_session_get_uri() on the brutus-store, and that is crashing.
> > Probably brutus-store isn't setting session->url properly, possibly from
> > not calling the parent service construct() method.
> 
> This could be it. Could you please say a few words about the service and
> session objects? All the other entities have rather straightforward
> responsibilities and roles (folders, stores and such) but I would really
> like to hear a little about the service and session objects.

Session manages, well, a session.  It's really a way for the code to
talk to the application.  The application implements its own session,
and hooks into virtual methods, like get_password so it can request
passwords.  You don't really need to know much about it except that you
must use it for things like asking passwords or displaying messages to
the user.  It's like an 'application context' I suppose.

Store and Transport both derive from Service.  It just represents a
'backend', but separates out a few common functions that aren't unique
to Store or Transport.  Otherwise it should just be thought of as part
of Store.

I actually think it's kind of uselss and makes things messier than it
has to be, but oh well.  See the JavaMail doco perhaps, that might
explain more - and although it isn't strictly identical, the model is
similar to camel.

-- 
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]