Page 1 of 1

Access violation in 64 bit

Posted: Wed 25 Mar 2020 16:35
by jdorlon
Hello,

Using
Delphi Rad Studio 10.1 Berlin,
Compiling 64 bit WIndows. The error does NOT occur in 32 bit.
ODAC version 11.1.3

If I create these objects in an Oracle database (server or client version does not seem to matter. I tested in 19c and 12c release 2.)

Code: Select all

drop type type_level1;
drop type type_level2;

CREATE OR REPLACE TYPE TYPE_LEVEL2 AS Object
( a_number number,
  a_varchar2 varchar2(40),
  CONSTRUCTOR FUNCTION TYPE_LEVEL2 RETURN SELF AS RESULT
 );
/

CREATE OR REPLACE TYPE BODY TYPE_LEVEL2 IS
  CONSTRUCTOR FUNCTION TYPE_LEVEL2
  RETURN SELF AS RESULT
  IS
  BEGIN
    RETURN;
  END TYPE_LEVEL2;
END;
/

CREATE OR REPLACE TYPE TYPE_LEVEL1 AS Object
( a_number number,
  b_number number,
  a_type_level2 type_level2,
  CONSTRUCTOR FUNCTION TYPE_LEVEL1 RETURN SELF AS RESULT
)
/

CREATE OR REPLACE TYPE BODY TYPE_LEVEL1 IS
  CONSTRUCTOR FUNCTION TYPE_LEVEL1
  RETURN SELF AS RESULT
  IS
  BEGIN
    self.a_type_level2 := type_level2(0, null);
    RETURN;
  END TYPE_LEVEL1;
END;
/
Then run this SQL in a TSmartQuery, I get an access violation. If I use a NULL instead of 'a', there is no error.

Code: Select all

SELECT TYPE_LEVEL1(890480363, 
                   888445111,
                   type_level2(1, 'a')
                  )  
from dual;

Re: Access violation in 64 bit

Posted: Wed 01 Apr 2020 08:21
by MaximG
Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.