Start a new topic
Solved

one Instance

why you can start more then one Instance of NEON?

should that not be at one?


the old instance Crash and a new is execute... Hmmm

so i see the new instance and the Crash Dialog from old.


greets


Moved to feature requests

is not a feature requests is a Bug between Wasapi/exclusive mode.

if you want more IUnstanzes then remove exclusive mode for Wasapi or you has Trouble.


greets

Implemented in:

http://files.helium.fm/helium_0.5.499.0.exe


1 person likes this

unfortunately does not yet properly..

if Crash Neon then i can see 2 instances of Neon in Taskmanger.


the next instance should start if remove the old one from Task.


greets

The handling itself should work, hence this ticket should be closed.


Reproduction case:

1) Start Neon

2) Try to start a new instance


> No new instance will be started.


A semaphore is used to detect if an instance is running, hence if crashed hard (via WASAPI, which I cannot reproduce now) the semaphore might be released but not the actual dispatcher.

So, I will mark this as solved again, if you can identify another case not related to the WASAPI crash, please let me know,

do use process.start equivalent for ShellExecute?

if so, then something is not working properly,


i use something

 

  if Restart then
    Result := ShellExecute(0, 'open', PWideChar(ParamStr(0)), nil, nil, SW_SHOW)
  else
    Result := Msg.WParam;

end;
{$ENDREGION}

initialization

hMutex := CreateMutex(nil, TRUE, 'MSoundmachine');
if GetLastError = ERROR_ALREADY_EXISTS then
  Halt;

finalization

if hMutex <> 0 then
  CloseHandle(hMutex)

 


>>So, I will mark this as solved again


Ok sorry.


greets

I use this since it works better with WPF and Dispatchers:


(OnStartup)


            var result = Semaphore.TryOpenExisting(SEMAPHORE_NAME, out sema);

            if (result)

            {

                App.Current.Shutdown();

            }

            else

            {

                try

                {

                    sema = new Semaphore(1, 1, SEMAPHORE_NAME);

                }

                catch

                {

                    App.Current.Shutdown(); //

                }

            }

            if (!sema.WaitOne(0))

            {

                App.Current.Shutdown();

            }

            else

            {

                shouldRelease = true;

            }

and in OnExit I release the Semaphore


OK can not detect problems
should be of the same effect as the

Thanks for the insight into the code part.


have a nice evening.


greets

Thanks and the same to you.

Also thanks for all testing assistance, keep up the good work! :)

Login or Signup to post a comment