Recent

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

wittbo

  • Full Member
  • ***
  • Posts: 122
[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.0.10
iMac with MacOS 10.13.6 / Lazarus 2.0.2

trev

  • Hero Member
  • *****
  • Posts: 845
  • Former Delphi 1-7 and 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".
o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

madref

  • Hero Member
  • *****
  • Posts: 816
  • ..... 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 2.0.6 / FPC 3.0.4
Lazarus Trunc / FPC Trunc
Mac OS X Mojave

madref

  • Hero Member
  • *****
  • Posts: 816
  • ..... 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 2.0.6 / FPC 3.0.4
Lazarus Trunc / FPC Trunc
Mac OS X Mojave

wittbo

  • Full Member
  • ***
  • Posts: 122
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.0.10
iMac with MacOS 10.13.6 / Lazarus 2.0.2

Igor Kokarev

  • Full Member
  • ***
  • Posts: 200
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: 816
  • ..... 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 2.0.6 / FPC 3.0.4
Lazarus Trunc / FPC Trunc
Mac OS X Mojave

trev

  • Hero Member
  • *****
  • Posts: 845
  • Former Delphi 1-7 and 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.
o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

wittbo

  • Full Member
  • ***
  • Posts: 122
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.0.10
iMac with MacOS 10.13.6 / Lazarus 2.0.2

trev

  • Hero Member
  • *****
  • Posts: 845
  • Former Delphi 1-7 and 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 »
o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

 

TinyPortal © 2005-2018