I have the following code at the start of my app so it doesn’t have multiple copies running. It works great on Windows, Linux and MacOS. On a Raspberry Pi using the remote debugger, it thinks another copy was loaded and display the MessageBox shown in the code. Then the program starts after I acknowledge the MessageBox.
I have a workaround that will not run the short Mutex code if it’s a Raspberry Pi, but then I may run the risk of having more than one copy running.
I thought it might be something with the Remote Debugging, but it happens with a compiled version run on the system. Anyone seen this and have an idea of how to prevent the issue without turning off checking for another copy running?
Btw, it doesn’t happen on my Linux Mint system, only with the Raspberry Pi 4 and 64Bit OS. It’s not happening on my Pi 3.
mMutex = New Mutex("MPAddressBook")
If Not mMutex.TryEnter Then
MessageBox("You cannot have more than one copy of this app running!")
mMutex = Nil
Quit
End If