View Issue Details

IDProjectCategoryView StatusLast Update
0035838LazarusIDEpublic2020-01-04 20:32
ReporterMartin FriebeAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform64bit IntelOSwin 10OS Version10
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0035838: IDE does not start / IPC fails to get file in temp dir
DescriptionIn B:\lazarus_latest_svn_2\ide\lazadvancedipc.pp line 755


function TIPCServer.StartServer(const aDeletePendingRequests: Boolean): Boolean;
begin
  if Active then
    Exit(True);

  FFileHandle := FileCreate(FFileName, fmCreate or fmShareExclusive, GLOBAL_RIGHTS);
  Result := (FFileHandle<>feInvalidHandle);
  FActive := Result;
  if Result and aDeletePendingRequests then
    DeletePendingRequests;
end;

FileCreate returns an invalid filehandle. (even if the file does not exist)

This leads to
procedure TUniqueServer.StartUnique(const aServerPrefix: string);
...
  I := 0;
  while not Active do
  begin
    Inc(I);
    if I < 10 then
      ServerID := aServerPrefix+'0'+IntToStr(I)
    else
      ServerID := aServerPrefix+IntToStr(I);
    StartServer;
  end;
end;

To loop forever.
Additional InformationThis happens on windows, with the TEMP dir moved to a ramdisk.
TagsNo tags attached.
Fixed in Revisionr62494
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

Martin Friebe

2019-07-12 14:22

manager   ~0117218

The problem happen because TEMP env points to a (sub)folder that does not yet exist.
Not sure what apps should do in this case (but probably not looping forever)

The same applies for other tmp folder, apps using the TMP env, seem to auto create the missing folder.

Juha Manninen

2020-01-04 20:32

developer   ~0120224

> The same applies for other tmp folder, apps using the TMP env, seem to auto create the missing folder.

Yes, I made sure the temp dir is created before using it. Please test.

Issue History

Date Modified Username Field Change
2019-07-12 14:15 Martin Friebe New Issue
2019-07-12 14:22 Martin Friebe Note Added: 0117218
2020-01-04 20:20 Juha Manninen Assigned To => Juha Manninen
2020-01-04 20:20 Juha Manninen Status new => assigned
2020-01-04 20:30 Juha Manninen Assigned To Juha Manninen => Martin Friebe
2020-01-04 20:30 Juha Manninen Assigned To Martin Friebe => Juha Manninen
2020-01-04 20:32 Juha Manninen Status assigned => resolved
2020-01-04 20:32 Juha Manninen Resolution open => fixed
2020-01-04 20:32 Juha Manninen Fixed in Revision => r62494
2020-01-04 20:32 Juha Manninen LazTarget => -
2020-01-04 20:32 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-01-04 20:32 Juha Manninen Note Added: 0120224