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: Mon, 24 Jun 2013 09:52:51 +0200
User-agent: Roundcube Webmail/0.5

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

[1] https://github.com/LubosD/darling-dmg

On Sun, 23 Jun 2013 19:39:54 -0400, Gregory Casamento wrote:
I am going to set up darling to test this. I wrote nsclassswapper. 

On Saturday, June 22, 2013, Luboš Doležel wrote:

Hi,

I'm actually not porting the code - I'm writing a Wine-like
emulation layer called Darling to run OS X apps directly. This fact
makes debugging slightly more difficult, but you're welcome to take
a look at http://github.com/LubosD/darling. [2]

I find the bug straightforward, class swapping should happen
before action/target binding, but I may be wrong indeed.

Germán, I'll mail a longer backtrace as soon as possible.

Luboš

Dne 22. června 2013 16:38:26 Eric Wasylishen napsal:

Hi Luboš,

I'm not too familiar with nib loading internals, but I will try
to take a look. Could you  upload your work in progress code
somewhere? (Or do you have any changes to the original Mac
source?)

Cool idea to port the unarchiver. :-)

Cheers,
Eric

On Jun 21, 2013 11:30 AM, "Luboš Doležel" wrote:

Hi,

I'm still working on getting the latest The Unarchiver for OS
X working under GNUstep/Darling/Linux and I'm seeing crashes
after the application's NIB file is loaded.

Now I'm sort of helpless. The crash happens when using the
target of a certain NSMenuItem.

You can see an excerpt of the relevant NIB's source here; the
NSMenuItem clearly refers to the NSPopUpButtonCell that it is
part of:

  -2076180416
  2048
 
 
  109199360
  1
 
 
 
   
 
  400
  75

 
   
   dummy
   
   1048576
   2147483647
   1
   
   
   _popUpItemAction:
   
 

(Full code can be found in The Unarchiver's source tarball in
MainMenu.nib/designable.nib)

I can see the target being set correctly via -setTarget upon
loading:

Breakpoint 3, -[NSMenuItem setTarget:] (self=0x1845808,
_cmd=0x7ffff7a51eb0 , anObject=0x1843d58) at NSMenuItem.m:465
465       if (_target == anObject)
(gdb) p anObject
= (id) 0x1843d58
(gdb) p anObject->isa
= (struct objc_class *) 0x7ffff7a6bcc0

Backtrace:

#0  -[NSMenuItem setTarget:] (self=0x189de68,
_cmd=0x7ffff79f7ce0 , anObject=0x1429f18) at NSMenuItem.m:465
#1  0x00007ffff745354e in -[NSNibControlConnector
establishConnection] (self=0x189de38, _cmd=0x7ffff7afe330 ) at
NSBundleAdditions.m:177
#2  0x00007ffff76cfb91 in -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] (self=0x14be778,
_cmd=0x7ffff7afdf70 , owner=0xe67488,
    topLevelObjects=0x0) at GSNibLoading.m:1926
#3  0x00007ffff76cff26 in -[NSIBObjectData awakeWithContext:]
(self=0x14be778, _cmd=0x7ffff7b1a170 , context=0xcb09f8) at
GSNibLoading.m:1982
#4  0x00007ffff771028e in -[GSNibLoader
loadModelData:externalNameTable:withZone:] (self=0xde8158,
_cmd=0x7ffff7a56260 , data=0xeffb58, context=0xcb09f8,
    zone=0x329060bb38 ) at GSNibLoader.m:87
#5  0x00007ffff753f57d in -[NSNib
instantiateNibWithExternalNameTable:withZone:] (self=0xecf938,
_cmd=0x7ffff79f7b00 , externalNameTable=0xcb09f8,
    zone=0x329060bb38 ) at NSNib.m:153
#6  0x000

--
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org [3]
 http://heronsperch.blogspot.com [4]


Links:
------
[1] http://wakaba.c3.cx/s/apps/unarchiver.html
[2] http://github.com/LubosD/darling.
[3] http://www.gnustep.org
[4] http://heronsperch.blogspot.com

--
Luboš Doležel

Attachment: swapper-bt.txt
Description: Text document


reply via email to

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