• 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: NSThread question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSThread question


  • Subject: Re: NSThread question
  • From: Chris Purcell <email@hidden>
  • Date: Wed, 20 Feb 2002 22:42:35 +0000

AppKit stuff is not thread safe IIRC. Try removing the reloadData call; if that stops the crashing, you can use distributed objects to factor it back in.

Kritter

Hi,

I'm working on a ObjC Cocoa app which makes use of the output of a
command line tool.

Since I didn't want to wait for the output I put all the command line
accessing stuff into a new thread using:

[NSThread detachNewThreadSelector: @selector(getDataAndInsert:)
toTarget:self withObject:sender];

Now, what I do in "getDataAndInsert:" is calling this command line tool,
read the output and create a new record for my NSTableView. After adding
the record to my data source, I call [myTableView reloadData] to update
the table view. However, this line causes a crash - always (signal 6
(SIGABRT))! I tried without the line and there are no problems. I'm a
bit clueless why this happens...

Any ideas?

Thank you,
Fabio
_______________________________________________
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.

  • Prev by Date: GIF generation using NSBitmapImageRep
  • Next by Date: Re: NSLayoutManager question
  • Previous by thread: Re: NSThread question
  • Next by thread: Re: NSThread question
  • Index(es):
    • Date
    • Thread