Forum > General

Can't run/debug if your project contains "Setup" in the name.

(1/1)

Spyd:
I'm sorry if this is posted in the wrong place, I don't know how to report a bug.

The problem is that in Windows, if your compiled executable contains "setup" in the file name, when you try to run with debugging, the debugger crashes, and if you try to run without debugger, you get a "Failed to execute: 470" error.
The workarround is easy, you must run the IDE elevated (right click on the lazarus shortcut, Run as Administrator), and then everything works fine.
The problem is caused because Windows wants to run any application that contains "setup" in the file name elevated, but if you're running the IDE in user mode, it just fails.

While this isn't really a problem with Lazarus nor the debugger, it would be nice if the error message was a bit more clear than "Ooops, the debugger crashed".

Ñuño_Martínez:
The simplest solution: don't name the executable "setup" when debugging.  ::)

Spyd:

--- Quote from: Ñuño_Martínez on October 15, 2018, 11:19:57 am ---The simplest solution: don't name the executable "setup" when debugging.  ::)

--- End quote ---
Well, not really an option if your application has to copy files to %programfiles%...
Running the IDE elevated is not a big deal anyway.

Martin_fr:
You can add it as a request to the bugtracker.

EDIT:
That is, for improved error msg

ASerge:

--- Quote from: Spyd on October 15, 2018, 10:45:29 am ---The problem is that in Windows, if your compiled executable contains "setup" in the file name, when you try to run with debugging, the debugger crashes, and if you try to run without debugger, you get a "Failed to execute: 470" error.

--- End quote ---
It's normal Program Compatibility Assistant Service
For win32 only (win64 OK by default). Try using the project options in the "Use manifest resource" section..." to set the "Execution Level" to asInvoker.

Navigation

[0] Message Index

Go to full version