mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PowerToys Run] Crash on exit, logs (#11509)
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Microsoft.Plugin.Indexer
|
|||||||
// To save the configurations of plugins
|
// To save the configurations of plugins
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
_storage.Save();
|
_storage?.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function uses the Windows indexer and returns the list of results obtained
|
// This function uses the Windows indexer and returns the list of results obtained
|
||||||
|
|||||||
@@ -170,9 +170,23 @@ namespace PowerLauncher
|
|||||||
|
|
||||||
private void RegisterExitEvents()
|
private void RegisterExitEvents()
|
||||||
{
|
{
|
||||||
AppDomain.CurrentDomain.ProcessExit += (s, e) => Dispose();
|
AppDomain.CurrentDomain.ProcessExit += (s, e) =>
|
||||||
Current.Exit += (s, e) => Dispose();
|
{
|
||||||
Current.SessionEnding += (s, e) => Dispose();
|
Log.Info("AppDomain.CurrentDomain.ProcessExit", GetType());
|
||||||
|
Dispose();
|
||||||
|
};
|
||||||
|
|
||||||
|
Current.Exit += (s, e) =>
|
||||||
|
{
|
||||||
|
Log.Info("Application.Current.Exit", GetType());
|
||||||
|
Dispose();
|
||||||
|
};
|
||||||
|
|
||||||
|
Current.SessionEnding += (s, e) =>
|
||||||
|
{
|
||||||
|
Log.Info("Application.Current.SessionEnding", GetType());
|
||||||
|
Dispose();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ namespace Wox.Plugin
|
|||||||
private void LoadPlugin()
|
private void LoadPlugin()
|
||||||
{
|
{
|
||||||
var stopWatch = new Stopwatch();
|
var stopWatch = new Stopwatch();
|
||||||
|
stopWatch.Start();
|
||||||
CreatePluginInstance();
|
CreatePluginInstance();
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
Metadata.InitTime += stopWatch.ElapsedMilliseconds;
|
Metadata.InitTime += stopWatch.ElapsedMilliseconds;
|
||||||
|
|||||||
Reference in New Issue
Block a user