#1  
Old 18th August 2004, 04:40 AM
GravityTester
 
Posts: n/a
Default Unknown (unexpected exception object raised) [$3CA1/15521]"

Anybody know what could cause the following exception?:

NexusDB: quNotLoggedIn: Unknown (unexpected exception object raised)
[$3CA1/15521]"

The exception gets thrown infrequently, but enough to be a problem when
the MyDm.quNotLoggedIn.Open below gets called. quNotLoggedIn contains a
very simple SQL query:

SELECT * FROM trakers
where tid = :aTID

UpdateHBStatus gets called by a TCP/IP thread, but the critical section
code should prevent any reentrancy problems, no?

I am using a paid up Nexus v1.07 registered to safeenv.com

TIA!

Kevin

-----------------------%------------------------
PROCEDURE TMainForm.UpdateHBStatus(HB : THeartBeatAckPacket; IP : STRING);
VAR
id : LONGWORD;
LoginStat : TLoginStat;
BEGIN
TRY
TRY
CritSecAcquire;
// find TID in trakers table
MyDm.quNotLoggedIn.ParamByName('aTID').AsInteger := HB.TID;
MyDm.quNotLoggedIn.Open;
IF MyDm.quNotLoggedIn.EOF THEN BEGIN
// unknown traker id. Add it?
LogMsg(Format('unknown TID: %d', [HB.TID]), EWARN);
END
ELSE BEGIN
LogMsg(Format('found TID: %d', [HB.TID]), EDEBUG);
LoginStat :=
TLoginStat(MyDm.quNotLoggedIn.FieldByName('loginst at').AsInteger);
id :=
MyDm.quNotLoggedIn.FieldByName('id').AsInteger;
CASE LoginStat OF
ENOTLOGGEDIN,
ELOS :
BEGIN
MyDm.quTrakerUpdate.ParamByName('aTID').AsInteger
:= HB.TID;

MyDm.quTrakerUpdate.ParamByName('aLH').AsDateTime := Now;
MyDm.quTrakerUpdate.ParamByName('aLIS').AsInteger :=
Ord(ESIKEINPROGRESS);
MyDm.quTrakerUpdate.ParamByName('aIP').AsString
:= IP;
MyDm.quTrakerUpdate.ExecSQL;
MyDm.quTrakerUpdate.Close;
END;
ESIKEINPROGRESS : // error condition
BEGIN
ResetCommanderLOSTimer(IP);
LogMsg('Invalid status ESIKEINPROGRESS in
Trakers', EINFO);
END;
ELOGGEDIN : // good
begin
LogMsg(Format('ELOGGEDIN TID: %d', [HB.TID]),
EDEBUG);
ResetCommanderLOSTimer(IP);
end;
END;
END;
FINALLY
MyDm.quNotLoggedIn.Close; // paranoia
CritSecRelease;
END;
EXCEPT
ON E : Exception DO
LogExceptionMsg(E.Message, EWARN);
END;
END;

//---------------------
  #2  
Old 18th August 2004, 05:06 AM
Brian Evans [NDX]
 
Posts: n/a
Default Re: Unknown (unexpected exception object raised) [$3CA1/15521]"

GravityTester wrote:

> Anybody know what could cause the following exception?:
>
> NexusDB: quNotLoggedIn: Unknown (unexpected exception object raised)
> [$3CA1/15521]"
>
> The exception gets thrown infrequently, but enough to be a problem when
> the MyDm.quNotLoggedIn.Open below gets called. quNotLoggedIn contains a
> very simple SQL query:
>
> SELECT * FROM trakers
> where tid = :aTID
>
> UpdateHBStatus gets called by a TCP/IP thread, but the critical section
> code should prevent any reentrancy problems, no?


Critical sections serialize access to global memory and must be placed
around ALL code that accesses the memory you want to serialize access
to. My guess is elsewhere in the app you access the same objects as
in this method without using a critical section.

Brian Evans [NDX]

  #3  
Old 18th August 2004, 06:53 AM
GravityTester
 
Posts: n/a
Default Re: Unknown (unexpected exception object raised) [$3CA1/15521]"

Brian Evans [NDX] wrote:

> Critical sections serialize access to global memory and must be placed
> around ALL code that accesses the memory you want to serialize access
> to. My guess is elsewhere in the app you access the same objects as
> in this method without using a critical section.


Brian,

The only place quNotLoggedIn is used is inside this function, bracketed
by critical section calls. Should I be concerned about the table it
accesses as well? Thats the only thing I can think of... What does the
exception message mean? Any clues there?

Kevin
  #4  
Old 18th August 2004, 08:32 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Unknown (unexpected exception object raised) [$3CA1/15521]"

> The only place quNotLoggedIn is used is inside this function,
> bracketed by critical section calls. Should I be concerned about the
> table it accesses as well? Thats the only thing I can think of...
> What does the exception message mean? Any clues there?


The exception originates at the server and is, ahem, unexpected (something
not accounted for). See if you have a logfile from the server with an
exception stack trace (you may have to compile the server with the exception
trace define turned on + mapfile, and set log file parameters in the server
UI).

Would you happen to have a reproducable case we could look at?

--

Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com


  #5  
Old 18th August 2004, 10:19 AM
GravityTester
 
Posts: n/a
Default Re: Unknown (unexpected exception object raised) [$3CA1/15521]"

Eivind Bakkestuen [NDD] wrote:

> See if you have a logfile from the server with an
> exception stack trace (you may have to compile the server with the exception
> trace define turned on + mapfile, and set log file parameters in the server
> UI).


I found {$DEFINE NX_EXCEPTION_LOG} in nxDefine.inc and uncommented it. I
recompiled with detailed map turned on in the linker settings. I turned
on every logging checkbox I could find in the GUI and put in a fully
qualified path and filename for the log file into the Event Log field.

Nada. No logs of any sort get saved. Am I doing something wrong?
Shouldn't it log transactions at the very least?

> Would you happen to have a reproducable case we could look at?
>


That would be difficult.

The project is pretty huge, plus its a TCP/IP client server app. You'd
need 3 or 4 clients running, accessing my server program. My server
accesses the Nexus Server - the clients don't access the Nexus server
directly.

Kevin

kevinm somewhere at safeenv dot com
  #6  
Old 18th August 2004, 02:09 PM
Thorsten Engler [NDA]
 
Posts: n/a
Default Re: Unknown (unexpected exception object raised) [$3CA1/15521]"

> UpdateHBStatus gets called by a TCP/IP thread, but the critical
> section code should prevent any reentrancy problems, no?

No it doesn't. You are only protecting this single query object. But not the
database and session it belongs to. A Session and all the databases / tables
/ queries attached to it may only be used by a single thread at a time. I
would assume you have other components that use the same session that are
not protected by your critical section. You either need to add critical
sections to everything that uses the same session or you should create
session and database components that are only used for this single query.

Cheers,
Thorsten Engler [NexusDB Architect]




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected exception object raised: [EAbort] Grant Brown nexusdb.public.support.sql 2 28th June 2008 10:38 PM
server exception object has unknown error code =?Windows-1252?Q?Martin_B=F6gel?= nexusdb.public.support.sql 3 31st May 2007 03:40 PM
Unexpected exception object raised Grant Brown nexusdb.public.support.sql 6 7th May 2007 07:22 PM
2.0595 Unable to resolve identifier [$3CA1/15521] David Charron nexusdb.public.support.sql 4 17th August 2006 12:56 PM
v2.03 Unknown server exception David Charron nexusdb.public.support.sql 1 12th November 2005 09:48 AM


All times are GMT +11. The time now is 04:38 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.