Page 1 of 1

Fatal error compiling x64 in RAD Studio 11.3/12

Posted: Mon Dec 04, 2023 9:00 pm
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)"

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

Posted: Tue Dec 05, 2023 9:28 am
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.

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

Posted: Tue Dec 05, 2023 12:00 pm
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)

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

Posted: Tue Dec 05, 2023 3:31 pm
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.

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

Posted: Tue Dec 05, 2023 7:03 pm
by LarryTAG
Thank you for your quick support! I will give your suggestion a try.

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

Posted: Sat Dec 30, 2023 7:28 pm
by Sergey Tkachenko
The fix is included in TRichView 22.1.1 (currently available only for registered users)