UWP - ошибка create_task при работе под Debug x64 вместо x86 - PullRequest
0 голосов
/ 24 апреля 2019

У меня есть следующие коды асинхронного программирования, которые извлекают файл из UWP пакета приложения:

Uri ^source = ref new Uri("ms-appx:///head.html");
auto getFileTask = create_task(StorageFile::GetFileFromApplicationUriAsync(source));

Когда я запускаю код в Visual Studio 2017 в режиме Debug x86, он работает нормально,Однако запуск его в Debug x64 вызывает сбой приложения со следующей ошибкой:

HRESULT:0x80070002 The system cannot find the file specified.
WinRT information: The system cannot find the file specified.

и Visual Studio разрывается в файле ppltasks.h с этим кодом:

__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();
    }
 }

Любая помощь?

...