You are here

[Fixed] PortableApps.com Launcher Starts Only Once When RunLocally=true

7 posts / 0 new
Last post
Aluísio A. S. G.
Offline
Last seen: 6 years 6 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
[Fixed] PortableApps.com Launcher Starts Only Once When RunLocally=true

When Live Mode is enabled through AppNamePortable.ini and the media is not truly read-only, the launcher will not start the next time due to it believing that another instance is starting.

The reason is due to the "starting" status being written right in the initialization, but the runtime data file location is moved (to the local disk) later, and the original file is not updated anymore.
In the next start, that file will be read again and, as the status wasn't updated, it will abort.

In other words, this is the perpetual content of the file:

[PortableApps.comLauncher]
Status=starting

Possible solutions:

  1. Give priority to the runtime file in $PLUGINSDIR when reading
  2. Setup and copy $DataDirectory in Init
  3. Use mutexes for the starting and stopping events

As this bug affects both 2.1 and tip, I suggest using solution #1 for the former (it will require less testing) and #3 for tip.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 7 years 7 months ago
Joined: 2007-04-15 21:08
Mutexes for 2.2, move runtime data for 2.1

Mutexes for "starting" and "stopping" are in my 2.2 plan.

I think there's another solution which you haven't considered: moving the runtime data when $DataDirectory is changed. Unless you can think of anything wrong with that, that is what I think we shall do for 2.1.x. I suppose we should put this in for 2.1.1.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Aluísio A. S. G.
Offline
Last seen: 6 years 6 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
It already does that

The problem is that the original file is never updated, and the checking is performed right on the beginning. Remember, the media is not read-only.

Previously known as kAlug.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 7 years 7 months ago
Joined: 2007-04-15 21:08
Does work

I said moving the runtime data, meaning moving the file. CopyFiles, Delete; like this.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Aluísio A. S. G.
Offline
Last seen: 6 years 6 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
How to Reproduce
  1. Put the following in AppNamePortable.ini:

    RunLocally=true
  2. Start and close the app normally
  3. Try to start it again

The launcher should complain that another instance is already starting.

Previously known as kAlug.

htismaqe
Offline
Last seen: 6 years 7 months ago
Joined: 2010-10-01 10:54
Status=starting

I've encountered this issue. However, it doesn't happen every time. I haven't yet been able to figure out what triggers it.

Deleting the file allows the app to start again.

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 27 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in 2.1.1

This should be fixed in 2.1.1. We'll still be switching to mutexes in 2.2 for better handling.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments