Recent

Author Topic: [SOLVED] Application does not start from IDE  (Read 1719 times)

wittbo

  • Full Member
  • ***
  • Posts: 150
[SOLVED] Application does not start from IDE
« on: July 15, 2020, 11:57:46 am »
With Lazarus 2.0.10 the IDE command "Start/Start without debugger" does not work, there is an error message telling me "Cannot start   cannot start application <apppath and -name> (s. picture). Starting with debugger does everything as expected. Starting the app from Finder works as well.
« Last Edit: July 16, 2020, 07:59:14 am by wittbo »
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Application does not start from IDE
« Reply #1 on: July 15, 2020, 12:16:24 pm »
I lodged a bug report fo this issue a little while ago. See https://bugs.freepascal.org/view.php?id=36780

The issue occurs when the Lazarus IDE has been compiled with FPC 3.2.0 (release) or 3.3.1 (trunk). I have a trivial (brute force) patch to fix the issue. See the Wiki Lazarus IDE - Unable to "run without debugging".

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Application does not start from IDE
« Reply #2 on: July 15, 2020, 04:14:22 pm »
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Application does not start from IDE
« Reply #3 on: July 15, 2020, 04:16:34 pm »
With R63565 it's line 7455
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

wittbo

  • Full Member
  • ***
  • Posts: 150
Re: Application does not start from IDE
« Reply #4 on: July 15, 2020, 06:38:03 pm »
Thank you for your hints.
I found main.pp in /library/Lazarus/IDE and made the modification as described.
Recompile of Lazarus seems to be done, but I don't find any new executable.
Restarting Lazarus, trying to start without debugger, same problem as before.
It seems, that the new executable is not active or anything else.
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Application does not start from IDE
« Reply #5 on: July 15, 2020, 09:10:32 pm »
I have this problem, too.

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Application does not start from IDE
« Reply #6 on: July 15, 2020, 11:50:45 pm »
You need to REBUILD lazarus.


TOOLS -=> Build Lazarus with Profile: Normal.


That should do the trick
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Application does not start from IDE
« Reply #7 on: July 16, 2020, 06:09:05 am »
I found main.pp in /library/Lazarus/IDE and made the modification as described.
Recompile of Lazarus seems to be done, but I don't find any new executable.
Restarting Lazarus, trying to start without debugger, same problem as before.
It seems, that the new executable is not active or anything else.

Do you have write access to the directory that contains the Lazarus source code?

When the Lazarus directory is write protected, as in Unix systems, the IDE builds its new executable into a sub folder of the primary config path, for example ~/.lazarus/bin/. You can see the primary config path in View / IDE internals / About IDE.

Once you run startlazarus, it searches and starts the newest lazarus executable. Initially it starts the original from the installation directory. After Lazarus has rebuilt itself, startlazarus starts the newly built version.

wittbo

  • Full Member
  • ***
  • Posts: 150
Re: [SOLVED] Application does not start from IDE
« Reply #8 on: July 16, 2020, 08:05:35 am »
Thanks a lot, Trev.

since Installation of Lazarus needs admin permissions and my macOS standard user does not have any admin permission, the new executable was found in .../.lazarus/bin. Just moved (with macOS terminal) the rebuilt lazarus file into the correct folder /library/lazarus, and hi, it worked.
BTW, it is interesting that the rebuilt binary is nearly as twice as large (67 MB) as the original one (38 MB).
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: [SOLVED] Application does not start from IDE
« Reply #9 on: July 16, 2020, 09:05:04 am »
No worries! Glad to have been of help.

PS. Size - may have something to do with your debug settings when rebuilding the IDE.
« Last Edit: July 16, 2020, 09:09:28 am by trev »

 

TinyPortal © 2005-2018