• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa/Java - NSCoding woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa/Java - NSCoding woes


  • Subject: Re: Cocoa/Java - NSCoding woes
  • From: Aram Greenman <email@hidden>
  • Date: Fri, 28 Feb 2003 02:44:48 -0800

On Thursday, February 27, 2003, at 07:27 PM, Rams wrote:

The results are signal 6, 10, and 11 completely crashing my app a few seconds, within 30 or so, after I've run toolbar customization on a toolbar containing my widget. No exceptions are being thrown, everything is running fine for up to 30 seconds and then it just blanks out.

This is a guess but possibly the garbage collector has reclaimed an object that is still held in an instance variable on the other side of the bridge. This can happen with delegate objects for example:

public NSToolbar toolbar;

toolbar.setDelegate(new MyToolbarDelegate());

The gc will eventually reclaim the result of "new MyToolbarDelegate()" and the app will crash the next time the toolbar tries to access its delegate. The solution is to keep a reference to the delegate to protect it from the gc:

public NSToolbar toolbar;
private MyToolbarDelegate delegate;

delegate = new MyToolbarDelegate();
toolbar.setDelegate(delegate);

? Also, running debug executable in PB gives me zero useful information. (exited normally?) What can I do to catch some shred of information about the cause of these crashes?

Make sure your executable is set to debug with jdb instead of gdb.

Aram
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Cocoa/Java - NSCoding woes (From: Rams <email@hidden>)

  • Prev by Date: newbie q: including third-party dylib in app
  • Next by Date: Splitting A QuickTime Movie Into N Equal Parts?
  • Previous by thread: Cocoa/Java - NSCoding woes
  • Next by thread: newbie q: including third-party dylib in app
  • Index(es):
    • Date
    • Thread