RadStudio 10.2 Tokyo clang error reading dfm files



I have an existing c++ project that works well with the RadStudio 10.2 classic compiler, but when compiled with the clang compiler

I get the following error during creation of the forms (when reading the forms .dfm file):

.Color: is not valid integer value.

It seems that RegisterIntegerConsts is not called for the form components.

This happens with static and dynamic linking.

Is there a way to fix this problem? At the moment it's simply impossible to use the clang compiler due to this bug.




Responses (3)
  • Accepted Answer

    Tuesday, September 05 2017, 01:08 PM - #Permalink

    I'm having exactly the same issue. Was a work-around ever found?

    The app compiles and runs just fine in bcc32, but when I compile it with Clang and run, I get:

    Project ModuleViewer.exe raised exception class EConvertError with message ''clWindow' is not a valid integer value'.

    This happens when the main form is created with Application->CreateForm(__classid(TModuleViewerForm), &ModuleViewerForm);

    If I remove Form.Color from the DFM, I just get the same error on the next "cl" color enumeration in the DFM.

    I have other Clang projects that are working just fine, and only a few of them are having this issue.


    Here is the call stack at the time of the exception:

    :74ec0212 KERNELBASE.RaiseException + 0x62

    :0044ec1e System::Sysutils::_16701 + 0x1E

    :004ecd9e ; ReadProperty

    :004ec5ee System::Classes::TReader::ReadDataInner + 0x1A

    :004ec5a1 ; ReadData

    :004f706e System::Classes::TComponent::ReadState + 0x6

    :0069749a ; ReadState

    :004ed5b4 ; ReadRootComponent

    :004e761f ; ReadComponent

    :004ded58 ; _17074

    :004e04b8 ; _17096

    :004e0546 ; InitInheritedComponent

    :00696917 ; TCustomForm (fastthis)

    :00404E01 Vcl::Forms::TForm::TForm (fastthis)(this=:06513B80, __ctor_flag='\0')

    :004049F8 TModuleViewerForm::TModuleViewerForm (fastthis)(this=:06513B80, __ctor_flag='ÿ')

    :006a1ebd ; CreateForm

    :004041BD WinMain(:00400000, NULL, :03795C49, 9)

    :006f3f24 ; __startup

    :77b74a47 ; ntdll.dll

    :77b74a17 ; ntdll.dll


    I have a small project that I can provide if it is helpful.


    Jeff Wilhite

    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 13 2017, 04:07 AM - #Permalink

    >> when reading the forms .dfm file: Color: is not valid integer value.


    - I thing, that Color defined incorectly. You can corect, if look .dfm in text mode.



    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 12 2017, 10:48 AM - #Permalink

    Can you please provide a sample Project File showing this?

    Embarcadero has not seen this before, so maybe something specific in you Project file is causing this behavior?

    The reply is currently minimized Show
Your Reply

Please login to post a reply