• 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: Class gets EXC_BAD_ACCESS only as NSOperation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class gets EXC_BAD_ACCESS only as NSOperation


  • Subject: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 24 Mar 2009 07:53:30 -0700

On Mar 24, 2009, at 7:33 AM, James Maxwell wrote:
I have a method that I want to run in the background. When I run it in the app's main thread, all's well, but when I run it as an NSOperation I get an EXC_BAD_ACCESS error. The error happens when trying to initialize a local float array.

Simplify the problem; you have a "local float array" that "all's well on main thread", but it crashes when "run in the background".


OK -- NSOperation is a red herring.

You have a multithreading bug related to a simple data type.

So...

How do you initialize the float array? ... from main thread, used on background thread?

What other synchronization points do you have? ... what other data is shared?

Show some code?

b.bum

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Class gets EXC_BAD_ACCESS only as NSOperation
      • From: James Maxwell <email@hidden>
References: 
 >Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: Stop NSScrollView from catching scroll events.
  • Next by Date: Re: NSSegmentedControl send action only from the selected segment
  • Previous by thread: Class gets EXC_BAD_ACCESS only as NSOperation
  • Next by thread: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Index(es):
    • Date
    • Thread