VSDK.framework 1.9.8 problem using VDK_String = assignment

Matthew Jew mjew at icnc.com
Fri Aug 1 02:37:30 CDT 2003


On Friday, August 1, 2003, at 02:10  AM, Ruslan wrote:

> on 8/1/03 5:15, Matthew Jew at mjew at icnc.com wrote:
>
>> Ruslan,
>>
>> I am using the newly uploaded PB 1.9.8 VSDK.framework.
>>
>> I compile and run the "Valentina Cocoa Test" (unmodified).
>>
>> The following errors occur:
>>
>> *** malloc[1284]: Deallocation of a pointer not malloced: 0x24d000;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> *** malloc[1284]: Deallocation of a pointer not malloced: 0x24cfd0;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> *** malloc[1284]: Deallocation of a pointer not malloced: 0x24cfe0;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> *** malloc[1284]: error for object 0x1de970: Incorrect checksum for
>> freed object - object was probably modified after being freed; break 
>> at
>> szone_error
>> *** malloc[1284]: error for object 0x203ba0: Incorrect checksum for
>> freed object - object was probably modified after being freed; break 
>> at
>> szone_error
>> *** malloc[1284]: Deallocation of a pointer not malloced: 0x24d000;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> *** malloc[1284]: Deallocation of a pointer not malloced: 0x24cff0;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> *** malloc[1284]: error for object 0x1da900: Incorrect checksum for
>> freed object - object was probably modified after being freed; break 
>> at
>> szone_error
>>
>> It is happening in the string assignments, such as
>>
>>  [[self database] databaseDefinition]->getWordTable()->mfWord =
>> [foundWord UTF8String];
>>
>> The error doesn't happen on the first string assignment. But on the 
>> 2nd
>> and later passes
>> through the loop, the error occurs.
>>
>> It seems the VDK_String "=" operator is causing this error on the 2nd
>> usage.
>
> Probably in example was used free(), but must be used delete.
> Because inside of kernel I use new. So outside must be used delete.
>
> It seems I have forget put updated example from Arthur.
> I will send you updated example for test/
>
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
>
Ruslan,

I don't think it is just a problem with Arthur's code in the original 
example.
I actually saw this error with my own code, and I tried several 
different
ways to do the = assignment. They all generated the malloc error.
This malloc error does not occur in the 1.9.7 framework in any of the
samples or my own code. But if you link in the 1.9.8 framework, you get
the error consistently.

Also, I accidentally deleted the email message with Arthur's update 
example.
Could you please re-send it?

TIA

- Matthew



More information about the Valentina mailing list