Recent

Author Topic: Can't run/debug if your project contains "Setup" in the name.  (Read 1804 times)

Spyd

  • New member
  • *
  • Posts: 7
Can't run/debug if your project contains "Setup" in the name.
« on: October 15, 2018, 10:45:29 am »
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

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Can't run/debug if your project contains "Setup" in the name.
« Reply #1 on: October 15, 2018, 11:19:57 am »
The simplest solution: don't name the executable "setup" when debugging.  ::)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Spyd

  • New member
  • *
  • Posts: 7
Re: Can't run/debug if your project contains "Setup" in the name.
« Reply #2 on: October 15, 2018, 11:44:32 am »
The simplest solution: don't name the executable "setup" when debugging.  ::)
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

  • Administrator
  • Hero Member
  • *
  • Posts: 9904
  • Debugger - SynEdit - and more
    • wiki
Re: Can't run/debug if your project contains "Setup" in the name.
« Reply #3 on: October 15, 2018, 01:55:06 pm »
You can add it as a request to the bugtracker.

EDIT:
That is, for improved error msg
« Last Edit: October 15, 2018, 03:20:19 pm by Martin_fr »

ASerge

  • Hero Member
  • *****
  • Posts: 2246
Re: Can't run/debug if your project contains "Setup" in the name.
« Reply #4 on: October 15, 2018, 03:12:01 pm »
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.
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.

 

TinyPortal © 2005-2018