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
Why does Free Pascal use ...
by
Warfley
[
Today
at 06:06:45 pm]
[Solved] The use of EXIT ...
by
jamie
[
Today
at 05:50:54 pm]
TEDit PasswordChar not wo...
by
Hansaplast
[
Today
at 05:19:01 pm]
LRS Explorer
by
Xenno
[
Today
at 04:52:58 pm]
MR - DebuggerIntf for ter...
by
MattBradford
[
Today
at 03:59:36 pm]
Which Linux version
by
cdbc
[August 15, 2026, 08:28:37 pm]
[Qt5/Qt6] JPSupport-Qt: J...
by
shortcut
[August 15, 2026, 08:19:29 pm]
FpDebug: Bugs and API gap...
by
Martin_fr
[August 15, 2026, 08:07:50 pm]
BS Controls – Silly Compo...
by
Xenno
[August 15, 2026, 07:40:44 pm]
Framer: How to get Rid of...
by
ADMGNS
[August 15, 2026, 06:46:33 pm]
Adding persistent fields ...
by
LemonParty
[August 15, 2026, 05:47:05 pm]
Is it possible to communi...
by
Thaddy
[August 15, 2026, 05:45:30 pm]
Synedit wordwrap
by
Martin_fr
[August 15, 2026, 05:37:57 pm]
TlsLib4Pascal
by
Thaddy
[August 15, 2026, 05:27:52 pm]
array values as reference
by
jamie
[August 15, 2026, 03:37:41 pm]
Unleashed Pascal (async/a...
by
chamfay
[August 15, 2026, 10:35:09 am]
TDWEdit
by
docno
[August 15, 2026, 10:12:10 am]
var vs out (including "co...
by
440bx
[August 15, 2026, 08:42:28 am]
Local AI LLM Wrapper Demo...
by
edwinyzh
[August 15, 2026, 05:30:15 am]
Trndi 16 is released
by
slicke
[August 15, 2026, 03:06:44 am]
Clean up and build
by
n7800
[August 14, 2026, 11:03:28 pm]
'ReadStr' ?
by
PascalDragon
[August 14, 2026, 08:33:34 pm]
Cross platform DirectoryW...
by
LemonParty
[August 14, 2026, 07:41:15 pm]
Lazarus Bugfix Release 4....
by
wp
[August 14, 2026, 04:47:58 pm]
Separators in the compone...
by
JuhaManninen
[August 14, 2026, 01:28:05 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED]Lazarus trunk: I can't use TFileVersionInfo (Read 3729 times)
zoltanleo
Hero Member
Posts: 523
[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/LMDE7-x11-x86_64(gtk2/gtk3)/Fedora-44-wayland-x86_64(gtk2/gtk3)/ Kubuntu-24-x11-x86_64(qt5/qt6)/KDE Neon-wayland-x86_64(qt5/qt6)/Darwin Cocoa x86_64 (15.7.7):
Lazarus x32_64 (trunk); FPC(trunk), FireBird 5.0.3 x86_64; IBX by TonyW
Sorry for my bad English, I'm using translator
Thaddy
Hero Member
Posts: 19619
Glad to be alive.
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
Any "programmer" that knows only one programming language is not a programmer
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: 19619
Glad to be alive.
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
Any "programmer" that knows only one programming language is not a programmer
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: 19619
Glad to be alive.
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
Any "programmer" that knows only one programming language is not a programmer
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