Board index » delphi » System has been illegally reentered.

System has been illegally reentered.

Hi Eric,

I wrote a ISAPI DLL with the latest Delphi C/S using Paradox Engine, putted on
our NT Web Server. After running about 12 hours, we get a BDE Error message,
saying

"SYSTEM HAS BEEN ILLIGALLY RE_ENTERED".

I searched Borland Technical Support. It listed the error message ID as #2107 and
classified as "System-related fatal error". No any other information is found on
what causes the problems or how to work arround it.

I will appreciate if you or any database experts know what causes the error.

Steve Koterski, Scott Frolich and other database experts:

We really appreciate your help. We are desperately trying to find the reason.
THANKS A LOT.

Alice

Quote
Eric Wilson wrote:
> Nathan Lloyd wrote:

> > We are developing an application with Delphi 3.02 BDE 4.51.  On trying to
> > use DBI function DBIREGENINDEXES, we are getting a violation 217 "System
> > has been illegally reentered.  We have closed the files and reopened in
> > exlusive mode, and the program seems to be working most of the time;
> > however, after we run one specific program using a specific form, and try
> > to do the same thing, we find this error. If anyone could tell us what this
> > error means, or how to correct it, we would greatly appreciate it.
> > Thanks.

> This is a most annoying error as it comes at random and with no apparent
> consistency.  It is a BDE error which we believe may be caused by a
> timing problem.  In our application, we are calling external DLL's which
> also perform functions on the database.  We're currently testing to see
> if intentionally slowing down the code eliminates this error.  I'll let
> you know what we learn.

> Are you doing anything on the form you mentioned that could result in a
> problem due to timing?

> Eric Wilson

 

Re:System has been illegally reentered.


Alice,

Are you running a multi-threaded application, or is a multi-threaded
outside process accessing the same database yours is?  If so, one
possible solution which we are currently testing, is to use a separate
TSession component for our TDatabase component.  I'll keep you updated
as to the results of our testing.

Eric Wilson

Quote
alice wrote:

> Hi Eric,

> I wrote a ISAPI DLL with the latest Delphi C/S using Paradox Engine,
> putted on our NT Web Server. After running about 12 hours, we get a
> BDE Error message, saying

> "SYSTEM HAS BEEN ILLIGALLY RE_ENTERED".

> I searched Borland Technical Support. It listed the error message ID
> as #2107 and classified as "System-related fatal error". No any other
> information is found on what causes the problems or how to work
> arround it.

> I will appreciate if you or any database experts know what causes the
> error.

> Steve Koterski, Scott Frolich and other database experts:

> We really appreciate your help. We are desperately trying to find the
> reason. THANKS A LOT.

> Alice

Re:System has been illegally reentered.


News for anyone encountering this problem.  We have been able to resolve
it by wrapping the call to the multi-threaded C++ DLL we're calling in a
Delphi-spawned thread, and using WaitFor to wait for the return value
from the DLL function.  I'm not altogether sure why this fixed the
problem, but I'm happy to report that it did.  If anyone can shed some
light on the inner workings of the BDE as respects its thread safety,
I'd appreciate hearing more.

Eric Wilson
Cerebrum Consulting Inc.

Quote
Eric Wilson wrote:

> Alice,

> Are you running a multi-threaded application, or is a multi-threaded
> outside process accessing the same database yours is?  If so, one
> possible solution which we are currently testing, is to use a separate
> TSession component for our TDatabase component.  I'll keep you updated
> as to the results of our testing.

> Eric Wilson

> alice wrote:

> > Hi Eric,

> > I wrote a ISAPI DLL with the latest Delphi C/S using Paradox Engine,
> > putted on our NT Web Server. After running about 12 hours, we get a
> > BDE Error message, saying

> > "SYSTEM HAS BEEN ILLIGALLY RE_ENTERED".

> > I searched Borland Technical Support. It listed the error message ID
> > as #2107 and classified as "System-related fatal error". No any other
> > information is found on what causes the problems or how to work
> > arround it.

> > I will appreciate if you or any database experts know what causes the
> > error.

> > Steve Koterski, Scott Frolich and other database experts:

> > We really appreciate your help. We are desperately trying to find the
> > reason. THANKS A LOT.

> > Alice

Other Threads