Closed mfe- closed 7 years ago
@mfe- fancy attaching a repro ?
I created the repo https://github.com/mfe-/App4 .
@mfe- I downloaded your solution and first thing I did was removed toolkit services and then ran the debug version of the app. on closing the app still crashes.. so not something to do with toolkit services
Having done that I upgraded the WindowsUniversalPlatform to 5.2.2 and that stopped the crashes.
Adding uwp toolkit services now and running it does not generate new crashes either on close
Thanks for the upgrade hint @hermitdave
At the moment I'm note able to reproduce the TypeLoadException with a new created uwp app project. Anyway in my current app I still get the TypeLoadException .
I added System.Diagnostics.Debug.WriteLine(fullName);
(only for debugging) to the XamlTypeInfo.g.cs
public global::Windows.UI.Xaml.Markup.IXamlType GetXamlType(string fullName)
{
System.Diagnostics.Debug.WriteLine(fullName);
if (_provider == null)
{
_provider = new global::Tetromino.Tetromino_XamlTypeInfo.XamlTypeInfoProvider();
}
return _provider.GetXamlTypeByName(fullName);
}
I could trace the following:
'Tetromino.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreRuntime.1.0_1.0.23819.0_x86__8wekyb3d8bbwe\mscorlib.ni.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\entrypoint\Tetromino.exe'. Symbols loaded. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Runtime.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\WinMetadata\Windows.winmd'. Module was built without symbols. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Runtime.InteropServices.WindowsRuntime.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Prism.Unity.Windows.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Prism.Windows.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Prism.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Threading.Tasks.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Globalization.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Resources.ResourceManager.dll'. Module was built without symbols. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Reflection.dll'. Module was built without symbols. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Runtime.WindowsRuntime.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Diagnostics.Debug.dll'. Cannot find or open the PDB file. Prism.Unity.Windows.PrismUnityApplication 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Collections.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Microsoft.Practices.Unity.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.Runtime.WindowsRuntime.UI.Xaml.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Get.the.solution.ui.dll'. Symbols loaded. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\System.ObjectModel.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Microsoft.Xaml.Interactivity.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Microsoft.Xaml.Interactions.dll'. Cannot find or open the PDB file. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Tetromino.ui.dll'. Symbols loaded. 'Tetromino.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Tetromino\UWP\Tetromino\bin\x86\Debug\AppX\Microsoft.Toolkit.Uwp.UI.Controls.dll'. Cannot find or open the PDB file. Windows.Foundation.IReference
11<Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.Primitives.PlacementMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontEastAsianLanguage> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontFraction> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontNumeralStyle> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ScrollBarVisibility> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ScrollBarVisibility> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ZoomMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Automation.Peers.AccessibilityView> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontCapitals> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontEastAsianWidths> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontNumeralAlignment> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontVariants> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ScrollMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ScrollMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.VirtualizationMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.Primitives.PlacementMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontEastAsianLanguage> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontFraction> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.FontNumeralStyle> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ScrollBarVisibility> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ScrollBarVisibility> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
11<Windows.UI.Xaml.Controls.ZoomMode> Exception thrown: 'System.TypeLoadException' in Tetromino.exe Windows.Foundation.IReference
1
When removing the UWPCommunityToolkit.Service extension I can run my app.
My current project.json
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
"Microsoft.Toolkit.Uwp": "1.1.0",
"Microsoft.Toolkit.Uwp.Services": "1.1.0",
"Microsoft.Toolkit.Uwp.UI.Animations": "1.1.0",
"Microsoft.Toolkit.Uwp.UI.Controls": "1.1.0",
"Prism.Unity": "6.2.0",
"Prism.Windows": "6.0.2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
Any ideas how I can get further details about the TypeLoadException issue?
Don't know what i can suggest next. Fancy sharing your repo so i can take a look?
@mfe- when you get the exception, is it taking you into the unhandled exception bit of code? If so, you should be able to expand out the exception info and it should tell you what type it is (i think).
@ScottIsAFool The UnhandledException of app.g.i.cs will not be hit :(
No even in the repo the exception was not getting caught in UnhandledException.. I think it was Win32 Exception
@mfe- if your problem still exists, try using the pre-release packages (referencing UWP 5.2.2) of Prism.Unity and Prism.Windows to rule out that as well. Pushed them 17d ago to https://www.myget.org/F/prismprerelease/api/v3/index.json
"Prism.Unity": "6.2.1-pre01",
"Prism.Windows": "6.1.0-pre01"
Thanks for your suggestion @bartlannoeye. I upgraded to the prelease version but something seems to be wrong.
I'll get (see also here)
Error CS0012 The type 'BindableBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Prism, Version=6.2.0.0, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59'.
Mm Prism.Windows has a dependency on Prism.Core 6.2.0, so it should find that assembly. Try adding Prism.Core explicitly and I'll have a look into it asap. Might be because we dropped signing for UWP and kept it for the other platforms. I've tested the prerelease packages before, just not sure if I did add the Prism.Core explicitly.
@hermitdave Unfortunately, I’m currently unable to publish the source code on github due to security and privacy reasons. Can I somehow send you an unversioned code state (twitter DM, email, ...)?
@mfe- you can upload the repo to OneDrive or something and share the link here so we can investigate.
I guess you can even drag'n'drop some zipped code here
Since the beginning of the issue, I was continuing my work on the project without the Microsoft.Toolkit.Uwp.Services Reference. Yesterday I added the Microsoft.Toolkit.Uwp.Services Reference and wow - no LoadException occurred. To determine the reason why the Exception was thrown I checked out some older commits. I removed and added XAML/C# Code to reproduce the issue. Sometimes I was able to reproduce the issue and sometimes not. Since the newest version of my app is working together with the Microsoft.Toolkit.Uwp.Services I don't want to invest more time on this issue. I'm sorry for the trouble guys, and thanks so much for your help! If the error occurs, I'll reopen this issue.
Sounds like a good plan:)
Greetings,
when creating a blank uwp app with the dependencies Prism, Unitry it will throw at starting or closing the app a 'System.IO.FileLoadException' in mscorlib.ni.dll or a System.TypeLoadException.
Steps to reproduce:
{ "dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0", "Microsoft.Toolkit.Uwp.Services": "1.1.0", "Prism.Unity": "6.2.0", "Prism.Windows": "6.0.2" }, "frameworks": { "uap10.0": {} }, "runtimes": { "win10-arm": {}, "win10-arm-aot": {}, "win10-x86": {}, "win10-x86-aot": {}, "win10-x64": {}, "win10-x64-aot": {} } }
sealed partial class App : PrismUnityApplication { protected override UIElement CreateShell(Frame rootFrame) { return new MainPage(); } protected override Task OnLaunchApplicationAsync(LaunchActivatedEventArgs args) { return Task.FromResult<object>(null); } }
Any ideas what causes this?