Everything is not exiting when I close it

Discussion related to "Everything" 1.5 Alpha.
Post Reply
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Everything is not exiting when I close it

Post by vsub »

It rarely happens so I don't have a sure way to reproduce it.
What I usually do when I want to update everything is
1.File=>Exit
2.Go to the everything folder and run a bat file as admin that stops the service
3.When I see that the survive is successfully stopped,I try to delete the exe but I rarely get a message that the file is in use and when I check the task manager,I see that the process is still there(no activities of any kind,it's like a zombie process)
therube
Posts: 4953
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything is not exiting when I close it

Post by therube »

I do similar on updates (though manually; everything.exe -uninstall-service...) & can't say I remember running into said issue.

Perhaps... if the .db is (really) large, it could still be in the process of writing to disk ? so even though the GUI is gone... but you would think that during that time the Service couldn't be uninstalled ? or maybe it could ? & that might result in your zombie?

Or perhaps some other program (or even shell extension) is interfering, from time to time, with proper close?
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything is not exiting when I close it

Post by void »

There's likely a shell extensions that has stopped responding.

Could you please send a mini crash dump:
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Everything is not exiting when I close it

Post by vsub »

Ok I will create the file but the thing is,as I said,this happens at random
I have to wait until it happens again and then create the file(if I don't forget)

The only shell extension I have is Open++
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything is not exiting when I close it

Post by void »

Everything 1.5.0.1362a will now attempt to end the message loop for shell threads.

Hopefully, this will help terminate the pending shell threads.

Does the issue persist with this version?
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Everything is not exiting when I close it

Post by vsub »

void wrote: Fri Dec 15, 2023 1:52 am Everything 1.5.0.1362a will now attempt to end the message loop for shell threads.

Hopefully, this will help terminate the pending shell threads.

Does the issue persist with this version?
The same thing happen again when I tried to update
It's like File=>Exit just hides the window and the tray icon
When I run Everything again,it acted exactly as if I hide the window(hide on close option),it displayed all of my tabs but when I File=>Exit again,this time it did close the process

I tried few times to exit Everything after updating it and the problem didn't appear
I am not sure the problem if because of a shell extension,I don't restart my laptop for a long time(just put it to sleep when I don't use it)
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Everything is not exiting when I close it

Post by vsub »

I will set the option "context_menu_shell_extensions" to 0 and see if that happens again the next time I need to restart Everything(there is nothing in the context menu I actually need while I and right clicking in the result window anyway and it menu appears faster)
Thy Grand Voidinesss
Posts: 687
Joined: Wed Jun 01, 2022 5:01 pm

Re: Everything is not exiting when I close it

Post by Thy Grand Voidinesss »

For me what always seems to work for un-blocking is using such a BAT script

Code: Select all

@echo off
taskkill /im Everything.exe
timeout /t 1 >nul
taskkill /im Everything.exe /t /f
net stop "Everything (1.5a)"
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything is not exiting when I close it

Post by void »

Please avoid terminating Everything and the Everything Service.
All changes to your settings and database will be lost when you terminate Everything.



I will make some changes for the next alpha update to exit more reliably when requested.
therube
Posts: 4953
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything is not exiting when I close it

Post by therube »

Does -close-all cause the GUI to (gracefully) exit?
(No. It simply closes all GUI windows, but the GUI persists [in the System Tray].)
If so, then Everything.exe -close-all would be a far better method compared to taskkill (in the .bat).
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything is not exiting when I close it

Post by void »

Everything 1.5.0.1366a will no longer "gracefully" exit.

Once the config, search history, run history and database is written to disk, the process terminates.

Please let me know if Everything does not exit quickly with this version.



Previous versions would "gracefully" exit.
By gracefully, I mean each created window would be destroyed, each handle returned to the system, each thread would be shutdown, all allocated memory freed, etc...

Now, the Everything process terminates and the system cleans up.
Everything no longer waits for threads to end.



Everything enters a shutdown mutex during shutdown.
If you relaunch Everything, it will check for this shutdown mutex and wait for it to close.
If the shutdown takes longer than 10 seconds (previously 30 seconds) a dialog is shown to terminate or wait.
This dialog will now automatically disappear when the other Everything process exits.
Please avoid hitting terminate as you will loose changes to your settings and database.


Does -close-all cause the GUI to (gracefully) exit?
No.
This simply closes all UI windows.
The Everything process continues running.

You can terminate Everything.
it won't corrupt your existing settings or database.
You'll simply loose any changes to your settings and database.
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Everything is not exiting when I close it

Post by vsub »

I cannot be 100% sure since this happens at random but since 1366a,I have no problems exiting Everything and there is no delay exiting
Thy Grand Voidinesss
Posts: 687
Joined: Wed Jun 01, 2022 5:01 pm

Re: Everything is not exiting when I close it

Post by Thy Grand Voidinesss »

Another topic about issues with closing of Everything: viewtopic.php?t=14103
eswul62
Posts: 127
Joined: Wed Jul 31, 2013 6:07 am

Re: Everything is not exiting when I close it

Post by eswul62 »

Out of curiosity...

How about an option to add a "Net stop" command to File Exit ?

so, like
net stop "Everything (Portable)"
and
net stop "Everything (1.5a)"

Would that help?
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything is not exiting when I close it

Post by void »

There's an ini setting to stop the service on exit:
  • In Everything, from the File menu, click Exit.
  • From the Start menu, search for: notepad
  • Right click Notepad and click Run as administrator.
  • In Notepad, from the File menu, click Open.
  • Select your Everything.ini in the same location as your Everything.exe
  • Change the following line:
    stop_service_on_exit=0
    to:
    stop_service_on_exit=1
  • Save changes and restart Everything.
Please don't enable this option if you are using multiple instances.
Enabling this option will not help Everything close.
eswul62
Posts: 127
Joined: Wed Jul 31, 2013 6:07 am

Re: Everything is not exiting when I close it

Post by eswul62 »

Thanks a lot.

In my case, running Everything (installed) and Everything (portable) side by side, it will not help to update both .ini's then?

Where portable is launched:
path\Everything64.exe -instance "Portable"
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything is not exiting when I close it

Post by void »

Closing one instance will break the other instance.

It's not fatal, the other instance will restart the service after one minute.
Everything will not see any file system changes to NTFS volumes while the Everything Service is stopped.

You can enable stop_service_on_exit in both inis.
I recommend leaving stop_service_on_exit disabled.
Post Reply