Compilation error when calling validate_conversion and working with Program window

SebG

Member²
Hello,
Working with PL/SQL Developer Version 14.0.6.1988 (64 bit) and Oracle DB version 19.10.0.0.0

When developing a package, if I compile it with SQL window in PL/SQL Developer all is good (same with sqlplus).
But When I compile it with Program window in PL/SQL Developer, compile of body failed with the following error and package body is invalid:

Compilation errors for PACKAGE BODY SEG.PKG_DUMMY
Error: PLS-00801: internal error [*** ASSERT at file pdz2.c, line 5378; The_Exp is null.; PKG_DUMMY__SEG__B__6267746[11, 4]]
Line: 11
Text: end;


I found that it is due to the usage of validate_conversion oracle function.

Here is the code of the dummy package done to reproduce:

SQL:
create or replace package pkg_dummy as
   procedure pr_test;
end pkg_dummy;
/
create or replace package body pkg_dummy IS
    procedure pr_test is
      l_dummy varchar2(10);
      l_res varchar2(1);
   begin
      if validate_conversion(l_dummy as number, '999D99') = 0 then
         l_res := 'Y';
      else
         l_res := 'N';
      end if;
   end;
end pkg_dummy;
/

Is it something known ? Any workaround ?

Thank you.
Seb.
 
If a compilation causes such an error and works correctly in SQL*Plus, then I suspect a problem with the "debug information" mode. To verify this, go to Preferences > Debugger tab page, disable the "Add debug information when compiling" option, and retry the compilation.

You can also explicitly exclude specific objects from debug information. On the same debugger tab page you can add a line with the name (or owner.name) of the program unit to the "NEVER add debug info for objects" list.

Let me know how this turns out.
 
I confirm by unticking Add debug information when compiling error does not occur anymore.

But does it mean I will not be able to debug the package where validate_conversion function is used ?
This could be an issue because we discovered this issue when we wanted to debug the package.
Thanks
 
I reproduce in sqlplus by adding debug option during compile:
alter package pkg_dummy compile debug body;
I will review with DBA.
Thanks
 
Back
Top