View Issue Details

IDProjectCategoryView StatusLast Update
0036720FPCCompilerpublic2020-02-21 21:35
Reportersoerensen3Assigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSLinuxOS Version5.4.15-2-MANJARO
Product Version3.3.1Product Buildr43411 
Target VersionFixed in Version3.3.1 
Summary0036720: Internal error 200709083 when mixing CORBA interfaces with COM interfaces
DescriptionI stumbled on this by accident because I forgot to set the {$interfaces CORBA} switch in one unit. The bug occured when I inherited one Interface from a CORBA interface, but only in combination with a forward declaration. It is probably best if you have a look at the source or "Steps to reproduce" to understand the problem.


Steps To ReproduceFor the full code please see the attachment.

The bug only occured (for me) if all these conditions where met:

Please assume the following:
- Interface1 is a Corba interface
- Interface2 and Interface3 are COM Interfaces

  IInterface3 = interface; // <-- IInterface3 is forward declared because it is referenced in IInterface2
  IInterface2 = interface ( IInterface )
    ['{EB2E9267-C542-4784-81AE-A4C6ED044748}']

    function DoSomethingElse: IInterface3;
  end;

  IInterface3 = interface( IInterface2 ) // <-- IInterface3 inherits IInterface2
    ['{EB2E9267-C542-4784-81AE-A4C6ED044748}']
    function DoSomethingCompletelyDifferent: Integer;
  end;

This still compiles but until this:

( a as IInterface2 ).DoSomethingElse; //<-- internal error here.
Additional InformationThis report is about getting an internal error instead of a more helpful error message.
Tagscom, corba
Fixed in Revision44221
FPCOldBugId
FPCTarget-
Attached Files
  • project1.lpi (1,678 bytes)
  • project1.lpr (109 bytes)
  • project1.lps (1,401 bytes)
  • unit1.pas (228 bytes)
    unit Unit1;
    
    {$mode objfpc}{$H+}
    {$interfaces CORBA}
    
    interface
    
    uses
      Classes, SysUtils;
    
    type
      IInterface = interface
        ['{BD11C7E5-5EF3-4F2A-B047-54FFA8ED43A9}']
    
        procedure DoSomething;
      end;
    
    
    implementation
    
    end.
    
    
    unit1.pas (228 bytes)
  • unit2.pas (426 bytes)
    unit Unit2;
    
    {$mode objfpc}{$H+}
    
    interface
    
    uses
      Classes, SysUtils,
      Unit1;
    
    type
      IInterface3 = interface;
      IInterface2 = interface ( IInterface )
        ['{EB2E9267-C542-4784-81AE-A4C6ED044748}']
    
        function DoSomethingElse: IInterface3;
      end;
    
      IInterface3 = interface( IInterface2 )
        ['{EB2E9267-C542-4784-81AE-A4C6ED044748}']
        function DoSomethingCompletelyDifferent: Integer;
      end;
    
    
    implementation
    
    end.
    
    
    unit2.pas (426 bytes)

Activities

soerensen3

2020-02-21 14:35

reporter  

project1.lpi (1,678 bytes)
project1.lpr (109 bytes)
project1.lps (1,401 bytes)
unit1.pas (228 bytes)
unit Unit1;

{$mode objfpc}{$H+}
{$interfaces CORBA}

interface

uses
  Classes, SysUtils;

type
  IInterface = interface
    ['{BD11C7E5-5EF3-4F2A-B047-54FFA8ED43A9}']

    procedure DoSomething;
  end;


implementation

end.

unit1.pas (228 bytes)

soerensen3

2020-02-21 14:39

reporter   ~0121183

I'm sorry, there was a problem with the upload and unit2 was not sent.

unit2.pas (426 bytes)
unit Unit2;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils,
  Unit1;

type
  IInterface3 = interface;
  IInterface2 = interface ( IInterface )
    ['{EB2E9267-C542-4784-81AE-A4C6ED044748}']

    function DoSomethingElse: IInterface3;
  end;

  IInterface3 = interface( IInterface2 )
    ['{EB2E9267-C542-4784-81AE-A4C6ED044748}']
    function DoSomethingCompletelyDifferent: Integer;
  end;


implementation

end.

unit2.pas (426 bytes)

Issue History

Date Modified Username Field Change
2020-02-21 14:35 soerensen3 New Issue
2020-02-21 14:35 soerensen3 File Added: project1.lpi
2020-02-21 14:35 soerensen3 File Added: project1.lpr
2020-02-21 14:35 soerensen3 File Added: project1.lps
2020-02-21 14:35 soerensen3 File Added: unit1.pas
2020-02-21 14:37 soerensen3 Tag Attached: corba
2020-02-21 14:37 soerensen3 Tag Attached: com
2020-02-21 14:39 soerensen3 File Added: unit2.pas
2020-02-21 14:39 soerensen3 Note Added: 0121183
2020-02-21 21:35 Florian Assigned To => Florian
2020-02-21 21:35 Florian Status new => resolved
2020-02-21 21:35 Florian Resolution open => fixed
2020-02-21 21:35 Florian Fixed in Version => 3.3.1
2020-02-21 21:35 Florian Fixed in Revision => 44221
2020-02-21 21:35 Florian FPCTarget => -