Jump to content
plumothy

Delphi 11.2 Cannot Create and Install New Component

Recommended Posts

I have Delphi 11.2, Patch 1 running on Windows 11.

This is my first post here so I hope someone can help.

I want to create a new component that is a descendant of another component that is already installed. But I keep getting errors.

As an example, here is what happens when I try to create a descendant of TButton...

 

I did this:
 - Component | New Component
 - VCL for Delphi Win32
 - select 'TButton' in list
 - Class Name = 'TMyButton'
 - Palette Page = 'Samples'
 - Unit Name = 'E:\MyButton.pas'
 - Selected 'Install to New Package'
 - Package Name = 'e:\MyOwnButton.dpk'
 - Click Finish.

Got this error:
---------------------------
Error
---------------------------
Registration procedure, Mybutton.Register in package C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\MyOwnButton.bpl raised exception class EAccessViolation: Access violation at address 67127F63 in module 'rtl280.bpl'. Read of address 00000008.
---------------------------
OK   
---------------------------


So, then I tried this:
 - Component | Install Packages
 - Add...
 - Browsed to select C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\MyOwnButton.bpl

Got this error:
---------------------------
MyOwnButton - Delphi 11 - MyButton [Built]
---------------------------
Registration procedure, Mybutton.Register in package C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\MyOwnButton.bpl raised exception class EAccessViolation: Access violation at address 67127F63 in module 'rtl280.bpl'. Read of address 00000008.
---------------------------
OK   
---------------------------


I am able to create TMyButton on Delphi 10.4 running on Windows 10 - so is there a bug in Delphi 11.2, am I doing something wrong or is there some other explanation?

Share this post


Link to post

Here is the code generated by Delphi in my TButton example:

package MyOwnButton;

{$R *.res}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION OFF}
{$OVERFLOWCHECKS ON}
{$RANGECHECKS ON}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES ON}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DEFINE DEBUG}
{$ENDIF IMPLICITBUILDING}
{$IMPLICITBUILD ON}

requires
  rtl,
  vcl;

contains
  MyButton in 'MyButton.pas';

end.
unit MyButton;

interface

uses
  System.SysUtils, System.Classes, Vcl.Controls, Vcl.StdCtrls;

type
  TMyButton = class(TButton)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    { Published declarations }
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Samples', [TMyButton]);
end;

end.

 

Share this post


Link to post

Hello,

 

I'm facing the same issue, especially on win32 packages.

 

Running Windows 11 22H2 + updated Borland .net v3 files (found here https://quality.embarcadero.com/browse/RSP-39519 )

 

I'm no more able to update any of my components. My environment is totally broken...

 

I guess it is related to the last Windows 11 update...

Edited by Stéphane Wierzbicki

Share this post


Link to post

Hi,

 

I'm pleased to hear that I am not the only one!

 

Thanks for the link to RSP-39519 - from there I saw someone else with similar issues was able to solve them by changing the project's resource compiler from Borland (BRCC32) to the Windows SDK one.

 

So I did the same and it has fixed my particular issue :classic_smile: but Embarcadero still need to investigate what is going on.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×