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

about NSThread crash


  • Subject: about NSThread crash
  • From: Chris(吴潮江) <email@hidden>
  • Date: Wed, 24 Jun 2009 14:12:16 +0800
  • Importance: Normal

Hi,
I have some problems when to using thread. As we all know, there is a method to create a thread,
+ (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument.
- (void)aSelector:(id)anArgument
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    //  Here I implement FTP functions. e.g. download/ pause download/ resume download file.
    [pool release];
    [NSThread exit];
}
To my surprise, when downloading a file, I pause download and no error display. Then I resume to download file,
it's ok. However, at this time I pause download file, there will be a error showing EXC_BAD_ACCESS and the stack
information is:
mach_msg_trap
mach_msg
CFRunLoopRunSpecific
CFRunLoopRunInMode
RunCurrentEventLoopInMode
ReceiveNextEventCommon
BlockUnitlNextEventMatchingListInMode
_DPSNextEvent
_[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
_[NSApplication run]
NSApplicationMain

I don't know why?
Please tell me the reason if anyone knows.
Thanks.
_______________________________________________

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: about NSThread crash
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Selectively using formatter in table view text cell
  • Next by Date: Re: about NSThread crash
  • Previous by thread: Re: Selectively using formatter in table view text cell
  • Next by thread: Re: about NSThread crash
  • Index(es):
    • Date
    • Thread