Bug 409124 - Missing MSVCP140.dll and VCRUNTIME140.dll (was: Parameters being ignored)
Summary: Missing MSVCP140.dll and VCRUNTIME140.dll (was: Parameters being ignored)
Status: RESOLVED FIXED
Alias: None
Product: Snoretoast
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-24 11:36 UTC by Daniel
Modified: 2019-06-27 07:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2019-06-24 11:36:05 UTC
SUMMARY

Something is really wrong with the parameters given to SnoreToast.exe. Even `-v` and `-h` do nothing.

STEPS TO REPRODUCE

1. Download SnoreToast nightly (commit 4240c64dc51ea71b00a603c96f84e9cd0c53874b)
2. Run the Installer (alternatively, only download the binary)
3. Run `SnoreToast.exe -v` or `SnoreToast.exe -h`

Alternatively:

1. Download sources (commit 4240c64dc51ea71b00a603c96f84e9cd0c53874b)
2. Compile with MSVC 19.21.27702.2 (cmake, nmake)
3. Run `SnoreToast.exe -v` or `SnoreToast.exe -h`

OBSERVED RESULT

Version or help output being printed to the terminal.

EXPECTED RESULT

No output.

SOFTWARE/OS VERSIONS
Windows: Version 10.0.17763 Build 17763

ADDITIONAL INFORMATION

Nightly binary exits with 0, while the locally compiled binary exits with 5.
Comment 1 Hannah von Reth 2019-06-24 12:41:53 UTC
yes we need a proper arg parser... do you know something lightweight which supports wchar?
Comment 2 Hannah von Reth 2019-06-26 08:07:12 UTC
Read your report again.

 SnoreToast.exe -h                                                                                                                                                                                                                                                 Welcome to SnoreToast 0.5.99.                                                                                                                                                                                                                                                   A command line application capable of creating Windows Toast notifications.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ---- Usage ----                                                                                                                                                                                                                                                                 SnoreToast [Options]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ---- Options ----                                                                                                                                                                                                                                                               [-t] <title string>     | Displayed on the first line of the toast.                                                                                                                                                                                                             [-m] <message string>   | Displayed on the remaining lines, wrapped.                                                                                                                                                                                                            [-b] <button1;button2 string>| Displayed on the bottom line, can list multiple buttons separated by ;                                                                                                                                                             [-tb]                   | Displayed a textbox on the bottom line, only if buttons are not presented.                                                                                                                                                                            [-p] <image URI>        | Display toast with an image, local files only.                                                                                                                                                                                                        [-id] <id>              | sets the id for a notification to be able to close it later.                                                                                                                                                                                          [-s] <sound URI>        | Sets the sound of the notifications, for possible values see http://msdn.microsoft.com/en-us/library/windows/apps/hh761492.aspx.                                                                                                                      [-silent]               | Don't play a sound file when showing the notifications.                                                                                                                                                                                               [-appID] <App.ID>       | Don't create a shortcut but use the provided app id.                                                                                                                                                                                                  [-pipeName] <\.\pipe\pipeName\> | Provide a name pipe which is used for callbacks.                                                                                                                                                                                              [-application] <C:\foo.exe>     | Provide a application that might be started if the pipe does not exist.                                                                                                                                                                       -close <id>             | Closes a currently displayed notification.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -install <name> <application> <appID>| Creates a shortcut <name> in the start menu which point to the executable <application>, appID used for the notifications.                                                                                                                                                                                                                                                                                                                                                                                               -v                      | Print the version and copying information.                                                                                                                                                                                                            -h                      | Print these instructions. Same as no args.                                                                                                                                                                                                            Exit Status     :  Exit Code                                                                                                                                                                                                                                                    Failed          : -1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Success         :  0                                                                                                                                                                                                                                                            Hidden          :  1                                                                                                                                                                                                                                                            Dismissed       :  2                                                                                                                                                                                                                                                            TimedOut        :  3                                                                                                                                                                                                                                                            ButtonPressed   :  4                                                                                                                                                                                                                                                            TextEntered     :  5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ---- Image Notes ----                                                                                                                                                                                                                                                           Images must be .png with:                                                                                                                                                                                                                                                               maximum dimensions of 1024x1024                                                                                                                                                                                                                                                 size <= 200kb                                                                                                                                                                                                                                                           These limitations are due to the Toast notification system. 

--------------------

SnoreToast.exe -v                                                                                                                                                                                                                                                 SnoreToast version 0.5.99                                                                                                                                                                                                                                                       Copyright (C) 2019  Hannah von Reth <vonreth@kde.org>                                                                                                                                                                                                                           SnoreToast is free software: you can redistribute it and/or modify                                                                                                                                                                                                              it under the terms of the GNU Lesser General Public License as published by                                                                                                                                                                                       the Free Software Foundation, either version 3 of the License, or                                                                                                                                                                                                               (at your option) any later version.                              


-----

The new version is always a gui application but if its run a console window it prints to it.
Comment 3 Daniel 2019-06-27 06:23:36 UTC
Huh. Interestingly, I am now getting error messages that I did not get last time. I guess this explains why parameters won't work.

Here they are (came as popups). Am I missing any dependencies?

```
The code execution cannot proceed because MSVCP140.dll was not found. Reinstalling the program may fix this problem.
```

```
The code execution cannot proceed because VCRUNTIME140.dll was not found. Reinstalling the program may fix this problem.
```
Comment 4 Daniel 2019-06-27 06:31:28 UTC
Haha. Ok. I did not have the Microsoft Visual C++ Redistributable installed.

Maybe this should be hinted somewhere as a dependency.

For future reference, download here:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Comment 5 Hannah von Reth 2019-06-27 07:46:08 UTC
Hi, in difference to the old build the runtime was not statically linked.
I think for something like snoretoast it makes sense to link it statically so https://github.com/KDE/snoretoast/commit/087de58cac44db8c325ca96061e1b55242a29080 should fix the issue.
Comment 6 Daniel 2019-06-27 07:48:32 UTC
Great! Thanks for the fix.