Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread AV occur when several threads is initializing a session.
Sat, Jul 16 2011 3:00 AMPermanent Link

Sergey A. Kolotov

TDBISAMEngine is not thread-safe!
Initializing a Engine (Engine.Active:=True) occur when session is initializing.

// DBISAM 4.29 Build 4
procedure TDataEngine.Initialize(...);
begin
  Randomize;
  FIsWindows95:=(OSGetVersion=4.00) and (OSGetPlatform=VER_PLATFORM_WIN32_WINDOWS);
  FLockFileName:=LockFile;


// DBISAM 4.30 Build 6
procedure TDataEngine.Initialize(...);
begin
  PopulateLocales;  // <--- AV occur here
  Randomize;
  FIsWindows95:=(OSGetVersion=4.00) and (OSGetPlatform=VER_PLATFORM_WIN32_WINDOWS);
  FLockFileName:=LockFile;
Fri, Jul 22 2011 5:03 AMPermanent Link

Matthew Jones

Did this get resolved? I'm worried about upgrading with this present as I'm a heavy
user of threading and DBISAM.

/Matthew Jones/
Mon, Jul 25 2011 2:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sergey,

<< TDBISAMEngine is not thread-safe!
Initializing a Engine (Engine.Active:=True) occur when session is
initializing. >>

In general, you do not want the auto-activation of the engine to occur from
within a threaded session instance.  Just set the engine to active before
starting any threads, and you'll be fine.

I'll put a critical section around the engine activation in the next DBISAM
build.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image