Description

Regression: Tested in UE5/Release-5.0 at CL 20979098 and the issue occurs.

Issue would load in to the project without asking for permission and cause an ensure to occur, in 5.0.3 the issue would cause the device to hang on a black screen instead of loading the project.

Error Message: 

Ensure condition failed: oldValue == newValue  [File:D:/build/++UE5/Sync/Engine/Source/Runtime/Core/Private/HAL/ThreadingBase.cpp] [Line: 189] 
oldValue(0) newValue(1) If this check fails make sure that there is a FTaskTagScope(ETaskTag::EGameThread) as deep as possible on the current callstack, you can see the current value in ActiveNamedThreads(1) 
Steps to Reproduce
  1. Create a BP or C++ Template project
  2. Open the level blueprint
    1. Add a BeginPlay node
    2. Add a Request Android Permissions node and connect it to the BeginPlay node
    3. Add a Make Array node and attach it to Permissions in the Request Android Permissions node
    4. Click and drag off of the Request Android Permissions node and create a Bind Event node
    5. Connect the return value from the Request Android Permissions node is connected to the target for the Bind Event node
    6. Click and drag off of the event on the Bind Event node and create a new Custom Event
    7. Click and drag off of the Permissions in the new Custom Event and create a For Each Loop node
    8. Click and drag off of Grant Results in the new Custom Event and create a Get (a ref) node
    9. Connect the Array Index of the For Each Loop to the Get node
    10. Click and drag from the output of the Get node and create a Branch node
    11. Connect the Loop Body of the For Each loop to the Branch node
    12. Create a Print String node and connect it to the True output of the Branch node
  3. Compile the level blueprint
  4. Package the project for Android
  5. Install the project on an Android device
  6. Run the project

Actual Result: Project loads in but an ensure occurs and no popup asking for permission occurs.

Expected Result: Permissions can be accepted and the project runs as expected.

Callstack
!IsInGameThread()  []
!UObject::ProcessEvent(UFunction*, void*)  []
!AActor::ProcessEvent(UFunction*, void*)  []
!void TScriptDelegate<FWeakObjectPtr>::ProcessDelegate<UObject>(void*) const  []
!void TMulticastScriptDelegate<FWeakObjectPtr>::ProcessMulticastDelegate<UObject>(void*) const  []
!FAndroidPermissionDynamicDelegate::Broadcast(TArray<FString, TSizedDefaultAllocator<32> > const&, TArray<bool, TSizedDefaultAllocator<32> > const&) const  []
!Java_com_google_vr_sdk_samples_permission_PermissionHelper_onAcquirePermissions()  []
![Unknown]()  []
![Unknown]()  []
!art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)  []
!art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeStatic()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtualQuick()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeDirect()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtualRange()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeDirect()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtual()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtual()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtual()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtual()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtual()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeVirtual()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)  []
!bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)  []
!MterpInvokeStatic()  []
!ExecuteMterpImpl()  []
![Unknown]()  []
!artQuickToInterpreterBridge()  []
![Unknown]()  []
![Unknown]()  []
!art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)  []
![Unknown]()  []
!art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)  []
![Unknown]()  []
![Unknown]()  []
![Unknown]()  []  

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-170079 in the post.

4
Login to Vote

Fixed
ComponentUE - Platform - Mobile
Affects Versions5.0.35.1
Target Fix5.1.1
Fix Commit23231358
Main Commit23235438
Release Commit23234851
CreatedNov 14, 2022
ResolvedNov 22, 2022
UpdatedJan 9, 2023
View Jira Issue