 |
 |
Hmm... malloc errors.
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
*** Malloc[7852]: error for object 0x5c1970: Incorrect check sum for freed object - object was probably modified after beeing freed; break at szone_error
(Cocoa, Objective-C)
Hmm... I have a similar function to the one that's giving me the errors, and that one works fine. Any ideas on what might cause this kind of error?
I'm not really freeing anything explicitly.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
Well, I've never gotten this error but my best guess would be that you autoreleased something, or appkit autoreleased something and you you used it again after it had been autoreleased. Since you aren't explicitely freeing or releasing anything that's the best that I can think of.
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
I tried doing this with STDIN, STDOUT, only normal C, and cc compilation (my functions were normal C functions, not class ones)...
This error still happens.
(??)
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Feb 2001
Location: Portland, OR, USA
Status:
Offline
|
|
The mention of "object" in the error message doesn't mean object in the Obj-C sense, it is just saying the one of your malloc()ed blocks got free()d, and then something wrote into that space after the free happened and before the memory got reused.
I.e. you have a wild pointer writing into freed memory somewhere. Could you post the function that's giving you the problems? Maybe we could tell where it is coming from...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
It actually keeps track of when you write to stuff that you've freed? I always thought that writing in memory that you no longer owned never generated any response (except maybe a crash) unless you ran it in malloc debug.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Feb 2001
Location: Portland, OR, USA
Status:
Offline
|
|
Yeah, I'm surprised too. You usually only see that error if you have malloc_debug turned on. Maybe that's the default in the beta builds?
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
I never figured out the error: it was quicker to re-write the thing from scratch.
But the _really_ odd thing was that if I ran it under MallocDebug, it wouldn't crash, and gave no trace whatsoever of wild pointers!
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|