Ich habe ein Problem mit einer Windows 10 UWP Store App.Windows 10 UWP XAML stowed_exception_802b000a_my_app.dll! Windows :: ui :: xaml :: iapplicationstatics__impl :: stubclass.loadcomponent
In der App sind zwei Seiten (Page1 und Page2) mit ähnlichen XAML-Steuerelementen, aber eine Seite (Page1) verursacht eine Menge Probleme beim Testen der App von Microsoft. Wenn sie versuchen, die App zu starten, löst die Initialisierung von Page1 eine Ausnahme aus. Wenn ich ein bestimmtes XAML-Steuerelement entferne, ist alles in Ordnung, aber Seite2 enthält genau die gleichen Steuerelemente und funktioniert perfekt. Auf meinem lokalen Rechner habe ich keine Ausnahmen, keine Warnungen, das Windows-Zertifizierungskit sagt, die App habe keine Probleme und ich kann die Ausnahme nicht reproduzieren.
Wenn ich die AppBarButtons aus der CommandBar auf Page1 entfernen, hat der Test Microsoft Test-Typ keine Ausnahme. Die ähnliche CommandBar auf Page2 verursacht keine Ausnahme auf dem Computer des Testtyps.
XAML-Code von Seite1 (die das Problem hat):
<Page
x:Class="MyApp.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.BottomAppBar>
<CommandBar x:Name="cbCommandBar">
<AppBarButton x:Name="pageBack" Label="Zurück" HorizontalAlignment="Center" VerticalAlignment="Top" Click="pageBack_Click">
<AppBarButton.Icon>
<SymbolIcon Symbol="Previous"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton x:Name="pageNext" Label="Vor" HorizontalAlignment="Center" VerticalAlignment="Top" Click="pageNext_Click">
<AppBarButton.Icon>
<SymbolIcon Symbol="Next"/>
</AppBarButton.Icon>
</AppBarButton>
<CommandBar.SecondaryCommands>
<AppBarButton x:Name="firstPage" Label="Erste Seite" Click="firstPage_Click"/>
</CommandBar.SecondaryCommands>
</CommandBar>
</Page.BottomAppBar>
</Page>
XAML-Code von Seite 2:
<Page
x:Class="MyApp.Page2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.BottomAppBar>
<CommandBar x:Name="cbCommandBar">
<AppBarButton x:Name="downloadImage" Content="Herunterladen" Label="Herunterladen" HorizontalAlignment="Right" VerticalAlignment="Top" Click="downloadImage_Click">
<AppBarButton.Icon>
<SymbolIcon Symbol="Download"/>
</AppBarButton.Icon>
</AppBarButton>
<CommandBar.SecondaryCommands>
<AppBarButton x:Name="viewInBrowser" Label="Webansicht" Click="viewInBrowser_Click"/>
</CommandBar.SecondaryCommands>
</CommandBar>
</Page.BottomAppBar>
</Page>
Die Ausnahme:
stowed_exception_802b000a_my_app.dll!windows::ui::xaml::iapplicationstatics__impl::stubclass.loadcomponent
im Windows Dev Center I kann folgende Aufrufliste sehen: Frame Bild Funktion Versatz
0 combase.dll RoOriginateErrorW 0x000000000000004E
1 Windows.UI.Xaml.dll DirectUI::ErrorHelper::OriginateError 0x000000000000014C
2 Windows.UI.Xaml.dll CJupiterErrorServiceListener::NotifyErrorAdded 0x0000000000000192
3 Windows.UI.Xaml.dll CErrorService::AddError 0x0000000000000140
4 Windows.UI.Xaml.dll CErrorService::ReportParserError 0x0000000000000126
5 Windows.UI.Xaml.dll ParserErrorService::ReportError 0x0000000000000146
6 Windows.UI.Xaml.dll ParserErrorReporter::SetError 0x000000000000007E
7 Windows.UI.Xaml.dll ObjectWriterErrorService::ReportError 0x0000000000000064
8 Windows.UI.Xaml.dll BinaryFormatObjectWriter::SetValueOnCurrentInstance 0x000000000000087D
9 Windows.UI.Xaml.dll BinaryFormatObjectWriter::WriteNode 0x0000000000000418
10 Windows.UI.Xaml.dll CParser::LoadXamlCore 0x0000000000000536
11 Windows.UI.Xaml.dll CCoreServices::ParseXamlWithExistingFrameworkRoot 0x0000000000000133
12 Windows.UI.Xaml.dll CApplication::LoadComponent 0x000000000000023E
13 Windows.UI.Xaml.dll Application_LoadComponent 0x00000000000000C0
14 Windows.UI.Xaml.dll DirectUI::FrameworkApplication::LoadComponent 0x00000000000000C7
15 Windows.UI.Xaml.dll DirectUI::FrameworkApplicationFactory::LoadComponentWithResourceLocationImpl 0x0000000000000071
16 Windows.UI.Xaml.dll DirectUI::FrameworkApplicationFactory::LoadComponentWithResourceLocation 0x000000000000004D
17 MyApp.McgInterop.dll McgInterop::ComCallHelpers.ComCall__HRESULT 0x000000000000008D
18 MyApp.McgInterop.dll Windows::UI::Xaml::IApplicationStatics__Impl::StubClass.LoadComponent 0x0000000000000074
19 MyApp.exe MyApp::Page1.InitializeComponent 0x000000000000005E
20 MyApp.exe MyApp::Page1..ctor 0x00000000000000AC
21 MyApp.exe MyApp::App..ctor 0x0000000000000083
22 MyApp.exe MyApp::Program::__c._Main_b__0_0 0x0000000000000019
23 MyApp.McgInterop.dll Windows::UI::Xaml::WindowSizeChangedEventHandler.Invoke 0x000000000000000F
24 MyApp.McgInterop.dll McgInterop::ReverseComSharedStubs.Proc_TArg0___System.__Canon_ 0x000000000000005A
25 MyApp.McgInterop.dll Windows::UI::Xaml::ApplicationInitializationCallback__Impl::Vtbl.Invoke__STUB 0x0000000000000037
26 Windows.UI.Xaml.dll DirectUI::FrameworkApplication::MainASTAInitialize 0x00000000000000A7
27 Windows.UI.Xaml.dll DirectUI::FrameworkView::Initialize 0x0000000000000069
28 twinapi.appcore.dll Windows::ApplicationModel::Core::CoreApplicationView::CreateAndInitializeFrameworkView 0x00000000000000A7
29 twinapi.appcore.dll _lambda_84f6292064cee6c4c814a3a064a63b95_::operator 0x00000000000001B4
30 twinapi.appcore.dll _lambda_fe571ab0da94534d32388f0f07e67faa_::operator 0x0000000000000044
31 SHCore.dll _WrapperThreadProc 0x00000000000000C4
32 kernel32.dll BaseThreadInitThunk 0x0000000000000014
33 ntdll.dll RtlUserThreadStart 0x0000000000000021
Ich kann keine Erklärung für dieses Problem finden.
Vielleicht hat jemand eine Idee. Vielen Dank!
Ok danke, ja auf meinem Computer funktioniert es auch perfekt. Hier sind die Versionsinformationen: Microsoft Visual Studio Gemeinschaft 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.7.02046 Visual Studio-Tools für Windows-Universelle-Apps 14.0.25527.01 Der Code hinter Seite1 ist einfach, ich fordere Daten von einer Http-API und gebe das Ergebnis in ein Grid aus (im Beispiel habe ich es entfernt). Wenn der Benutzer eines der AppbarButtons verwendet, starte ich eine neue Anfrage nur mit verschiedenen Parametern wie aktuelle Seite Index + 1. – JD98
Ich habe auch die Anwendung in einer virtuellen Maschine getestet und es funktioniert. Vom Windows Dev Center kann ich einen Mini-Dump herunterladen, aber dieser Dump ist nicht detailliert genug, um ihn in VS zu laden und mehr als den Aufruf-Stack zu sehen. – JD98