Download

Package Android development : assertion failed : (Index >= 0)

Hello, when I unload a level on android,
The app crashes and the logcat tells me that it is an assertion error about the file array.h due to a wrong index (-1) in an array size 14. I have no array that is greater than 8 and I tested unloading the same level all the stuff/assets : still crashing and same error. So I guess, I did nothing wrong in my code.
Here is the log :

[2020.08.07-06.18.18:374][552]LogLevel: ActivateLevel /Game/Game/maps/accueil 0 0 1
08-07 08:18:18.390 411 554 D UE4 : [2020.08.07-06.18.18:390][553]LogLevelStreaming: Display: FStreamLevelAction::UpdateOperation() LevelName accueil, bIsLevelValid 1
08-07 08:18:18.391 411 554 D UE4 : [2020.08.07-06.18.18:391][553]LogUObjectBase: Error: Virtual functions table is invalid.
08-07 08:18:18.391 411 554 D UE4 : [2020.08.07-06.18.18:391][553]LogOutputDevice: Warning:
08-07 08:18:18.391 411 554 D UE4 :
08-07 08:18:18.391 411 554 D UE4 : Script Stack (0 frames):
08-07 08:18:18.391 411 554 D UE4 :
08-07 08:18:18.432 411 554 D UE4 : Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Core/Public\Containers/Array.h] [Line: 674]
08-07 08:18:18.432 411 554 D UE4 : Array index out of bounds: -1 from an array of size 14
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Core/Public\Containers/Array.h] [Line: 674]
08-07 08:18:18.432 411 554 D UE4 : Array index out of bounds: -1 from an array of size 14
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: === Critical error: ===
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error:
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Core/Public\Containers/Array.h] [Line: 674]
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: Array index out of bounds: -1 from an array of size 14
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: [Callstack] 0x00000000C23D6380 libUE4.so(0x0000000005204380)!TArray<unsigned int, TSizedDefaultAllocator<32> >::RangeCheck(int) const::‘lambda’()::operator()() const ]
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: [Callstack] 0x00000000C391C80C libUE4.so(0x000000000674A80C)!TDefaultReferenceCollector<FDisregardSetReferenceProcessor, false, false>::HandleObjectReference(UObject*&, UObject const*, FProperty const*) ]
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: [Callstack] 0x00000000C38425B4 libUE4.so(0x00000000066705B4)!UClass::AddReferencedObjects(UObject*, FReferenceCollector&) ]
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: [Callstack] 0x00000000C39197C4 libUE4.so(0x00000000067477C4)!TFastReferenceCollector<false, FDisregardSetReferenceProcessor, TDefaultReferenceCollector<FDisregardSetReferenceProcessor, false, false>, FGCArrayPool, true, false>::ProcessObjectArray(FGCArrayStruct&, TRefCountPtr<FGraphEvent> const&) ]
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: [Callstack] 0x00000000C3916C98 libUE4.so(0x0000000006744C98)Unknown ]
08-07 08:18:18.432 411 554 D UE4 : [2020.08.07-06.18.18:432][553]LogAndroid: Error: [Callstack] 0x00000000C24616AC libUE4.so(0x000000000528F6AC)!ParallelForImpl::TParallelForData<TFunctionRef<void (int)> >::Process(int, TSharedRef<ParallelForImpl::TParallelForData<TFunctionRef<void (int)> >, (ESPMode)1>&, bool) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C24608F4 libUE4.so(0x000000000528E8F4)!void ParallelForImpl::ParallelForInternal<TFunctionRef<void (int)> >(int, TFunctionRef<void (int)>, EParallelForFlags) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C38C5E64 libUE4.so(0x00000000066F3E64)!VerifyGCAssumptions() ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C38C4DFC libUE4.so(0x00000000066F2DFC)!CollectGarbageInternal(EObjectFlags, bool) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C38C766C libUE4.so(0x00000000066F566C)!TryCollectGarbage(EObjectFlags, bool) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C73308E0 libUE4.so(0x000000000A15E8E0)!UEngine::ConditionalCollectGarbage() ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C6B08F78 libUE4.so(0x0000000009936F78)!UWorld::Tick(ELevelTick, float) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C690F714 libUE4.so(0x000000000973D714)!UGameEngine::Tick(float, bool) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C23AEF6C libUE4.so(0x00000000051DCF6C)!FEngineLoop::Tick() ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C23A7068 libUE4.so(0x00000000051D5068)!AndroidMain(android_app*) ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C23B67CC libUE4.so(0x00000000051E47CC)!android_main() ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000C23E58D8 libUE4.so(0x00000000052138D8)Unknown ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000EB8B3AC8 libc.so(0x0000000000065AC8)Unknown ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error: [Callstack] 0x00000000EB86C9AE libc.so(0x000000000001E9AE)Unknown ]
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error:
08-07 08:18:18.433 411 554 D UE4 : [2020.08.07-06.18.18:433][553]LogAndroid: Error:
08-07 08:18:18.441 411 554 D UE4 : [2020.08.07-06.18.18:441][553]LogAndroid: FAndroidMisc::RequestExit(1)

(Thanks for helping)

I have the same crash error on armv7 with assertion failed. It’s up to one month now and I still didn’t find a solution :slight_smile:
Waiting for 4.26 and maybe will be fixed