Recent

Author Topic: [SOLVED] "Fatal: Can't create executable project1.exe"?  (Read 18552 times)

Vladimir

  • New Member
  • *
  • Posts: 12
[SOLVED] "Fatal: Can't create executable project1.exe"?
« on: October 28, 2014, 04:59:49 pm »
Hi!

I am compiling my first "Hello, world!" program in Lazarus (1.2.6). It works fine for the first time, but after recompiling it gives the message "Fatal: Can't create executable project1.exe". So I must delete Project1.exe manually every time before recompilation.It is so both in Windows 7 and XP. I have administrative rights. Everyone has a full access to the directory of the project.

It seems to be silly question, but what am I doing wrong? :-[
« Last Edit: October 29, 2014, 02:46:03 pm by Vladimir »

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: "Fatal: Can't create executable project1.exe"?
« Reply #1 on: October 28, 2014, 05:15:52 pm »
your  project1.exe is locked maybe this is the solution for you

[ http://forum.lazarus.freepascal.org/index.php/topic,8167.msg106701.html#msg106701 ]
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

Vladimir

  • New Member
  • *
  • Posts: 12
Re: "Fatal: Can't create executable project1.exe"?
« Reply #2 on: October 28, 2014, 05:37:08 pm »
Thank you for your idea, Never.

But no. IMHO, the file is not locked, since I can delete it manually without problems .

Anyway, "Application Experience" service is definitely running.

A hint: I open the "Open file" dialogue and try to delete project1.exe. I see "You requre permission from Adminisrators to make changes to this file".  But why? Lazarus was started by the administrator. Besides, for project1.exe a full access for everyone is granted.

Any other ideas?
« Last Edit: October 28, 2014, 06:00:12 pm by Vladimir »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: "Fatal: Can't create executable project1.exe"?
« Reply #3 on: October 28, 2014, 06:05:01 pm »
Thank you for your idea, Never.

But no. IMHO, the file is not locked, since I can delete it manually without problems .

Anyway, "Application Experience" service is definitely running.

A hint: I open the "Open file" dialogue and try to delete project1.exe. I see "You requre permission from Adminisrators to make changes to this file".  But why? Lazarus was started by the administrator. Besides, for project1.exe a full access for everyone is granted.

Any other ideas?

project1.exe is deleted and recreated every time you hit compile it looses all its rights. What is the folder that project1.exe is saved? Make sure that the user running lazarus is the user you logged in and it is not running as admin or with elevated privileges.

« Last Edit: October 28, 2014, 06:07:25 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: "Fatal: Can't create executable project1.exe"?
« Reply #4 on: October 28, 2014, 06:16:37 pm »
imho  your app is not terminated
and  process is locked
open task manager/processes and see if the app terminates when you hit the close or stays there
if this is the case
try this
Code: [Select]
CloseAction:= caFree; in FormClose
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

Vladimir

  • New Member
  • *
  • Posts: 12
Re: "Fatal: Can't create executable project1.exe"?
« Reply #5 on: October 28, 2014, 06:34:13 pm »
project1.exe is deleted and recreated every time you hit compile it looses all its rights. What is the folder that project1.exe is saved? Make sure that the user running lazarus is the user you logged in and it is not running as admin or with elevated privileges.

For the directory of the project a full access for everyone is granted as well.

I always log in as Administrator and run Lazarus in this account.

imho  your app is not terminated
and  process is locked
open task manager/processes and see if the app terminates when you hit the close or stays there
if this is the case
try this
Code: [Select]
CloseAction:= caFree; in FormClose

It does not help. In fact, it cannot, sicne one does not need to run the application to reproduce the effect. It is enough to press Ctrl-F9 (that is "Compile") twice.
« Last Edit: October 28, 2014, 06:38:00 pm by Vladimir »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: "Fatal: Can't create executable project1.exe"?
« Reply #6 on: October 28, 2014, 07:30:31 pm »
project1.exe is deleted and recreated every time you hit compile it looses all its rights. What is the folder that project1.exe is saved? Make sure that the user running lazarus is the user you logged in and it is not running as admin or with elevated privileges.

For the directory of the project a full access for everyone is granted as well.

That is not what I asked. My question is clear do you use a special directory or not? if yes move it out of the special path in to a more liberal position.

I always log in as Administrator and run Lazarus in this account.


Windows version? As far as I know on win vista and above even admin group users( including admin it self) do not have admin privileges unless elevated.

Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Vladimir

  • New Member
  • *
  • Posts: 12
Re: "Fatal: Can't create executable project1.exe"?
« Reply #7 on: October 28, 2014, 07:56:10 pm »
That is not what I asked. My question is clear do you use a special directory or not? if yes move it out of the special path in to a more liberal position.

I do not know what position is "more liberal". I have tried several directories (including C:\Users\Public\, which must be open for everibody and everything) with the same result.

Windows version? As far as I know on win vista and above even admin group users( including admin it self) do not have admin privileges unless elevated.

I use Windows 7 (Ultimate SP1). I also tried it in Winpows XP (Professional SP2) with the same effect. I have never met any limitations in my admin accounts until now. What should I elevate?
« Last Edit: October 28, 2014, 08:23:30 pm by Vladimir »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12099
  • Debugger - SynEdit - and more
    • wiki
Re: "Fatal: Can't create executable project1.exe"?
« Reply #8 on: October 28, 2014, 08:48:35 pm »
Does the full path to project1.exe (and the filename, if different from this) has any special chars? Any spaces? Any utf8 chars (accents, or none latin)

I am not sure what is used to delete the exe, but maybe there is an issue with the filename.

Vladimir

  • New Member
  • *
  • Posts: 12
Re: "Fatal: Can't create executable project1.exe"?
« Reply #9 on: October 28, 2014, 09:04:22 pm »
Does the full path to project1.exe (and the filename, if different from this) has any special chars? Any spaces? Any utf8 chars (accents, or none latin)

I am not sure what is used to delete the exe, but maybe there is an issue with the filename.


No. The full name is, literally:
Code: [Select]
D:\WORKS\LAZARUS\project1.exe

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: "Fatal: Can't create executable project1.exe"?
« Reply #10 on: October 28, 2014, 09:16:05 pm »
That is not what I asked. My question is clear do you use a special directory or not? if yes move it out of the special path in to a more liberal position.

I do not know what position is "more liberal". I have tried several directories (including C:\Users\Public\, which must be open for everibody and everything) with the same result.
"C:\program files" is a protected path and everything under it.
"D:\works" is liberal and better suited for your projects than any special other directory including "c:\users\XX".   

Windows version? As far as I know on win vista and above even admin group users( including admin it self) do not have admin privileges unless elevated.

I use Windows 7 (Ultimate SP1). I also tried it in Winpows XP (Professional SP2) with the same effect. I have never met any limitations in my admin accounts until now. What should I elevate?

I'm on win7 too and I have no problems with the normal account that the windows create for you at installation which makes it even more suspicious on what might be wrong.
1) try to create a normal account and see if that solves any problems.
2) Is it possible to attach here a problematic project to take a look on its settings?
3) make sure that you haven't enabled the run as administrator setting on the compatibility tab of lazarus.exe.
From your responses so far it is weird that you have any problems
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

rvk

  • Hero Member
  • *****
  • Posts: 6943
Re: "Fatal: Can't create executable project1.exe"?
« Reply #11 on: October 28, 2014, 09:25:27 pm »
Are you running a virusscanner? If the steps taazz suggested don't work you can try disabling it for a few minutes to check if that's the one causing troubles. Maybe it's in the process of scanning the file when you try to compile it a second time. (I've seen crazier things)

Vladimir

  • New Member
  • *
  • Posts: 12
Re: "Fatal: Can't create executable project1.exe"?
« Reply #12 on: October 28, 2014, 10:02:44 pm »
I'm on win7 too and I have no problems with the normal account that the windows create for you at installation which makes it even more suspicious on what might be wrong.
1) try to create a normal account and see if that solves any problems.
2) Is it possible to attach here a problematic project to take a look on its settings?
3) make sure that you haven't enabled the run as administrator setting on the compatibility tab of lazarus.exe.
From your responses so far it is weird that you have any problems

1) No, it does not.
2) Sorry, I am a nub. What namely files of the project do you need?
2) I am sure that not.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: "Fatal: Can't create executable project1.exe"?
« Reply #13 on: October 28, 2014, 10:16:52 pm »
I'm on win7 too and I have no problems with the normal account that the windows create for you at installation which makes it even more suspicious on what might be wrong.
1) try to create a normal account and see if that solves any problems.
2) Is it possible to attach here a problematic project to take a look on its settings?
3) make sure that you haven't enabled the run as administrator setting on the compatibility tab of lazarus.exe.
From your responses so far it is weird that you have any problems

2) Sorry, I am a nub. What namely files of the project do you need?

Everything that is needed to open the project in lazarus and select "project\project options".
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Vladimir

  • New Member
  • *
  • Posts: 12
Re: "Fatal: Can't create executable project1.exe"?
« Reply #14 on: October 28, 2014, 10:19:16 pm »
Are you running a virusscanner? If the steps taazz suggested don't work you can try disabling it for a few minutes to check if that's the one causing troubles. Maybe it's in the process of scanning the file when you try to compile it a second time. (I've seen crazier things)

Yes, I run Comodo Internet Security, but switching it off (at least. so it seems) did not help. Nevertheless, the idea does not seem so crazy to me, since, as I know, to switch off Comodo totally is rather difficult task. I must study this possibility.

Thank you to everybody for answers. At least, I see now that the problem is not trivial or well known one.

 

TinyPortal © 2005-2018