Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb19e4f68 in tid 14613 (RHIThread)

Hi. Can you provide backtrace from logcat?

A week ago I got similar error. I use UE4.27 from github

07-28 13:59:02.496 30045 30239 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x97e72f64 in tid 30239 (RHIThread), pid 30045

07-28 13:59:02.675 30388 30388 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-28 13:59:02.675 30388 30388 F DEBUG   : Build fingerprint: 
07-28 13:59:02.675 30388 30388 F DEBUG   : Revision: '0'
07-28 13:59:02.675 30388 30388 F DEBUG   : ABI: 'arm'
07-28 13:59:02.675 30388 30388 F DEBUG   : Timestamp: 2022-07-28 13:59:02+0300
07-28 13:59:02.675 30388 30388 F DEBUG   : pid: 30045, tid: 30239, name: RHIThread  >>> com..<<<
07-28 13:59:02.675 30388 30388 F DEBUG   : uid: 10570
07-28 13:59:02.675 30388 30388 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x97e72f64
07-28 13:59:02.675 30388 30388 F DEBUG   :     r0  97e72f00  r1  000010c7  r2  b41bfda0  r3  00000000
07-28 13:59:02.675 30388 30388 F DEBUG   :     r4  d1e3952c  r5  b41bfdac  r6  b41bfda4  r7  00000000
07-28 13:59:02.675 30388 30388 F DEBUG   :     r8  00000001  r9  00000000  r10 b2a309d4  r11 b41bfdd0
07-28 13:59:02.675 30388 30388 F DEBUG   :     ip  b2914534  sp  b41bfd90  lr  ac442d38  pc  b1cef29c


00 pc 0afdd29c  libUE4.so (FOpenGLDynamicRHI::OnVertexBufferDeletion(unsigned int)+752) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
01 pc 0b0bea68  libUE4.so (UE4Function_Private::TFunctionRefCaller<TOpenGLBuffer<FOpenGLBaseVertexBuffer, 34962u, &(CachedBindArrayBuffer(unsigned int))>::~TOpenGLBuffer()::'lambda'(), void ()>::Call(void*)+36) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
02 pc 0b022480  libUE4.so (FRHICommand<FRHICommandGLCommand, FRHICommandGLCommandString>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&)+204) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
03 pc 06c9a330  libUE4.so (FRHICommandListExecutor::ExecuteInner_DoExecute(FRHICommandListBase&)+2348) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
04 pc 06cfb680  libUE4.so (FExecuteRHIThreadTask::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&)+888) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
05 pc 06cfad18  libUE4.so (TGraphTask<FExecuteRHIThreadTask>::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type)+852) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
06 pc 0553647c  libUE4.so (FNamedTaskThread::ProcessTasksNamedThread(int, bool)+2352) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
07 pc 055347f4  libUE4.so (FNamedTaskThread::ProcessTasksUntilQuit(int)+188) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
08 pc 06d84588  libUE4.so (FRHIThread::Run()+152) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
09 pc 05659e20  libUE4.so (FRunnableThreadPThread::Run()+164) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)
10 pc 0552dc68  libUE4.so (FRunnableThreadPThread::_ThreadProc(void*)+84) (BuildId: 5a922ebdc24cf8cd161ceb420d6665f71ae95c62)

I found FOpenGLDynamicRHI::OnVertexBufferDeletion in the engine source code. It located in ...\UnrealEngine\Engine\Source\Runtime\OpenGLDrv\Private\OpenGLCommands.cpp
Then I used UE_LOG to find crash point. In the code below, I point to the crash point.
Also, I print the value CachedStream.VertexBuffer->Resource. Most of the time it has values like -572662307 and it strongly seems like trash. But it works some time (± 1 min) and then crashes randomly.

if ((ActiveStreamMask & 0x1) && 
			CachedStream.VertexBuffer && 
			CachedStream.VertexBuffer->Resource == VertexBufferResource) <==== CHASH HERE!!!
		{
			FOpenGL::BindVertexBuffer(StreamIndex, 0, 0, 0); // brianh@nvidia: work around driver bug 1809000
				
			CachedStream.VertexBuffer = nullptr;
			CachedStream.Offset = 0;
			CachedStream.Stride = 0;
		}

It seems like CachedStream.VertexBuffer starts to point to address out of app memory volume. And android shoots down app

If a have right understood. Please correct me.
I’ve not found a fix yet. This is a big problem for me(( If someone have updates, please share it.
If ill get updates or find fix, ill write here
Sorry for my lousy en…

1 Like