I have the following asynchronous programming codes that are retrieving a file in a UWP
app bundle:
Uri ^source = ref new Uri("ms-appx:///head.html");
auto getFileTask = create_task(StorageFile::GetFileFromApplicationUriAsync(source));
When I run the code in Visual Studio 2017
in Debug x86
mode, it works fine. However, running it in Debug x64
causes the app to crash with the following error:
HRESULT:0x80070002 The system cannot find the file specified.
WinRT information: The system cannot find the file specified.
and Visual Studio breaks in the file ppltasks.h
at this code:
__declspec(noinline)
~_ExceptionHolder()
{
if (_M_exceptionObserved == 0)
{
// If you are trapped here, it means an exception thrown in task chain didn't get handled.
// Please add task-based continuation to handle all exceptions coming from tasks.
// this->_M_stackTrace keeps the creation callstack of the task generates this exception.
_REPORT_PPLTASK_UNOBSERVED_EXCEPTION();
}
}
Any help?
User contributions licensed under CC BY-SA 3.0