Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED]Lazarus trunk: I can't use TFileVersionInfo
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TDirectoryEdit with OnAft...
by
dsiders
[
Today
at 06:14:36 pm]
Variable initialization
by
valdir.marcos
[
Today
at 05:58:47 pm]
Lazarus IDE built for LCL...
by
valdir.marcos
[
Today
at 05:57:09 pm]
X11Libre, finally and for...
by
valdir.marcos
[
Today
at 05:45:57 pm]
Debian removes FPC/Lazaru...
by
valdir.marcos
[
Today
at 04:38:01 pm]
How many lines is too man...
by
valdir.marcos
[
Today
at 04:14:48 pm]
Front-end framework
by
valdir.marcos
[
Today
at 04:10:22 pm]
Status of LCL-fpGUI widge...
by
valdir.marcos
[
Today
at 04:04:53 pm]
Status of LCL's CustomDra...
by
zeljko
[
Today
at 03:59:56 pm]
Benchmark test in nanosec...
by
valdir.marcos
[
Today
at 03:27:08 pm]
Problem wih reference to ...
by
henrique
[
Today
at 02:39:50 pm]
uses unit decalration ord...
by
Martin_fr
[
Today
at 02:10:32 pm]
Update a table with an Au...
by
CraigC
[
Today
at 01:56:50 pm]
could Ardour's YTK be use...
by
robert rozee
[
Today
at 01:51:39 pm]
[SOLVED] File Format LAMW...
by
RaketeMike
[
Today
at 01:41:46 pm]
[ANN] PasBuild 1.5.0 rele...
by
cdbc
[
Today
at 05:10:09 am]
Commerce website written ...
by
valdir.marcos
[
Today
at 04:55:08 am]
New book on Object Pascal
by
valdir.marcos
[
Today
at 04:30:08 am]
How to execute a procedur...
by
Aruna
[
Today
at 03:34:41 am]
BGRAVirtualScreen - weird...
by
backprop
[
Today
at 03:33:51 am]
The "dockedformeditor" pa...
by
Gustavo 'Gus' Carreno
[
Today
at 02:44:31 am]
unit ProjectDescriptorTyp...
by
n7800
[
Today
at 02:01:39 am]
Canvas.StretchDraw, does ...
by
jamie
[March 06, 2026, 11:27:18 pm]
REST Server/Client, how t...
by
kveroneau
[March 06, 2026, 07:35:25 pm]
[SOLVED] Problem to resto...
by
Hartmut
[March 06, 2026, 06:42:28 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED]Lazarus trunk: I can't use TFileVersionInfo (Read 3667 times)
zoltanleo
Hero Member
Posts: 512
[SOLVED]Lazarus trunk: I can't use TFileVersionInfo
«
on:
December 06, 2017, 08:07:46 am »
Hi friends
This code
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
FormCreate
(
Sender
:
TObject
)
;
var
info
:
TFileVersionInfo
;
begin
try
info
:
=
TFileVersionInfo
.
Create
(
Application
)
;
info
.
fileName
:
=
Application
.
ExeName
;
info
.
ReadFileInfo
;
// <== error here
Self
.
Caption
:
=
Format
(
'%s v.%s'
,
[
info
.
VersionStrings
.
Values
[
'ProductName'
]
,
info
.
VersionStrings
.
Values
[
'ProductVersion'
]
]
)
;
finally
FreeAndNil
(
info
)
;
end
;
end
;
for fpc r.37610 I have ceased to display correctly Values ['ProductVersion'], and after updating to fpc r.37671 gives such error message
Code: Pascal
[Select]
[+]
[-]
Project project1 raised exception class
'EReadError'
with
message
:
Stream
read
error
At address 4338C9
For lazarus 1.8 RC5 this project is started correctly.
Somebody will be able to answer me, what has happened?
«
Last Edit: December 06, 2017, 04:46:41 pm by zoltanleo
»
Logged
Win10 LTSC x64/Deb 12 amd64(gtk2)/Kubuntu(qt5)/Darwin Cocoa x86_64 (Sequoia):
Lazarus x32_64 (trunk); FPC(trunk), FireBird 3.0.11; IBX by TonyW
Sorry for my bad English, I'm using translator
Thaddy
Hero Member
Posts: 18765
To Europe: simply sell USA bonds: dollar collapses
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #1 on:
December 06, 2017, 08:39:36 am »
I can reproduce half of it with trunk under linux the ProductVersion can not be read. Productname is read correctly.
On arm-linux it does not crash however, but does not give the ProductVersion at all.
Please file a bug report.
Logged
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...
Cyrax
Hero Member
Posts: 836
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #2 on:
December 06, 2017, 08:58:24 am »
This is already reported in the bugtracker :
https://bugs.freepascal.org/view.php?id=32603
Logged
Thaddy
Hero Member
Posts: 18765
To Europe: simply sell USA bonds: dollar collapses
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #3 on:
December 06, 2017, 09:09:19 am »
Yes, I just found it. After reverting r37490 it indeed works again.
Logged
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...
hnb
Sr. Member
Posts: 270
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #4 on:
December 06, 2017, 10:31:50 am »
fixed in r37685
Logged
Checkout
NewPascal
initiative and
donate beer
- ready to use
tuned FPC
compiler + Lazarus for
mORMot
project
best regards,
Maciej Izak
Thaddy
Hero Member
Posts: 18765
To Europe: simply sell USA bonds: dollar collapses
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #5 on:
December 06, 2017, 10:56:25 am »
Tnx Maciej
One remark: can it be done outside the loop?
«
Last Edit: December 06, 2017, 10:58:25 am by Thaddy
»
Logged
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...
hnb
Sr. Member
Posts: 270
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #6 on:
December 06, 2017, 11:02:07 am »
hm. Only #32603 is fixed. The presented problem is different. I will look into.
Logged
Checkout
NewPascal
initiative and
donate beer
- ready to use
tuned FPC
compiler + Lazarus for
mORMot
project
best regards,
Maciej Izak
hnb
Sr. Member
Posts: 270
Re: Lazarus trunk: I can't use TFileVersionInfo
«
Reply #7 on:
December 06, 2017, 11:23:28 am »
The second problem fixed in r37687. Loop is rather needed for big endian platforms and length of string can't be determined by "toread" value and must be discovered by looking for #0.
Logged
Checkout
NewPascal
initiative and
donate beer
- ready to use
tuned FPC
compiler + Lazarus for
mORMot
project
best regards,
Maciej Izak
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED]Lazarus trunk: I can't use TFileVersionInfo
TinyPortal
© 2005-2018