gnustep-dev
[Top][All Lists]
Advanced

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

Re: NSClassSwapper leaving dangling pointers?


From: Luboš Doležel
Subject: Re: NSClassSwapper leaving dangling pointers?
Date: Tue, 25 Jun 2013 20:57:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Hi,

I've contacted the author and it seems it doesn't serve any purpose at
all, as is.

"Sounds like one of the character encoding popups. The actual contents
of the menu are built dynamically at runtime."

Which sounds logical, given that the item's description is "dummy" (and
the replacement class is "TUEncodingPopUp".

Either way, GNUstep should somehow support it. What I don't understand
why isn't NSClassSwapper used only to determine the real class name. Why
first create a different object only to destroy it moments later?

I also couldn't find out why -initWithCoder: on the new object doesn't
replace the child objects as well - which I'd guess would mitigate the
problem too.

Luboš


On 06/24/2013 09:07 PM, Fred Kiefer wrote:
> This backtraces finally helped me understand what goes on here a bit
> better, at least I hope so.
> 
> NSClassSwapper not only replaces a specific object, it also registers
> itself as the delegate of the decoder to be able to replace the cells
> used by that object. This happens here and the decoded cell gets
> replaced by a newly created cell without transfering any of the
> already set values.
> 
> What I still don't understand is why the menu item uses its menu cell
> as the target. This ould be another difference to the GNUstep
> implementation. Could you please try to find out what the used action
> is?
> 
> At the moment I still don't have an idea how we could work around
> this issue. We should try to find out more about it.
> 
> Fred
> 
> On the road
> 
> Am 24.06.2013 um 11:49 schrieb Luboš Doležel <address@hidden>:
> 
>> Sorry for the spam, I have another backtraces providing a clear
>> picture, alhough they seem to be slightly different from the ones
>> before.
>> 
>> You can see an object being set as a target, then deallocated and
>> then used (with SIGSEGV).
>> 
>> Luboš
>> 
>> 
>> On Mon, 24 Jun 2013 10:21:18 +0200, Luboš Doležel wrote:
>>> What I forgot to add:
>>> 
>>> Until gnustep-gui supports resource directory names like
>>> "en.lproj", you have to symlink English.lproj->en.lproj to make
>>> it work (GNUstep bug #36764). This bug also prevents apps from
>>> working when mounted directly from a .dmg file via my FUSE
>>> module, since the mounts are read-only.
>>> 
>>> Lubos
>>> 
>>> On Mon, 24 Jun 2013 09:52:51 +0200, Luboš Doležel wrote:
>>>> Hi,
>>>> 
>>>> great! Feel free to contact me via Jabber (same as mail
>>>> address), should you run into any issues.
>>>> 
>>>> Attached is the backtrace leading up to NSClassSwapper, as
>>>> Germán requested.
>>>> 
>>>> Lubos
>>> 
>> <darling-unarchiver2.txt> 
>> _______________________________________________ Gnustep-dev mailing
>> list address@hidden 
>> https://lists.gnu.org/mailman/listinfo/gnustep-dev
> 


-- 
Luboš Doležel



reply via email to

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