Bug in SysUtils.GetEnvironmentVariable
Original Reporter info from Mantis: techpro
-
Reporter name: Julian
Original Reporter info from Mantis: techpro
- Reporter name: Julian
Description:
The GetEnvironmentVariable function does not appear to work when run in the IDE. A couple of attempts to try to debug it crashed Lazarus totally.
When I restarted, I was able to debug through it and it worked OK!!! I removed the breakpoints and it didn't work again. :(
The test project (see below) displays the environment value as many times as you want the first time you run the program, but the second time you run it you get nothing. It's beyond me!
Steps to reproduce:
procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Text := SysUtils.GetEnvironmentVariable('Temp');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Label1.Text := '';
end;
Mantis conversion info:
- Mantis ID: 1685
- OS: Windows
- OS Build: XP
- Build: 30012006
- Platform: Win32
- Version: 0.9.11 (SVN)
- Fixed in version: 0.9.21 (SVN)
- Fixed in revision: 10331 (#a0507c61)
- Monitored by: » laserflor (Rolf)
- Target version: 1.0.0
- LazTarget: 1.0