View Issue Details

IDProjectCategoryView StatusLast Update
0035838LazarusIDEpublic2019-07-12 14:22
ReporterMartin FriebeAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
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 Revision
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.

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