This started happening a week or so ago. I thought I'd stuffed something up, so I rebuilt a small project with just this one call to load a texture, and it's still happening. I'm starting to think this isn't my code and something in Visual Studio has broken. When i try to step into a function that is throwing the exception, the exception is thrown before any user code is executed in the function. I've put a break point on the first line in that fn and it's never reached.
public static async Task<Texture> LoadTextureAsync(string debugName, Folders folder, string filePath)
{
BitmapSource bitmapSource = await LoadBitmapSourceAsync(folder, filePath);
When i try to step into the LoadBitmapSourceAsync method, having put a breakpoint inside that method on the first line of code I get the following output ..
Step into: Stepping over non-user code 'Engine.Core.FileIo.LoadBitmapSourceAsync'
Step into: Stepping over non-user code 'Engine.Core.FileIo.<LoadBitmapSourceAsync>d__5..ctor'
Exception thrown: 'System.IO.FileLoadException' in System.Private.CoreLib.dll
And execution has returned out to
Texture texture = await FileIo.LoadTextureAsync("DebugTexture", Folders.Installation, "Assets\\DwarfPortrait.png");
Hi,
So, yeah i was just talking about the VS tool that generates icons. But I've just recreated the project (As in .. New Project & copied code files over) and haven't touched the assets yet, and I'm seeing these errors still. The app starts, and the Xaml appears to be running, but my DirectX setup code crashes out because of these exceptions. Strangely, when I try to to switch to fullscreen the new app crashes to the app.g.i.cs the Break() in this system code ..
It's strange that the new project will have the issue as well. Could you please tell me how you created the new app? Especially how you added the files from the old project?
Nothing special. But I've now gone even simpler (see below) and made a very simple app that just constructs my engine (including directx device resources) then calls my async loading code.
Sign in to comment