• 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: SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView


  • Subject: Re: SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView
  • From: Tom Waters <email@hidden>
  • Date: Mon, 14 May 2001 15:32:52 -0700

The table view isn't retaining the object you return from objectValueForColumn, so they work the first time, until java calls gc() and the objects go away.

Make sure that you keep a reference in java to anything you return to the table view, so they won't get garbage collected and things will work better.

I doubt this is the way apple wanted the java bridge to work in this case, but I think this is a reasonable workaround.

On Monday, May 14, 2001, at 01:54 PM, Nick Emery wrote:

hi,

i'm building a java cocoa application using project builder and interface
builder and seem to be getting a crash that i can't explain. any help would
be much appreciated.

here are the details:

the app consists of a single window which contains an NSComboBox and an
NSTableView. the combo box is set up with some strings. the idea is that
you can select one of these strings, or type in some other text and the app
uses this text to lookup information in a database. the database lookup
results are then displayed in the NSTableView.

i've assigned the NSComboBox action to a method which does the search and
then sets the results in the NSTableView's associated data source class.
once the data is set, it then calls NSTableView.reloadData to get the table
displayed correctly.

this all works fine the first time the NSComboBox's action is taken, but on
subsequent calls, the entire app crashes sometimes with a SIGSEGV and
sometimes with a SIGBUS. as i've not written any c/c++/obj-c code, i'm at a
bit of a loss as to how to proceed to find out what is causing the problem.
any help...


  • Follow-Ups:
    • Re: SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView
      • From: "Nick Emery" <email@hidden>
References: 
 >SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView (From: "Nick Emery" <email@hidden>)

  • Prev by Date: Re: Volume Tracking in Cocoa without Carbon?
  • Next by Date: Programmatically changing the mouse scaling
  • Previous by thread: SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView
  • Next by thread: Re: SIGSEGV/SIGBUS in java cocoa app using NSComboBox and NSTableView
  • Index(es):
    • Date
    • Thread