discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GWorkspace ddbd dying when mdextractor connects


From: Ivan Vučica
Subject: Re: GWorkspace ddbd dying when mdextractor connects
Date: Mon, 18 Feb 2013 02:13:34 +0100

On 17. 2. 2013., at 21:23, Riccardo Mottola <address@hidden> wrote:

> I agree here. I thus removed the release of the connection.
> 
> I doubt however this will solve the crash, since at most we would get a 
> release problem on ddbd closure.


Without looking at the issue more deeply, perhaps not. Maybe the crashes 
currently occur because some object tries to talk to the connection object, 
which is released. And the singleton does not reinstantiate the object because 
the singleton's pointer is not nil, so it has no idea it should do so.

So unless some object might talk to NSConnection's instance, I doubt the crash 
will occur on ddbd closure (if this was indeed the cause of the crash).

I think I spotted another bug. When DDBd is being released, default connection 
object still has it as its delegate. Since this was set in -init:
    [conn setDelegate: self];
I'd clean it up in -dealloc. (Apple does recommend such stuff is cleaned up 
before -dealloc, but whatever.)

Speaking of Apple, they deprecated +[NSConnection defaultConnection] in 10.6. 
See [1].

////////////

By the way, just randomly thinking: maybe there is a better name for the DDBd 
class? Name is completely nonobvious, and a quick glance at ddbd.m does not 
reveal the purpose of the class. Some commentary on top of the file, and 
renaming the class, might be a good thing. This line is hardly helpful to 
someone unfamiliar with internals of GWorkspace:

    2013-02-16 22:24:43.051 ddbd[17606] the invocation: <GSFFIInvocation 
0x804e9c84 selector: userMetadataForPath: target: DDBd>

I mean, it didn't occur to me at first that DDBd is the name of a class -- it 
looked like gibberish :-)

  [1]: 
http://developer.apple.com/library/mac/#documentation/cocoa/Reference/Foundation/Classes/NSConnection_Class/DeprecationAppendix/AppendixADeprecatedAPI.html
--
Ivan Vučica
address@hidden - http://ivan.vucica.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]