java.lang.VerifyError - Inconsistent args_size for invokeinterface

Hi
Using the latest stable release for Java project I get runtime Fatal exception :

class: consoleapplication6/TGIS_PvlViewerBmp,
method: MoveViewportEx
signature: (LRemObjects/Elements/System/VarParameter;
LRemObjects/Elements/System/VarParameter;)V)
Inconsistent args_size for invokeinterface

namespace consoleapplication6;

uses
  java.util;

type
  Program = class
  public
    class method Main(args: array of String): Int32;
    begin
      var bmp := new TGIS_PvlViewerBmp();
     // var x := 0.0;
      //var y := 0.0;
     // bmp.MoveViewportEx(x,y);
    end;
  end;
  
  IGIS_Viewer = public interface
    procedure MoveViewportEx( var _dx, _dy : Double ) ;
  end ;
  
  TGIS_PvlViewerBmp = public class (IGIS_Viewer)
  private
    PlatformControlVwr : IGIS_Viewer ;
  public
    method MoveViewportEx( var _dx, _dy : Double ) ;
    begin
      if assigned( PlatformControlVwr ) then
        PlatformControlVwr.MoveViewportEx( _dx, _dy ) ;
    end;
  end;

end.

consoleapplication6.zip (4.2 KB)

The problem is using var and Double. If I change Double to other types, it works. If I use java.lang.Double, it also works. So there must be something with RemObjects.Oxygene.System.Double. Please check and let me know if there is a fast way to solve the problem.

Thanks, regards
Artur

thanx for reporting this.

out of curiosity: is this a regression (ie same code was fine before), or this new code yule written and never tried to build/run on an lee compiler?

Logged as bugs://E27077.

The interface was old and working, even other classes using it worked fine. TGIS_PvlViewerBmp is a new code based on an older class and fails. It looks like two classes that have very similar implementations differ somewhere.
Maybe it’s just a side effect or the nested code matters. If I comment code using PlatformControlVwr inside MoveViewportEx(), it works. It also works if I declare PlatformControlVwr as a class instead of an interface.

1 Like