Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Hi, I installed the Zeoslib 7.2.1-rc package in Delphi 7 without any problems. But when I compile a complex project, I get the following error: [Fatal error] ZVariant.pas (1364): Internal error: C1118. In the project I use different packages including jcl and jvcl. In simpler situations, I compile without problems. A tip on how to solve this problem? Thanks
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Hello tkszeos,
honestly - the easiest way to solve this problem could be using a newer Delphi version. Delphi Internal errors are usually bugs in the compiler. You could also try the current SVN version of Zeos 7.2. and see if this resolves your problem. Or maybe the Lazarus project is an option for you?
With best regards,
Jan
honestly - the easiest way to solve this problem could be using a newer Delphi version. Delphi Internal errors are usually bugs in the compiler. You could also try the current SVN version of Zeos 7.2. and see if this resolves your problem. Or maybe the Lazarus project is an option for you?
With best regards,
Jan
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Hi marsupilami,
I solved this problem by simply disabling the "Range checking" option in compiler options.
Thank you again
I solved this problem by simply disabling the "Range checking" option in compiler options.
Thank you again
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
I also had internal error caused by range checking in test suite with D7.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Hi, still persits? If so i need to change something on my test environments..
Give me a feedback please.
Give me a feedback please.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
I can't check now, but doubt something changed. This error is hardly related to Zeos code...
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Did commit "something" related to the line tks did report.
please have a look @
http://www.delphigroups.info/2/90/405410.html
http://docwiki.embarcadero.com/RADStudi ... s_(Delphi)
if the issue continues to to fix the variable with double cast as proposed by emba. Funny is the problem seems not be resolved, even if no clear compiler error is written in DXE10.2 Docs...
please have a look @
http://www.delphigroups.info/2/90/405410.html
http://docwiki.embarcadero.com/RADStudi ... s_(Delphi)
if the issue continues to to fix the variable with double cast as proposed by emba. Funny is the problem seems not be resolved, even if no clear compiler error is written in DXE10.2 Docs...
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Those internal errors are errors in the compiler. The tells the compiler people which unit failed and on which line it happened. So C1118 in D7 is not the same as C1118 in D6... Fixing this in the source code is a lot of guesswork because it is valid code that triggers this behaviour.
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Nope this is hopeless. Adding some typecasts won't help because then appears another errors:
It is incomplete as it lacks the most complex Convert method.
But anyway IDK how to solve this issue except by disabling range check in zeos.inc when WITH_UINT64_C1118_ERROR is defined.
which could be cured only by disabling range checking for the whole unit. Here are my changes to ZVariants unit before I got that error:[Error] ZDbcResultSet.pas(358): Declaration of 'GetULong' differs from declaration in interface 'IZResultSet'
Code: Select all
Index: ZVariant.pas
===================================================================
--- ZVariant.pas (revision 4187)
+++ ZVariant.pas (working copy)
@@ -1352,11 +1352,9 @@
begin
case Value1.VType of
vtNull: Result := EncodeNull;
- //try handle D7 bug [Fatal error] ZVariant.pas (1364): Internal error: C1118.
- //see http://www.delphigroups.info/2/90/405410.html
- //and http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Resolving_Internal_Errors_(Delphi)
- vtInteger: Result := EncodeInteger(Int64(Value1.VInteger) + Int64(GetAsInteger(Value2)));
- vtUInteger: Result := EncodeUInteger(UInt64(Value1.VUInteger) + UInt64(GetAsUInteger(Value2)));
+ vtInteger: Result := EncodeInteger(Value1.VInteger + GetAsInteger(Value2));
+ //need that type cast for D7 else "internal error C1118"
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VUInteger + GetAsUInteger(Value2)));
//ugly but hope it helps
vtFloat: Result := EncodeFloat(Value1.VFloat + GetAsFloat(Value2));
vtString: Result := EncodeString(Value1.VString + GetAsString(Value2));
@@ -1381,11 +1379,9 @@
case Value1.VType of
vtNull: Result := EncodeNull;
vtBoolean: Result := EncodeBoolean(Value1.VBoolean and GetAsBoolean(Value2));
- //try handle D7 bug [Fatal error] ZVariant.pas (1364): Internal error: C1118.
- //see http://www.delphigroups.info/2/90/405410.html
- //and http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Resolving_Internal_Errors_(Delphi)
vtInteger: Result := EncodeInteger(Int64(Value1.VInteger) and Int64(GetAsInteger(Value2)));
- vtUInteger: Result := EncodeUInteger(UInt64(Value1.VUInteger) and UInt64(GetAsUInteger(Value2)));
+ //need that type cast for D7 else "internal error C1118"
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VUInteger and GetAsUInteger(Value2)));
else RaiseUnsupportedOperation;
end;
end;
@@ -1401,11 +1397,9 @@
begin
case Value1.VType of
vtNull: Result := EncodeNull;
- //try handle D7 bug [Fatal error] ZVariant.pas (1364): Internal error: C1118.
- //see http://www.delphigroups.info/2/90/405410.html
- //and http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Resolving_Internal_Errors_(Delphi)
vtInteger: Result := EncodeInteger(Int64(Value1.VInteger) div Int64(GetAsInteger(Value2)));
- vtUInteger: Result := EncodeUInteger(UInt64(Value1.VUInteger) div UInt64(GetAsUInteger(Value2)));
+ //need that type cast for D7 else "internal error C1118"
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VUInteger div GetAsUInteger(Value2)));
vtFloat: Result := EncodeFloat(Value1.VFloat / GetAsFloat(Value2));
else RaiseUnsupportedOperation;
end;
@@ -1458,11 +1452,8 @@
begin
case Value1.VType of
vtNull: Result := EncodeNull;
- //try handle D7 bug [Fatal error] ZVariant.pas (1364): Internal error: C1118.
- //see http://www.delphigroups.info/2/90/405410.html
- //and http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Resolving_Internal_Errors_(Delphi)
vtInteger: Result := EncodeInteger(Int64(Value1.VInteger) mod Int64(GetAsInteger(Value2)));
- vtUInteger: Result := EncodeUInteger(UInt64(Value1.VUInteger) mod UInt64(GetAsUInteger(Value2)));
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VUInteger mod GetAsUInteger(Value2)));
else RaiseUnsupportedOperation;
end;
end;
@@ -1503,7 +1494,7 @@
case Value1.VType of
vtNull: Result := EncodeNull;
vtInteger: Result := EncodeInteger(Value1.VInteger * GetAsInteger(Value2));
- vtUInteger: Result := EncodeUInteger(Value1.VUInteger * GetAsUInteger(Value2));
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VUInteger * GetAsUInteger(Value2)));
vtFloat: Result := EncodeFloat(Value1.VFloat * GetAsFloat(Value2));
else RaiseUnsupportedOperation;
end;
@@ -1565,7 +1556,7 @@
vtNull: SetNull(Result{%H-});
vtBoolean: Result := EncodeBoolean(Value1.VBoolean or GetAsBoolean(Value2));
vtInteger: Result := EncodeInteger(Value1.VInteger or GetAsInteger(Value2));
- vtUInteger: Result := EncodeUInteger(Value1.VInteger or GetAsUInteger(Value2));
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VInteger or GetAsUInteger(Value2)));
else RaiseUnsupportedOperation;
end;
end;
@@ -1600,7 +1591,7 @@
case Value1.VType of
vtNull: Result := EncodeNull;
vtInteger: Result := EncodeInteger(Value1.VInteger - GetAsInteger(Value2));
- vtUInteger: Result := EncodeUInteger(Value1.VUInteger - GetAsUInteger(Value2));
+ vtUInteger: Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}(Value1.VUInteger - GetAsUInteger(Value2)));
vtFloat: Result := EncodeFloat(Value1.VFloat - GetAsFloat(Value2));
else RaiseUnsupportedOperation;
end;
@@ -1639,8 +1630,8 @@
begin
TempUInteger1 := Value1.VUInteger;
TempUInteger2 := GetAsUInteger(Value2);
- Result := EncodeUInteger((TempUInteger1 and not TempUInteger2)
- or (not TempUInteger1 and TempUInteger2));
+ Result := EncodeUInteger({$IFDEF WITH_UINT64_C1118_ERROR}UInt64{$ENDIF}((TempUInteger1 and not TempUInteger2)
+ or (not TempUInteger1 and TempUInteger2)));
end;
else RaiseUnsupportedOperation;
end;
But anyway IDK how to solve this issue except by disabling range check in zeos.inc when WITH_UINT64_C1118_ERROR is defined.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
If it's hopeless.. Let's rollback my stub.
Question do we talk about RangeChecks or OverFlow checks here? AFAIK is the no range checks for the 8Byte vals.
see https://stackoverflow.com/questions/116 ... ror-delphi
your WITH_UINT64_C1118_ERROR is a nice idea. But guess purpose should be disable the checks in the implementation section like
Question do we talk about RangeChecks or OverFlow checks here? AFAIK is the no range checks for the 8Byte vals.
see https://stackoverflow.com/questions/116 ... ror-delphi
your WITH_UINT64_C1118_ERROR is a nice idea. But guess purpose should be disable the checks in the implementation section like
Code: Select all
{$IFDEF WITH_UINT64_C1118_ERROR}{$R-}{$ENDIF}
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Michael,
Yep I think it would be better. There's no sense in bloating the code if it won't help.Let's rollback my stub.
Range checks. Check this option in compiler settings of Test suite - and get C1118. Uncheck it - and app will be compiled. And adding R- directives to units does solve the issue.Question do we talk about RangeChecks or OverFlow checks here?
Actually it is already used in Zeos, I just borrowed the ideayour WITH_UINT64_C1118_ERROR is a nice idea
Yeah, this seems the only acceptable option. At least checks would be disabled for Zeos units only leaving other ones as a programmer wants to.But guess purpose should be disable the checks in the implementation section like
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
I'd rollback my approach.
@FrOsT
maybe you find the time to finalize the define?
@FrOsT
maybe you find the time to finalize the define?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Zeoslib 7.2.1-rc. Internal error C1118 on Delphi 7
Michael, sure, done