• 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: malloc/free problems within a thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: malloc/free problems within a thread


  • Subject: Re: malloc/free problems within a thread
  • From: Ken Tozier <email@hidden>
  • Date: Sat, 29 Jul 2006 17:50:42 -0400

Well here are a couple of the errors I'm seeing

PMServer X(21089,0x1863800) malloc: *** error for object 0x1861c00: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug
PMServer X(21089,0x1863800) malloc: *** set a breakpoint in szone_error to debug


I set the breakpoint as suggested but the debugger seems to be basically worthless. It keeps throwing up this error ""MyApp exited with status (1). The Debugger is still running. Use "Restart" to debug again". Problem is though the restart button is grayed out and the debugger it isn't in fact doing anything when I get this message. I submitted a debugger specific question related to this on XCode forum.

It seems like the NSAutorelease pool destroys all objects created within it regardless of whether they have a retain or not. That's the only thing I can think of. Is that what it does?



On Jul 29, 2006, at 4:47 PM, Ken Tozier wrote:

Hi

I have a process that spawns threads and inside these threads I malloc/free some memory but I'm getting either "xxx has exited due to signal 11 (SIGSEGV)" or "sigbus 10" errors. I know from past experience that these most likely indicate a non-retained object, problem is though that I checked very carefully and everything that I want to keep around is definitely retained. Could the fact that some objects were created inside a thread's NSAutorelease alloc/ release override the retain commands?

Thanks

Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >malloc/free problems within a thread (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: NSSearchField - detect loss of focus
  • Next by Date: Re: malloc/free problems within a thread
  • Previous by thread: malloc/free problems within a thread
  • Next by thread: Re: malloc/free problems within a thread
  • Index(es):
    • Date
    • Thread