1

My users of the application have an exception when UWP app call this: Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView()

Exception: 'STOWED_EXCEPTION_System.UnauthorizedAccessException'.

I am call ResourceContext.GetForCurrentView for receive "LayoutDirection".

I did not find information about this problem in MSDN and other sources.

Please, tell me, how i can get "LayoutDirection" other way or eliminate exception?

Thanks.

EDIT

$44_System::Runtime::InteropServices::WindowsRuntime::IMapViewSharedReferenceTypesStubClass.Lookup_System.__Canon,_System.__Canon_
$44_System::Runtime::InteropServices::WindowsRuntime::IMapSharedReferenceTypesRCWAdapter.Lookup_System.__Canon,_System.__Canon_$catch$0
$44_System::Runtime::InteropServices::WindowsRuntime::IMapSharedReferenceTypesRCWAdapter.TryGetValue_System.__Canon,_System.__Canon_
$44_Windows::Web::Http::Headers::HttpRequestHeaderCollection.global::System.Collections.Generic.IDictionary_System.String,System.String_.TryGetValue
App::_Activated_d__6.MoveNext
  • 1
    The ResourceContext class is described [here on Microsoft Docs](https://learn.microsoft.com/en-us/uwp/api/windows.applicationmodel.resources.core.resourcecontext), and the information for the GetForCurrentView() method simply states *"This method fails if it is called in a windowless thread."* When the exception occurs, are you able to get a stacktrace? – Knowledge Cube Jun 07 '17 at 16:25
  • @Christopher i added a stack. "This method fails if it is called in a windowless thread." yes, it is true, but this: "windowless thread" calls other exception (Resource Contexts may not be created on threads that do not have a CoreWindow.), in my case occurs **UnauthorizedAccessException**. – Vladimir Bolshakov Jun 08 '17 at 07:52
  • Can you reproduce the issue on your side? Did you mean not all the users have this issue? – Sunteen Wu Jun 09 '17 at 07:36
  • @Sunteen You are right, I can not reproduce this bug on my side and some users encounter this problem (not all). – Vladimir Bolshakov Jun 09 '17 at 07:57
  • @SunteenWu do you have ideas? – Vladimir Bolshakov Jun 15 '17 at 15:22
  • @VladimirBolshakov, could you please help provide the environments of these users who met this issue? Did you have logs from dev center? – Sunteen Wu Jun 16 '17 at 01:34
  • @SunteenWu, i have five Watson Crash Dump files with the AppCompat, WERInternalMetadata, and WERDataCollectionFailure files. All dumps are versions of the Redstone 1 X64 architecture (14393, 15063). What kind of information do you want? – Vladimir Bolshakov Jun 16 '17 at 08:35
  • @VladimirBolshakov, 14393 or 15063? Which one? Or both? RS1 should be 14393. – Sunteen Wu Jun 19 '17 at 01:27
  • @SunteenWu, both Redstone are relevant (1 and 2). – Vladimir Bolshakov Jun 19 '17 at 07:38
  • Have you tried install your released app package on one RS machine if it can reproduce this issue? If you still cannot reproduce the issue, and your dev center can get the dump, you may try to open a support case [here](https://developer.microsoft.com/en-us/windows/support). – Sunteen Wu Jun 19 '17 at 08:39
  • @SunteenWu, all these cases I did. I can not reproduce this problem (the released application package on one RS computer). The analysis of the crash dump issue the stack from the description. I tried everything before writing here. – Vladimir Bolshakov Jun 21 '17 at 10:19

0 Answers0