Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PT Run] Add logs for Launcher #8489

Merged
merged 4 commits into from
Dec 10, 2020

Conversation

mykhailopylyp
Copy link
Contributor

Summary of the Pull Request

What is this about?
Logs should help easily localize Launcher is not starting problem
.

PR Checklist

Info on Pull Request

What does this include?

  • Log POWER_LAUNCHER_SHARED_EVENT is set. With that, we can determine if a problem is with runner.
  • Log if Launcher is exited even though PT RUN is enabled in the settings.
  • Log Launcher reacted on the signaled event. It says if synchronization works as expected.
  • Log OnHotkey handler was invoked. With this and the above log, we can determine either Launcher reacted on the hotkey or on the event

Validation Steps Performed

How does someone test & validate?
Check out log files

@mykhailopylyp mykhailopylyp added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label Dec 8, 2020
@github-actions
Copy link

github-actions bot commented Dec 8, 2020

New misspellings found, please review:

  • messageboxes
  • successfull
To accept these changes, run the following commands
perl -e '
my @expect_files=qw('".github/actions/spell-check/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"aae abkseg actionkeyword aeroglass alannt777 alfredtheme APPDATA APPID appxpackage AProduct baf bakudies basedir bfa Bitmaps bretan BYCOMMAND calculatorpinyindb cbegin cdd cend cerr cheatsheet Combobox compat COUNTSLABELFMT ctx deletefilefolder Deserialized desktoppreviewhandler desktopshortcutinstalled dicts dirn dropdownstypekey dropdowntypekey DString Dvs EBF ecf Ecma ecmascript efa efd ei eig eigval eigvec ENTIREITEMNAME evt EWX excmd executionengine EXPLR FORCEIFHUNG ftp Fx fxml GETDESKWALLPAPER GWL gwoyeu hanyu hglobal hicon Highcontrast hyjiacan IAlphabet IExclusive iexplore IInstant IME IMulti Indexerpinyindb Inlining isborderless Italiano JObject jsonrpc KBHOOK KBM KListener KSeparator lastpos launcherpinyin Launcherpinyindb Laute lbl lbx Linux LSHIFT MENUSTART nc NCol NHotkey numberbox orphanedkey osdetection Pampalona pdk PERSISTEDDATA pimpl pinyindb Pipename Plist plistlib pls Pluginpinyindb Polski Portugu POWEROFF POWERTOYNAME Prepends PREVPANE progman Programpinyindb Progressbar Rects reggedit remapkey remapkeyboard remapper remapshort Remoting reulst rgba rgn rk RPressed RStroked Rtc RWIN Scrollable scrollbar sessionending setings setwineventhook Shellpinyindb shortcutguide SHOWNA SHOWWINDOW Slovensk sni Srpski stefan strem stringstream subdir Subheader sublicensable superfancyzones SYSKEYDOWN systemcolors Tcp temppath thr Tls tmpnam tohex transaprency TRANSPARENTGRADIENT TResult TZone uac uapmanifestschema uk Unsubscribe USERPROFILE VGr VIRTUALDESKTOPCHANGE virtualized Virtualizing vkcode vstest Walkerpinyindb wangyiyun wca wcschr wcsrchr Webcam websearch wexfs winapi windr winlogo winr WINTAB WORKERW wsmatch wtmpnam Xecutor xyzpreviewhandler yinle yinyue yyy ZConfig "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^($re)(?:$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spell-check/expect.txt";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"Actionkeyword appdata appid combobox Compat Ctx deserialized ebf Entireitemname explr fx gwl HGLOBAL HICON IEXPLORE ime jobject kbm laute lshift messageboxes ncol pipename prevpane Progman progressbar Remapper Rgn rwin scrollable showwindow Subdir successfull syskeydown UAC unsubscribe userprofile Wca webcam WINAPI "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
git add .github/actions/spell-check || echo '... you want to ensure .github/actions/spell-check/expect.txt is added to your repository...'

Copy link
Contributor

@ivan100sic ivan100sic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I verified that there are new entries in log files.

@github-actions
Copy link

github-actions bot commented Dec 9, 2020

New misspellings found, please review:

  • messageboxes
To accept these changes, run the following commands
perl -e '
my @expect_files=qw('".github/actions/spell-check/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"aae abkseg actionkeyword aeroglass alannt777 alfredtheme APPDATA APPID appxpackage AProduct baf bakudies basedir bfa Bitmaps bretan BYCOMMAND calculatorpinyindb cbegin cdd cend cerr cheatsheet Combobox compat COUNTSLABELFMT ctx deletefilefolder Deserialized desktoppreviewhandler desktopshortcutinstalled dicts dirn dropdownstypekey dropdowntypekey DString Dvs EBF ecf Ecma ecmascript efa efd ei eig eigval eigvec ENTIREITEMNAME evt EWX excmd executionengine EXPLR FORCEIFHUNG ftp Fx fxml GETDESKWALLPAPER GWL gwoyeu hanyu hglobal hicon Highcontrast hyjiacan IAlphabet IExclusive iexplore IInstant IME IMulti Indexerpinyindb Inlining isborderless Italiano JObject jsonrpc KBHOOK KBM KListener KSeparator lastpos launcherpinyin Launcherpinyindb Laute lbl lbx Linux LSHIFT MENUSTART nc NCol NHotkey numberbox orphanedkey osdetection Pampalona pdk PERSISTEDDATA pimpl pinyindb Pipename Plist plistlib pls Pluginpinyindb Polski Portugu POWEROFF POWERTOYNAME Prepends PREVPANE progman Programpinyindb Progressbar Rects reggedit remapkey remapkeyboard remapper remapshort Remoting reulst rgba rgn rk RPressed RStroked Rtc RWIN Scrollable scrollbar sessionending setings setwineventhook Shellpinyindb shortcutguide SHOWNA SHOWWINDOW Slovensk sni Srpski stefan strem stringstream subdir Subheader sublicensable superfancyzones SYSKEYDOWN systemcolors Tcp temppath thr Tls tmpnam tohex transaprency TRANSPARENTGRADIENT TResult TZone uac uapmanifestschema uk Unsubscribe USERPROFILE VGr VIRTUALDESKTOPCHANGE virtualized Virtualizing vkcode vstest Walkerpinyindb wangyiyun wca wcschr wcsrchr Webcam websearch wexfs winapi windr winlogo winr WINTAB WORKERW wsmatch wtmpnam Xecutor xyzpreviewhandler yinle yinyue yyy ZConfig "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^($re)(?:$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spell-check/expect.txt";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"Actionkeyword appdata appid combobox Compat Ctx deserialized ebf Entireitemname explr fx gwl HGLOBAL HICON IEXPLORE ime jobject kbm laute lshift messageboxes ncol pipename prevpane Progman progressbar Remapper Rgn rwin scrollable showwindow Subdir syskeydown UAC unsubscribe userprofile Wca webcam WINAPI "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
git add .github/actions/spell-check || echo '... you want to ensure .github/actions/spell-check/expect.txt is added to your repository...'

@mykhailopylyp
Copy link
Contributor Author

@jsoref
Why is 'messageboxes' misspelling found here? It does not seem to be part of the new code.

@@ -294,7 +294,7 @@ class Microsoft_Launcher : public PowertoyModuleIface
{
if (WaitForSingleObject(m_hProcess, 0) == WAIT_OBJECT_0)
{
Logger::warn("Launcher exited. Try to restart process.");
Logger::warn("PowerToys Run has exited unexpectedly, restarting PowerToys Run.");
// The process exited, restart it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the logger message already states the same, let's remove this comment.

@jsoref
Copy link
Contributor

jsoref commented Dec 9, 2020

@mykhailopylyp because it was allowed to land into master (see the comment icon): https://github.com/microsoft/PowerToys/commits/master
@yuyoyuppe introduced this in #8473 -- the bot warned about it then.

Someone just needs to run the command the bot suggested and get that merged to master.

Sorry.

@jsoref
Copy link
Contributor

jsoref commented Dec 9, 2020

Fwiw, I made #8512 which should resolve this. It's just running the script from the bot.

@enricogior
Copy link
Contributor

@mykhailopylyp
let's merge it.

@mykhailopylyp mykhailopylyp merged commit 6cefb4e into microsoft:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants