Bookstore

Recent

Author Topic: Lazarus built applications throwing errors when started from a shortcut  (Read 129 times)

Nevada Smith

  • New Member
  • *
  • Posts: 11
I am facing a curious problem. To cite an example, I will take the case of Double Commander, which is an application built using Lazarus. Rather than installing Double Commander, I am using the portable version. After decompressing it to a directory (d:\bin\doublecmd), if I try to run it from there (by double-clicking on the executable), it works fine. If I create a shortcut to the same executable in the Desktop and if I try to run it(by double-clicking on the shortcut), it does not work. The start in directory of the shortcut points to the same directory where the executable is. As a workaround, I have created a script start_doublecmd.cmd, where I cd to the installation folder, and then do start doublecmd.exe, and I have created a shortcut for this script in the Desktop. This works fine. Now, the same problem happens with Lazarus installation too. After installing Lazarus (to a folder in D:\ drive, as a non-admin user), I can reliably start Lazarus only from the installation folder. It starts once from the shortcut in the Desktop, but afterwards starts and within a second or so gets killed. I am developing an app and I can see the same problem with it too. If I create a shortcut on the Desktop, it starts misbehaving (it works fine, but throws random exceptions). If I start my app from its folder or through Lazarus IDE, it works perfectly fine.
I have the same problem in another installation of Windows 10 too, but only for Double Commander.
What could be the problem here? Or how can I go about debugging this curious behaviour?
(Both machines have antivirus running - Symantec and Avast)
« Last Edit: March 25, 2020, 01:10:20 pm by Nevada Smith »