risoflora / brookframework

Microframework which helps to develop web Pascal applications.
https://risoflora.github.io/brookframework
GNU Lesser General Public License v2.1
239 stars 54 forks source link

dcc32 Fatal Error in BrookMathExpression.pas with D 10.2.1 #19

Closed KaitoNakamura closed 3 years ago

KaitoNakamura commented 3 years ago

When you create the BrookFramework, you get a Fatal Error. ([dcc32 Fatal Error] BrookMathExpression.pas(492): F2084 Internal Error: C20339) But the problem is in line 485 "FExtensionsHandle[FExtensions.Count] := Default(sg_expr_extension);" If I Uncommenting this line, the project compiles. On the quick, however, I could not determine what problem he has here.

Environment:

OS, compiler and Brook version to reproduce the problem, e.g.:

silvioprog commented 3 years ago

@KaitoNakamura, I have been trying to reproduce it, but it doesn't raise any errors. 😞 Could you provide the full steps or a minimal example to reproduce it? My steps were:

  1. Open the example brookframework\Examples\FMX\MathExpression_Example.dpr and change its target from 32-bit to 64-bit;
  2. Build, run it and click the button Calculate now!.

Environment:

KaitoNakamura commented 3 years ago

The error occurs already when compiling the package. So when you want to install the package. I suspect that this is an internal problem of the compiler of the version 10.2.x. I can't test it with other versions at the moment. But had this already with the old Brook Framework version. Since I did not need this part, I only commented it out.

I only added this error so that you know that there is a problem with one of the Delphi versions. Only Embarcadero can give an exact answer what is wrong, because the developers are the only ones who can do something with the number. You could contact support directly with the error message.

silvioprog commented 3 years ago

@KaitoNakamura, a new version was published to GetIt. Could you try to install using it?

KaitoNakamura commented 3 years ago

With GetIt I get the same error (F2084 Internal Error: C20339).

silvioprog commented 3 years ago

@KaitoNakamura, could you test the following change?:

-  FExtensionsHandle[FExtensions.Count] := Default(sg_expr_extension);
+  FillChar(FExtensionsHandle[FExtensions.Count], SizeOf(sg_expr_extension), #0);

i.e. using FillChar instead of Default.

KaitoNakamura commented 3 years ago

@silvioprog Works very well. :-) You can close this case. Thanks