Crash 'EXC_BAD_ACCESS' when calling CreateDatabase() in C++ VSDK

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jun 1 09:22:59 CDT 2006


On 6/1/06 1:07 AM, "Matthew Jew" <mjew at icnc.com> wrote:

> The database is created when my C++ object is created.
> 
> The object constructor is:
> 
> DbValentinaBase::DbValentinaBase()
> {
> // This routine knows not to initialize more than once
>      PVInitializeDBSystem();
> 
> DB = FBL::CreateDatabase();

Please try use here
        VSQL::CreateDatabase();

I am not sure that we have prove that FBL::Database work itself.

Do you use SQL ?

> }
> 
> // And the initializing routine is:
> 
> static long gPVDBSystemRefCount = 0;
> 
> static unsigned long gPVSizeOfDBCache = 0;
> static unsigned long gPVDefaultSizeOfDBCache = 16 * 1024 * 1024;
> 
> void PVInitializeDBSystem( unsigned long cacheSize )
> {
> unsigned long cacheSizeToUse;
> 
> if ( gPVDBSystemRefCount <= 0 )
> {
> if ( cacheSize > 0 )
> {
> cacheSizeToUse = cacheSize;
> } else {
> cacheSizeToUse = gPVDefaultSizeOfDBCache;
> }
> 
> // initialize the Valentina kernel: cache size, MacOS serial
> number, Windows serial number
> gPVSizeOfDBCache = ValentinaInit( cacheSize,
> kOurValentinaSerialNumber, NULL );
> printf( "ValentinaInit: gPVSizeOfDBCache = %lu\n",
> gPVSizeOfDBCache ); // DEBUG: REMOVE LATER Prove we initialized
> 
> gPVDBSystemRefCount = 1;
> } else {
> ++gPVDBSystemRefCount;
> }
> }

-- 
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