Fatal error compiling x64 in RAD Studio 11.3/12

General TRichView support forum. Please post your questions here
Post Reply
LarryTAG
Posts: 2
Joined: Wed Nov 29, 2023 6:09 pm

Fatal error compiling x64 in RAD Studio 11.3/12

Post by LarryTAG »

Hi,

I'd like to report a bug when compiling x64 in rad studio 11.3 and 12. x32 compiles without issue. I have also included an example test project within the zip.

Steps to reproduce:
1) Create new VCL application
2) Add Windows 64-bit platform
3) Turn off Link with Runtime packages
4) Drop an RVStyle and RichViewEdit control onto the form
5) Compile in 64 bit mode, and get an error: [ilink64 Error] Error: Unresolved external 'System::Rtlconsts::_SListIndexErrorExt' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\22.0\LIB\WIN64\RELEASE\DBRTL.A|Data.DB.o (see screen shot in zip file)

When contacting Embarcadero they suggested the below for TRichView:
"TRichview could fix this issue, by moving the databinding registration code into their design package. (I did this in my minimal test case and it worked)"
Attachments
Project.zip
(122.9 KiB) Downloaded 3174 times
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Fatal error compiling x64 in RAD Studio 11.3/12

Post by Sergey Tkachenko »

I need some time to understand why it happens.

I cannot reproduce the linker problem. On my RAD Studio 10.3 (about box displays: Embarcadero® RAD Studio 11 Version 28.0.47991.2819), the application is compiled successfully. But it shows an exception in livebinding registration code when the application starts.

As I understand the suggestion, it is about moving the call of RegisterObservableMember to design-time code.
I tried. But after that, livebinding stopped working (i tested "DB Demos.FireDAC_IB\4 LiveBindings").
So I need more time to understand how to fix this problem.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Fatal error compiling x64 in RAD Studio 11.3/12

Post by Sergey Tkachenko »

As I said, I cannot reproduce the linker problem.
I can see only a crash on start. The problem is definitely in a wrong unit initialization order for C++Builder 64-bit.
I found a workaround.
In RichView.pas and RVEdit.pas,
1) remove

Code: Select all

  {$IFDEF RVLIVEBINDING}
  Data.Bind.Components,
  {$ENDIF}
from implementation's "uses"
2) add

Code: Select all

  {$IFDEF RVLIVEBINDING}
  System.Bindings.Methods, Data.Bind.Components, Data.Bind.EngExt,
  {$ENDIF}
in interface's "uses"

After that, rebuild TRichView packages (run "Install TRichView VCL in Delphi IDE" shortcut in Windows Start Menu)
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Fatal error compiling x64 in RAD Studio 11.3/12

Post by Sergey Tkachenko »

Well, it appeared that this change crashes the command-line compiler of Delphi 12, it reports "RichViewActionsD12.dpk(153) Fatal: F2084 Internal Error: LI693". Older compilers are OK.

The solution is changing "uses" as I said above, but without moving from implementation to interface section.
LarryTAG
Posts: 2
Joined: Wed Nov 29, 2023 6:09 pm

Re: Fatal error compiling x64 in RAD Studio 11.3/12

Post by LarryTAG »

Thank you for your quick support! I will give your suggestion a try.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Fatal error compiling x64 in RAD Studio 11.3/12

Post by Sergey Tkachenko »

The fix is included in TRichView 22.1.1 (currently available only for registered users)
Post Reply