Page 1 of 1

Access violation - session loss?

Posted: Mon 10 Mar 2008 09:59
by etam
For a month in my customer we made a database merge.
(Combine existing databases to a central one.)

Before this I used I use ODAC 5.70.0.28 with Delphi7, Oracle 9.2.0.4.0.

Now I use ODAC v6.25.2.14, Delphi7, Oracle 10.2.0.3.0 (DB is in an other instrastructure). I know, this means a lot of changes.

Since this the program randomly stops, sometimes throws an access violation, sometime not even that.

I tried: back to prior ODAC - the same behaviour. Move to another database (Oracle 10.2.0.1.0, other machine, other subnet) - same.
So I bought Eurekalog, maybe I can track it. Cannot.
Tried to make oracle tracs (both server side, client side) - nothing.
Looked in Windows event viewer, in dr. Wattson - nothing.

But it seems that problems are with reaching database.
I bought ODAC source code, and now some typical call stack traces look like this:
EurekaLog 6.0.12
Exception:
-------------------------------------------------------------------------------------------------------------

2.2 Address : 004F2FFF
2.5 Type : EAccessViolation
2.6 Message : Access violation at address 004F2FFF in module 'katvizs.exe'. Read of address 03CF400C.
2.7 ID : B6C5
2.8 Count : 1
2.9 Status : New
2.10 Note :

Call Stack Information:
---------------------------------------------------------------------------------------------
|Address |Module |Unit |Class |Procedure/Method |Line |
---------------------------------------------------------------------------------------------
|*Exception Thread: ID=5184; Priority=0; Class=; [Main] |
|-------------------------------------------------------------------------------------------|
|004F2FFF|katvizs.exe|CLRClasses.pas |Marshal |ReadIntPtr |413[2] |
|004F2FFC|katvizs.exe|CLRClasses.pas |Marshal |ReadIntPtr |412[1] |
|005783A3|katvizs.exe|OraClasses.pas |TOCIRecordSet |CopyComplexFields |10138[9]|
|00509424|katvizs.exe|MemData.pas |TData |EditRecord |3503[5] |
|005093D4|katvizs.exe|MemData.pas |TData |EditRecord |3498[0] |
|00535FBF|katvizs.exe|MemDS.pas |TMemDataSet |InternalEdit |2374[10]|
|00535F60|katvizs.exe|MemDS.pas |TMemDataSet |InternalEdit |2364[0] |
|00547A06|katvizs.exe|DBAccess.pas |TCustomDADataSet|InternalEdit |4703[6] |
|006B0F97|katvizs.exe|UJegyzEredm.pas|TFormJegyzEredm |OKETorlesek |360[6] |
|006B0F70|katvizs.exe|UJegyzEredm.pas|TFormJegyzEredm |OKETorlesek |354[0] |
|006B0C84|katvizs.exe|UJegyzEredm.pas|TFormJegyzEredm |FormShow |312[91] |
|77F87FC0|ntdll.dll | | |RtlLeaveCriticalSection | |
|77E17662|user32.dll | | |SetWindowPos | |
|77E15D28|user32.dll | | |GetSysColor | |
|77E15D9D|user32.dll | | |IsWindowVisible | |
|77E4F545|user32.dll | | |MonitorFromWindow | |
|006B046A|katvizs.exe|UJegyzEredm.pas| |JegyzokonyvEredmeny |175[10] |
|006B03CC|katvizs.exe|UJegyzEredm.pas| |JegyzokonyvEredmeny |165[0] |
|006BDEA1|katvizs.exe|UJegyzElm.pas |TFormJegyzElm |AcEredmenyExecute |1771[10]|
|77E15BE8|user32.dll | | |IsWindow | |
|77F8745C|ntdll.dll | | |RtlMultiByteToUnicodeN | |
|77F87408|ntdll.dll | | |RtlAnsiStringToUnicodeString| |
|77E15D28|user32.dll | | |GetSysColor | |
|77E15D9D|user32.dll | | |IsWindowVisible | |
|77E15B72|user32.dll | | |DispatchMessageA | |
|77E15B6C|user32.dll | | |DispatchMessageA | |
|00724C5F|katvizs.exe|KatVizs.dpr | |katvizs |113[8] |
---------------------------------------------------------------------------------------------
UJegyzEredm.pas line 360 is:

Code: Select all

         QJegyzTet.Edit; // QJegyzTet is TSmartQuery

When tnsping server something like this repeats:
OK (10 ms)
OK (20 ms)
OK (10 ms)
OK (20 ms)
OK (0 ms)
OK (10 ms)
OK (20 ms)
OK (10 ms)
OK (20 ms)
OK (20 ms)
OK (2850 ms)
OK (20 ms)
OK (0 ms)
OK (20 ms)
OK (30 ms)
OK (10 ms)
OK (20 ms)
OK (10 ms)
OK (20 ms)
OK (20 ms)
OK (10 ms)
OK (20 ms)
OK (2930 ms)
OK (20 ms)
OK (20 ms)
The problem occurs mostly on .Edit, .Refresh, or on some other query methods. Since 2 days I have logs (about 10) with ODAC Source, too.
The problem cannot be reproduced, not deterministic.

Any idea why this or how can I find the solution?

Posted: Thu 13 Mar 2008 14:02
by Plash
We could not reproduce this problem, too. Try to write actions that your program makes to the log. Probably this can help to find the sequence that leads to access violation.
You can try to kill user's session before calling Edit method, and check if an access violation occurs.

Posted: Fri 14 Mar 2008 07:48
by etam
If I kill the user's session, the session reconnects (and the program realizes that and shows a message of it).

Logs; it is hard to write the actions, because I could write at about 50 kind of it, and they are quite long (thousands of statements before the error point).

On Monday we moved to another database, which reduced the number of problems (but why?!!!).
This week the errors mostly occured on Edit and Refresh statements.
Some of this are such like:
Query1.Refresh;
Query2.Refresh; // and the error occures here

Because of this I don't know where to search (no user action or wait statement between them).

Any idea?

tcpdump

Posted: Fri 11 Apr 2008 14:53
by etam
If I would send some tcpdump details, could you have a look on it?

Posted: Mon 14 Apr 2008 07:52
by Plash
You can send us TCP dump. But probably it cannot help us to find the problem.

Posted: Tue 15 Apr 2008 10:40
by etam
Now I see in 6.25.2.15 changelog:
Access violation on local sorting fixed

Can I ask what kind of bug was it?

Posted: Wed 16 Apr 2008 07:10
by Plash
An access violation was raised when sorting certain data using IndexFieldNames property.

Posted: Wed 16 Apr 2008 10:04
by Aufhauser
I have the same problems using ODAC 6.25.2.15 an Oracle 10.2.0.4 under Windows XP. I do a lot of inserts with prepared statements and after executing the statement ? times the program crashes. I cannot say how many times the insert statement works, it depents on version of ODAC (under 6.25.0.12 twice times) and - I don't know.

Using direct connect my programm works correct - perhaps the problem is OCI - I found an article on metalink:

https://metalink.oracle.com/metalink/pl ... ,helvetica