bug-gnustep
[Top][All Lists]
Advanced

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

Re: Segfault when NSTextView is released


From: Lundberg, Johannes
Subject: Re: Segfault when NSTextView is released
Date: Sun, 16 Feb 2014 09:17:48 +0900

 I don't know if the problem is because my ivar. This should work regardless if I store the pointer in an ivar or not. And so far this only occurs on NSTextView. I suspect that the way NSTextView releases its objects internally is not ARC-friendly.

--
Johannes Lundberg
BRILLIANTSERVICE CO., LTD.


On Sun, Feb 16, 2014 at 2:23 AM, Fred Kiefer <fredkiefer@gmx.de> wrote:
On 15.02.2014 13:39, David Chisnall wrote:
> On 14 Feb 2014, at 16:36, Fred Kiefer <fredkiefer@gmx.de> wrote:
>
>> Looks like this is rather a question for David. It is more about
>> the semantic of ARC for different sorts of ivars, than about
>> NSTextView itself. In the code you did send the tvIvar ivar was not
>> defined as a property. In this case I would expect that the
>> compiler wont do anything special.
>
> The semantics of ARC are not complicated when it comes to ivars.
> They simply do a retain of the new value then a release of the old
> one, unless the pointer is marked as __unsafe_unretained.  If we have
> public ivars in GNUstep headers that are intended to hold object
> references that are not retained, then an assignment to them from ARC
> code will break things.

Thank you David for this explanation. Did you also have a look at the
code Johannes did send?
His problem is not about any GNUstep ivar, but an ivar in his own code.
And the question at hand is whether this behaviour is to be expected, a
bug in GNUstep gui (highly unlikely as the other branch of his code
works) or a bug in libobjc2.
It would be great if you could comment on that.

Fred


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
---
CONFIDENTIALITY NOTE: The information in this email is confidential
and intended solely for the addressee.
Disclosure, copying, distribution or any other action of use of this
email by person other than intended recipient, is prohibited.
If you are not the intended recipient and have received this email in
error, please destroy the original message.
reply via email to

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