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:
- Give priority to the runtime file in
$PLUGINSDIR
when reading - Setup and copy
$DataDirectory
inInit
- 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.
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
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.
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
AppNamePortable.ini
:The launcher should complain that another instance is already starting.
Previously known as kAlug.
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.
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!