Crash 'EXC_BAD_ACCESS' when calling CreateDatabase() in C++ VSDK
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Jun 2 10:37:44 CDT 2006
On 6/2/06 10:32 AM, "Matthew Jew" <mjew at icnc.com> wrote:
>> if( gCache )
>> return gCache->get_ByteSize();
>> else
>> return 0;
>>
>> Strange, sounds like cache was not allocated.
>>
>>
>
> Yes, the cache seems to have not been allocated.
> Is there any error message or error code that is set somewhere when
> this happens?
>
> I am continuing to try different settings and options.
ulong ValentinaInit(
ulong inCacheSize,
char* inMacSN,
char* inWinSN )
{
// on the potential second call we must do nothing.
if( gCache == NULL )
{
Init_ValentinaDlls();
// First of all we search for VComponents folder.
FindVComponents();
// init path to ICU .dat file.
// Inidirectly this will init gComponentsPath if it is
// not inited yet.
Valentina_Init_ICU();
// PROTECTION: the minimal size of cache 1MB.
if( inCacheSize < 1024 * 1024 )
inCacheSize = 1024 * 1024;
if( inCacheSize > 0 )
{
init_plugins();
// FIXME: get a correct path from user for non-English lang.
LoadErrorResource( NULL );
gCache = new Cache( inCacheSize, kPageSize, 1 );
gCache2 = new Cache( 2 * (32 * 1024), kPageSize, 2 );
gCache3 = new Cache( 172 * (32 * 1024), kPageSize, 3 );
}
SetDefaultExtentions();
}
if( gCache )
return gCache->get_ByteSize();
else
return 0;
}
As you can see we simply try allocate cache by new.
And then we check that point is not NULL.
MAY BE you have send to ValentinaInit() very big value of cache size ?
I do not see any other reason.
-----
Also often help next:
run your built app from Finder by double click
and see output in console.app
sometimes it show system - level errors
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list