WinRT information: The specified path is too short. It must have at least 1 character

Hi,
I’ve just ported my game for the Windows Store. I built it successfully with Visual Studio 2013 but when it starts it throws exception with this message:

" First-chance exception at 0x75151D4D in Template.exe: Microsoft C++ exception: Platform::InvalidArgumentException ^ at memory location 0x1280F570. HRESULT:0x80070057 The parameter is incorrect.

WinRT information: The specified path is too short. It must have at least 1 character.

If there is a handler for this exception, the program may be safely continued. "

When I click Continue the game starts and I’m able to play it but some of the game functions are broken.

Can anyone tell me how to fix this problem ?

Thank You !

Hi, check the call stack - what leads up to the call to failing method?

Sorry for the delay !

This is the whole Call Stack:

KernelBase.dll!_RaiseException@16() Unknown

msvcr120d_app.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 154 C++
UnityPlayer.dll!Concurrency::details::_ExceptionHolder::_RethrowUserException() Line 931 C++
UnityPlayer.dll!Concurrency::details::_Task_impl_base::_Wait() Line 1779 C++
UnityPlayer.dll!Concurrency::task<Windows::Storage::Streams::IInputStream ^>::get() Line 3490 C++
UnityPlayer.dll!WWWMetro::StartLocalStorageTask::__l8::(Concurrency::task<Windows::Storage::Streams::IInputStream ^> inputStream) Line 630 C++
UnityPlayer.dll!std::_Callable_obj<void (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),0>::_ApplyX<void,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >(Concurrency::task<Windows::Storage::Streams::IInputStream ^> && <_Args_0>) Line 284 C++
UnityPlayer.dll!std::_Func_impl<std::_Callable_obj<void (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),0>,std::allocator<std::_Func_class<void,Concurrency::task<Windows::Storage::Streams::IInputStream ^> > >,void,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >::_Do_call(Concurrency::task<Windows::Storage::Streams::IInputStream ^> && <_Args_0>) Line 229 C++
UnityPlayer.dll!std::_Func_class<void,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >::hushed:perator()(Concurrency::task<Windows::Storage::Streams::IInputStream ^> <_Args_0>) Line 315 C++
UnityPlayer.dll!Concurrency::details::_MakeTToUnitFunc::__l3::(Concurrency::task<Windows::Storage::Streams::IInputStream ^> t) Line 2596 C++
UnityPlayer.dll!std::_Callable_obj<unsigned char (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),0>::_ApplyX<unsigned char,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >(Concurrency::task<Windows::Storage::Streams::IInputStream ^> && <_Args_0>) Line 283 C++
UnityPlayer.dll!std::_Func_impl<std::_Callable_obj<unsigned char (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),0>,std::allocator<std::_Func_class<unsigned char,Concurrency::task<Windows::Storage::Streams::IInputStream ^> > >,unsigned char,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >::_Do_call(Concurrency::task<Windows::Storage::Streams::IInputStream ^> && <_Args_0>) Line 229 C++
UnityPlayer.dll!std::_Func_class<unsigned char,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >::hushed:perator()(Concurrency::task<Windows::Storage::Streams::IInputStream ^> <_Args_0>) Line 315 C++
UnityPlayer.dll!Concurrency::task<Windows::Storage::Streams::IInputStream ^>::_ContinuationTaskHandle<Windows::Storage::Streams::IInputStream ^,void,void (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>::_LogWorkItemAndInvokeUserLambda<std::function<unsigned char __cdecl(Concurrency::task<Windows::Storage::Streams::IInputStream ^>)>,Concurrency::task<Windows::Storage::Streams::IInputStream ^> >(std::function<unsigned char __cdecl(Concurrency::task<Windows::Storage::Streams::IInputStream ^>)> && _func, Concurrency::task<Windows::Storage::Streams::IInputStream ^> && _value) Line 3775 C++
UnityPlayer.dll!Concurrency::task<Windows::Storage::Streams::IInputStream ^>::_ContinuationTaskHandle<Windows::Storage::Streams::IInputStream ^,void,void (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>::_Continue(std::integral_constant<bool,1> __formal, Concurrency::details::_TypeSelectorNoAsync __formal) Line 3891 C++
UnityPlayer.dll!Concurrency::task<Windows::Storage::Streams::IInputStream ^>::_ContinuationTaskHandle<Windows::Storage::Streams::IInputStream ^,void,void (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>::_Perform() Line 3781 C++
UnityPlayer.dll!Concurrency::details::_PPLTaskHandle<unsigned char,Concurrency::task<Windows::Storage::Streams::IInputStream ^>::_ContinuationTaskHandle<Windows::Storage::Streams::IInputStream ^,void,void (Concurrency::task<Windows::Storage::Streams::IInputStream ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>,Concurrency::details::_ContinuationTaskHandleBase>::invoke() Line 1606 C++
UnityPlayer.dll!Concurrency::details::_TaskProcHandle::hushed:perator()() Line 110 C++
UnityPlayer.dll!Concurrency::details::_UnrealizedChore::_InvokeBridgeConcurrency::details::_TaskProcHandle(void * _PContext) Line 4379 C++
msvcr120d_app.dll!Concurrency::details::_UnrealizedChore::_UnstructuredChoreWrapper(Concurrency::details::_UnrealizedChore * pChore) Line 293 C++
msvcr120d_app.dll!Concurrency::details::_UnrealizedChore::_Invoke() Line 4333 C++
msvcr120d_app.dll!Concurrency::details::WorkItem::Invoke() Line 172 C++
msvcr120d_app.dll!Concurrency::details::InternalContextBase::ExecuteChoreInline(Concurrency::details::WorkItem * pWork) Line 1605 C++
msvcr120d_app.dll!Concurrency::details::InternalContextBase::smile:ispatch(Concurrency::smile:ispatchState * pDispatchState) Line 1719 C++
msvcr120d_app.dll!Concurrency::details::FreeThreadProxy::smile:ispatch() Line 197 C++
msvcr120d_app.dll!Concurrency::details::ThreadProxy::ThreadProxyMain(void * lpParameter) Line 172 C++
msvcr120d_app.dll!WorkItemPriorityCallback::Invoke(ABI::Windows::Foundation::IAsyncAction * __formal) Line 57 C++
threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback(void) Unknown
threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::TimeSlicedCallback(void *) Unknown
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!__RtlUserThreadStart() Unknown
ntdll.dll!__RtlUserThreadStart@8() Unknown
[Async Call]
UnityPlayer.dll!WWWMetro::StartLocalStorageTask(const std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > & givenURI) Line 636 C++
UnityPlayer.dll!WWWMetro::WWWMetro(const char * in_url, const char * postDataPtr, int postDataLength, const std::map<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> >,std::basic_string<char,std::char_traits,stl_allocator<char,55,4> >,std::less<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > const ,std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > > > > & headers, bool cached, int cacheVersion, unsigned int crc) Line 382 C++
UnityPlayer.dll!CreatePlatformWWWBackend(const char * url, const char * postDataPtr, int postDataLength, const std::map<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> >,std::basic_string<char,std::char_traits,stl_allocator<char,55,4> >,std::less<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > const ,std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > > > > & headers, bool cached, int cacheVersion, unsigned int crc) Line 741 C++
UnityPlayer.dll!WWW::Create(const char * url, const char * postDataPtr, int postDataLength, const std::map<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> >,std::basic_string<char,std::char_traits,stl_allocator<char,55,4> >,std::less<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > const ,std::basic_string<char,std::char_traits,stl_allocator<char,55,4> > > > > & headers, bool crossDomainChecked, bool cached, int cacheVersion, unsigned int crc) Line 721 C++
UnityPlayer.dll!WWW_CUSTOM_InitWWW(int64 self, wchar_t * url, _int64 postData, _int64 iHeaders) Line 97 C++
UnityEngineDelegates.dll!WWW_CUSTOM_InitWWW(__int64 param_0, int param_1, __int64 param_2, __int64 param_3) Line 4173 C++

Could the problem be related to WWW’s used in my code ?

Yes, it looks like you’re passing invalid path to WWW class, can you show that path?

1 Like

I had “” path in one of my WWW variables. I fixed it and now everything is fine. Thank you for the support !