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

[release/1.4-stable] Fix crashes in the installer #3806

Conversation

codendone
Copy link
Contributor

(cherry-picked from commit cc3f5aa7)

Original PR description (#3796):

Fix crashes in the installer, which appears to account for 95%+ of crashes in WindowsAppRuntimeInstall.exe.

Errors fixed:

  • InstallActivityContext.cpp was passing an hstring to StringCchPrintf for the activity Id. Fix: call ".data()" on the hstring to properly pass the WCHAR*.
  • InstallActivityContext.cpp was passing std::wstring to StringCchPrintf for the resource (package) id and error text. Fix: call ".c_str()" on the std::wstring to properly pass the WCHAR*.
  • InstallActivityContext.cpp for ProvisionPackage failures wasn't passing the resource/package id for one of the "%s" arguments. Fix: Pass m_currentResourceId.c_str() for that argument.
  • InstallActivityContext.cpp for StagePackage failures was passing a GUID for one of the "%s" arguments. Fix: convert the GUID to a string, like is done for active Ids elsewhere.
  • GetAndLogDeploymentOperationResult() didn't always return a value. Fix: put back the "return S_OK" which was removed in a previous change.
  • DeregisterInstallerEventSourceW() was returning a "const BOOL&", which was a reference to a stack variable. Fix: Fixed that compiler warning by making it not a reference.

This change is intended to address issues reported in #3760.

@codendone
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@codendone codendone merged commit c90ac9b into release/1.4-stable Aug 22, 2023
2 of 3 checks passed
@codendone codendone deleted the user/codendone/cherry-pick-fixBadPrintf-onto-release-1.4-stable branch August 22, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants