[fpc-devel] Streaming error with a property of type Double set to +/-Inf
Michael Van Canneyt
michael at freepascal.org
Fri Sep 23 18:17:26 CEST 2022
On Wed, 21 Sep 2022, Bart via fpc-devel wrote:
> Hi,
>
> When in Lazarus I set a property of type Double to -Inf or +Inf, I get
> a compilation error:
>
> Error: Invalid property value (at 41,17, stream offset 0000031A)
> sp.lpr(20,1) Error: Error while compiling resources -> Compile with
> -vd for more details. Check for duplicates.
>
> (Compiling with -vd gives no additional information AFAICS:
> Debug: Resource information read
> Debug: Trying to open file main.lfm...
> Debug: Chosen reader: DFM resource reader
> Debug: Reading resource information...
> Error: Invalid property value (at 41,17, stream offset 0000031A)
> C:\Users\Bart\LazarusProjecten\bugs\spinex\sp.lpr(20,1) Error: (9029)
> Error while compiling resources
> (9015) Linking C:\Users\Bart\LazarusProjecten\bugs\spinex\sp.exe
> C:\Users\Bart\LazarusProjecten\bugs\spinex\sp.lpr(20,1) Fatal: (10026)
> There were 1 errors compiling module, stopping
> Fatal: (1018) Compilation aborted
> )
>
> A hexdump of the .lfm shows:
> 00000310: 78 56 61 6C 75 65 20 3D 20 2B 49 6E 66 0D 0A 20 xValue = +Inf
> 0000031A is the 'I' of Inf
>
> All this with fpc 3.2.2 32-bit on Windows, but reported to fail on
> Linux as well.
>
> Is this a bug in the DFM resource reader, or is this just not
> supported by design?
Not supported by design, I'd say.
If you want to support that you'll have to use defineproperties.
Michael.
More information about the fpc-devel
mailing list