AV in ORACOMMON10.DLL

ldsandon

Member³
Client: 10.1.0.5
Server: 10.1.0.5
DOA 4.0.7.1, BDS 2006.

When calling this SP using a ref cursor:

Code:
PROCEDURE GET_TREES(Trees OUT SYS_REFCURSOR)
IS
BEGIN
  OPEN Trees FOR
    SELECT TREE_ID, TREE_NAME, PROJECT_ID,
      MAIN_NODE FROM TREES;
END;
I get this exception:

Code:
-  First chance exception 0xC0000005 ACCESS_VIOLATION occurred at 0x60D9322D, read of address 0x00000094 at 0x60D9322D (in C:\Programmi\Oracle.1.0Client\BIN\oracommon10.dll)                                                                                           0x60D9322D vsnupr + 0x18ECD in oracommon10.dll
0x60D437A8 ttcfour + 0x1264 in oracommon10.dll
0x60D41099 ttcdrv + 0x381 in oracommon10.dll
0x607FE16D nioqwa + 0x2D in oran10.dll
0x617BF744 kgupftc + 0x21E74 in oraclient10.dll
0x6176D4DD upirtrc + 0x7D in oraclient10.dll
0x61755FBD kpurcsc + 0x6D in oraclient10.dll
0x617336AC kpuexInitStmh + 0x1A9C in oraclient10.dll
0x61734E35 kpuexec + 0xC65 in oraclient10.dll
0x616D1312 OCIStmtExecute + 0x22 in oraclient10.dll
I am using this code:

Code:
procedure TForm1.Button1Click(Sender: TObject);
var
  TreeCursor: TOracleQuery;
begin
  TreeCursor := TOracleQuery.Create(nil);
  try
    TreeCursor.Session := spGetTrees.Session;
    with spGetTrees do
    begin
      SetComplexVariable('RECORDSET', TreeCursor);
      Execute; // <- Exception
    end;
    // Load trees
    with TreeCursor do
    begin
      Execute;
      while not Eof do
      begin
        // Do someting here
        Next;
      end;
    end;
  finally
    TreeCursor.Free;
  end;
end;

// DFM

object spGetTrees: TOracleQuery
    SQL.Strings = (
      'begin'
      '  ADM_TREES.GET_TREES(:RECORDSET);'
      'end;')
    Session = ssSession
    Variables.Data = {
      03000000010000000A0000003A5245434F524453455474000000000000000000
      0000}
    Left = 160
    Top = 8
  end
Am I missing something, or is this a bug?
 
Tried with a TOracleDataset, then with Oracle R2 (10.2.0.3) - same error, even at design time now. This is the IDE stack trace:

Code:
+ E23[6101814F]{oracommon10.dll} vsnupr + E23
 + ___SNIPPET___[51F26B4B]{rtl100.bpl  } System.System.@HandleAnyException (Line 9980, "system.pas" + 13) + ___SNIPPET___
 + [7C913786]{ntdll.dll   } RtlConvertUlongToLargeInteger + 
 + [7C91EAF5]{ntdll.dll   } KiUserExceptionDispatcher + 
 + 3[60FF3BBF]{oracommon10.dll} vsnupr + 3
 + 3E[60FEDA46]{oracommon10.dll} ttcdrv + 3E
 + [60983AAB]{oran10.dll  } nioqwa + 
 + A7[61D1F473]{OraClient10.Dll} upicui2 + A7
 + D[61D14113]{OraClient10.Dll} upirtrc + D
 + [61CF8E38]{OraClient10.Dll} kpurcsc + 
 + F8[61CD1D38]{OraClient10.Dll} kpuexInitStmh + F8
 + 9[61CD3279]{OraClient10.Dll} kpuexec + 9
 + D[61C268C1]{OraClient10.Dll} OCIStmtExecute + D
 + A[1FE92E42]{oci.dll     } OCIStmtExecute + A
 + B[168B4117]{doa40d2006.bpl} Oracle.TOracleQuery.InternalExecute + B
 + $AA[168B4F32]{doa40d2006.bpl} Oracle.TOracleQuery.ExecuteArray + $AA
We have the support options, but I wouldn'yt bother support is this has been fixed in 4.1 - could I have a pre-release version to test?
 
There are no cursor related problems or fixes in 4.0 or 4.1. As a quick test, can you do the same with PL/SQL Developer 7.0.x?
 
I tested the stored procedure in SQL/Plus and Quest SQL Navigator, and it works.

I will download a trial copy of PL/SQL Developer and test it.
 
It looks it is TOracleSession.StatementCache set to True to trigger the AV. If I set it to false the AV does not happen.
 
Just a question: is this a DOA side issue, or an Oracle side issue? In the latter case I'll open a SR with Oracle.

Right now I do not need StatementCache set to true, having moved most SQL code to PL/SQL cursors will be cached by the PL/SQL engine itself, but I do not like that a simple property value will lead to a crash.
 
Access Violations in internal Oracle DLL's like oracommon10.dll are by generally an Oracle Client issue.
 
Back
Top