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

TeachingTip throws exception when calling isOpen #349

Closed
lukeblevins opened this issue Feb 24, 2019 · 13 comments
Closed

TeachingTip throws exception when calling isOpen #349

lukeblevins opened this issue Feb 24, 2019 · 13 comments
Assignees
Labels
area-TeachingTip bug Something isn't working team-Controls Issue for the Controls team

Comments

@lukeblevins
Copy link
Contributor

Describe the bug
Defining a TeachingTip in XAML markup and setting the isOpen property will cause the app to crash after throwing a Microsoft C++ exception: winrt::hresult_error at memory location 0x0000001B01A7DF90. Since this is definitely a low level error, it requires certain debug symbols for the Microsoft.UI.Xaml.dll module that are not present on my machine, even after loading all symbols.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Define any type of TeachingTip in XAML (doesn't matter if bleeding image is present or not)
  2. Set the isOpen property from the XAML or C# source to true
  3. Build, Deploy, and Launch the app
  4. Navigate to the appropriate page which has the TeachingTip defined

Expected behavior

The TeachingTip should appear, and the application should not crash, nor throw any exceptions related to this control.

Screenshots

6417002d-8615-4e61-af66-22e6d8ea49ae png
f7b5ce11-762a-4660-8da9-92a6190246d5 png

Version Info

Please Note: Both target SDK versions tested (1809 and Insider build 18327) seemed to demonstrate this bug.

NuGet package version:

Windows 10 version Saw the problem?
Insider Build (18342) Yes
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Anniversary Update (14393)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context

Creating a reproduction project with nothing except a button and the teaching tip attached to it had the same problem. Furthermore, I understand that this is a pre-release control, so I don't expect it to be working at all. I just wanted to ensure this bug is evaluated before the control is released to stable.

@msft-github-bot msft-github-bot added this to Needs triage in Controls Triage Feb 24, 2019
@jevansaks jevansaks added bug Something isn't working area-TeachingTip labels Feb 25, 2019
@jevansaks jevansaks moved this from Needs triage to Approved in Controls Triage Feb 25, 2019
@jevansaks jevansaks moved this from Approved to Approved - Assigned in Controls Triage Feb 25, 2019
@jevansaks
Copy link
Member

Thanks for the report! The missing symbols is something that was broken for this build which I've corrected for future builds, but I did go back and try to re-publish symbols for this prerelease. Hopefully that will be working by the end of today.

As for the crash you're seeing, @StephenLPeters can you please take a look when you're back tomorrow?

@jevansaks
Copy link
Member

@duke7553 look like symbols are published now, could you try resolving symbols and getting a crash stack now? Thanks!

@lukeblevins
Copy link
Contributor Author

@jevansaks I just tried to resolve the symbols, and everything went fine until I received an error related to base.h not being found.
9454975c-fe21-4f10-9c70-8733a0c87f8e png
annotation 2019-02-25 165556
In case it helps you, this file not found error may be related to what is described above. I did successfully attempt to change the SDK of my project to 19h1, but still couldn't resolve symbols.

@jevansaks
Copy link
Member

Could you copy/paste the text from the Callstack window? Some of the files (like base.h) are from generated files and therefore aren't possible to source index since they don't live in GitHub.

@lukeblevins
Copy link
Contributor Author

This is everything I found in the call stack window

 	[External Code]	
>	Microsoft.UI.Xaml.dll!winrt::throw_hresult(const winrt::hresult result) Line 4567	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!winrt::check_hresult(winrt::hresult) Line 4612	C++
 	Microsoft.UI.Xaml.dll!winrt::impl::consume_Windows_UI_Xaml_IVisualStateManagerStatics<winrt::Windows::UI::Xaml::IVisualStateManagerStatics>::GoToState(const winrt::Windows::UI::Xaml::Controls::Control & control, const winrt::param::hstring & stateName, bool useTransitions) Line 5153	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!winrt::Windows::UI::Xaml::VisualStateManager::GoToState::__l2::<lambda_9e66308770f1fce86491830749545e52>::operator()(const winrt::Windows::UI::Xaml::IVisualStateManagerStatics &) Line 17653	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!winrt::impl::factory_cache_entry<winrt::Windows::UI::Xaml::VisualStateManager,winrt::Windows::UI::Xaml::IVisualStateManagerStatics>::call(winrt::Windows::UI::Xaml::VisualStateManager::GoToState::__l2::<lambda_9e66308770f1fce86491830749545e52> &) Line 7403	C++
 	Microsoft.UI.Xaml.dll!winrt::impl::call_factory<winrt::Windows::UI::Xaml::VisualStateManager,winrt::Windows::UI::Xaml::IVisualStateManagerStatics,<lambda_9e66308770f1fce86491830749545e52> >(winrt::Windows::UI::Xaml::VisualStateManager::GoToState::__l2::<lambda_9e66308770f1fce86491830749545e52> && callback) Line 7496	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!winrt::Windows::UI::Xaml::VisualStateManager::GoToState(const winrt::Windows::UI::Xaml::Controls::Control & useTransitions, const winrt::param::hstring &) Line 17653	C++
 	Microsoft.UI.Xaml.dll!TeachingTip::OnIconSourceChanged() Line 772	C++
 	Microsoft.UI.Xaml.dll!TeachingTip::OnApplyTemplate() Line 91	C++
 	Microsoft.UI.Xaml.dll!winrt::impl::produce<TeachingTip,winrt::Windows::UI::Xaml::IFrameworkElementOverrides>::OnApplyTemplate() Line 10255	C++
 	[External Code]	

@jevansaks
Copy link
Member

Thanks! We'll investigate.

@SavoySchuler
Copy link
Member

@duke7553, I know in the earlier version of the control there is a bug that causes the tip to crash if it does not contain fields for an icon and hero (formerly "bleeding") content. It is something that should be fixed in the updated version. But to help you where you're at, I've included the code from my working branch of the XAML Sample Gallery below. Does adding the IconSource and BleedingImageContent fix it for you?

.xaml

            <Button Content="Save" Click="SaveButtonClick1">
                <muxc:TeachingTip.Attach>
                    <muxc:TeachingTip x:Name="AutoSaveTip1"
                        Title="Saving automatically"
                        Subtext="We save your changes as you go - so you never have to.">
                        <muxc:TeachingTip.IconSource>
                            <muxc:SymbolIconSource Symbol="Save"/>
                        </muxc:TeachingTip.IconSource>
                        <muxc:TeachingTip.BleedingImageContent>
                            <Grid/>
                        </muxc:TeachingTip.BleedingImageContent>
                    </muxc:TeachingTip>
                </muxc:TeachingTip.Attach>
                <Button.Resources></Button.Resources>
            </Button>

.cs

    private void SaveButtonClick1(object sender, RoutedEventArgs e)
    {
        AutoSaveTip1.IsOpen = true;
    }

If not, it will require @StephenLPeters to help us look into it.

@StephenLPeters
Copy link
Contributor

@duke7553 I've done some digging and found this issue, it is a bug in teaching tip and we are very grateful for your help finding it. If you need a work around right now you can either set an Icon on your teaching tip, or, because of a very strange quirk in this bug, run your app without a debugger attached.

This is actually why this bug escaped us, the crash will only occur while a debugger is attached and the tip has no icon, all of our tests run without a debugger by default and our manual verification included an icon.

I'll be submitting a fix for this shortly. Thanks again!

Controls Triage automation moved this from Approved - Assigned to Closed Mar 1, 2019
@msft-github-bot msft-github-bot removed this from Closed in Controls Triage Mar 1, 2019
@lukeblevins
Copy link
Contributor Author

@StephenLPeters I tried the workaround to add an IconSource and start without a debugger, but one of two things happen:

  • If IsOpen is set from source code, it does not display at all, but no crash.
  • If IsOpen is set from markup, it crashes with a similar error as last time.

Not sure if your PR fixes this, but I thought I should report it.

@msft-github-bot msft-github-bot added this to Needs triage in Controls Triage Mar 2, 2019
@jevansaks
Copy link
Member

Thanks for the extra details, we'll make sure we try both of those scenarios ASAP.

@jevansaks jevansaks reopened this Mar 6, 2019
@jevansaks
Copy link
Member

@StephenLPeters Once you've verified that this is fixed, please close.

@jevansaks jevansaks moved this from Needs triage to Approved - Assigned in Controls Triage Mar 6, 2019
@msft-github-bot
Copy link
Collaborator

🎉This issue was addressed in #364, which has now been successfully released as Microsoft.UI.Xaml v2.1.190319001-prerelease.:tada:

Handy links:

@lukeblevins
Copy link
Contributor Author

@StephenLPeters The TeachingTip is now able to display when IsOpen is called from non-markup code. I'll close this issue.

Controls Triage automation moved this from Approved - Assigned to Closed Apr 7, 2019
@msft-github-bot msft-github-bot moved this from Closed to Needs triage in Controls Triage Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TeachingTip bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

5 participants