Crash in XamlBind sample when canceling 'Change Folder...' dialog

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp, csharp
Domain
desktop

Research direction

Start with Samples/XamlBind/cs/xBindSampleModel/FileSystemDataSource.cs at SetupDataSourceImpl() and Samples/XamlBind/cpp/PhasingTests.xaml.cpp at PhasingTests::ChangeFolderClick(). Reproduce the crash by canceling the Change Folder dialog, then verify the sample no longer dereferences the canceled folder and the List phasing using x:Phase tab remains usable.

Written by the indexing model from the issue text.

Description

FileDataSource::SetupDataSourceImpl() will dereference NULL on the 'List phasing using x:Phase' tab after choosing 'Cancel' from the 'Change Folder...' dialog.
https://github.com/microsoft/Windows-universal-samples/blob/cdfd8ef6b38a710eb5e85c776a48c8369b4c74de/Samples/XamlBind/cs/xBindSampleModel/FileSystemDataSource.cs#L112

This occurs since there is no NULL checking of 'f' when handling picker->PickSingleFolderAsync() in PhasingTests::ChangeFolderClick()
https://github.com/microsoft/Windows-universal-samples/blob/cdfd8ef6b38a710eb5e85c776a48c8369b4c74de/Samples/XamlBind/cpp/PhasingTests.xaml.cpp#L61

Dominant language
JavaScript
Stars
9.7k
Forks
7.8k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/Windows-universal-samples

All issues in microsoft/Windows-universal-samples

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.