Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2022-09

Streaming error with a property of type Double set to +/-Inf

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

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?

Bart

Reply by email

Michael Van Canneyt
to Bart
Bart wrote 32 lines
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.

Reply by email