Skip to content

Android: Reported crashes and ANRs #19522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hrydgard opened this issue Oct 11, 2024 · 9 comments
Closed

Android: Reported crashes and ANRs #19522

hrydgard opened this issue Oct 11, 2024 · 9 comments

Comments

@hrydgard
Copy link
Owner

hrydgard commented Oct 11, 2024

This will be another summary thread in which I'll paste various stack traces from the Play Console for later investigation, similar to previous pre-release threads, but this one will live longer.

First one:

ANR in ScreenManager::touch (mutex lock)

Looks touch related but is really just EmuThread blocked on org.ppsspp.ppsspp.PpssppActivity.contentUriGetFreeStorageSpace (PpssppActivity.java:448), so the mutex times out. We should avoid doing space checks on the main thread since they can be very expensive, it seems.

NOTE: A game that checks storage space (for testing) is ThrillVille.

@IrfanH495
Copy link

sorry for commenting here outside the issue
I really like the 1995 theme, but there are parts that I find difficult to see or read, especially for me.
Screenshot_2024-10-13-18-56-09-460
Screenshot_2024-10-13-18-56-39-785
I saw v1.18.0 is about to be released and I dared to comment, I don't know what the original looks like.

@hrydgard
Copy link
Owner Author

Hm yeah, that's not great. Might have to do something properly about the popup color scheme...

@hrydgard
Copy link
Owner Author

Running on an ancient Android device, I'm hitting:

I/DEBUG   (  190): Abort message: 'art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xf0'
I/DEBUG   (  190):     r0 00000000  r1 000012c7  r2 00000006  r3 00000000
I/DEBUG   (  190):     r4 a1634dd8  r5 00000006  r6 0000000b  r7 0000010c
I/DEBUG   (  190):     r8 00000000  r9 b7f92938  sl b81b7ca8  fp 00000001
I/DEBUG   (  190):     ip 000012c7  sp a16341d8  lr b6dc0989  pc b6de5e24  cpsr 60070010
I/DEBUG   (  190):     #11 pc 00d2e107  /data/app/org.ppsspp.ppssppgold-2/lib/arm/libppsspp_jni.so (_JNIEnv::NewStringUTF(char const*)+26)
I/DEBUG   (  190):     #12 pc 00db353b  /data/app/org.ppsspp.ppssppgold-2/lib/arm/libppsspp_jni.so (TextDrawerAndroid::DrawStringBitmap(std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> >&, TextStringEntry&, Draw::DataFormat, std::__ndk1::basic_string_view<char, std::__ndk1::char_traits<char> >, int, bool)+226)
I/DEBUG   (  190):     #13 pc 00daf641  /data/app/org.ppsspp.ppssppgold-2/lib/arm/libppsspp_jni.so (TextDrawer::DrawString(DrawBuffer&, std::__ndk1::basic_string_view<char, std::__ndk1::char_traits<char> >, float, float, unsigned int, int)+660)
I/DEBUG   (  190):     #14 pc 00dc5ac1  /data/app/org.ppsspp.ppssppgold-2/lib/arm/libppsspp_jni.so (UIContext::DrawText(std::__ndk1::basic_string_view<char, std::__ndk1::char_traits<char> >, float, float, unsigned int, int)+504)
I/DEBUG   (  190):     #15 pc 00e5fd3b  /data/app/org.ppsspp.ppssppgold-2/lib/arm/libppsspp_jni.so (LogoScreen::DrawForeground(UIContext&)+1334)

Hm... Maybe it's the emoji? Might have to clean them out of strings on really old devices :/

@hrydgard
Copy link
Owner Author

(ShaderManagerVulkan.cpp:GetShaders:339): [success] (ULUS10236 BURNOUT DOMINATOR, 2322.4s) FS gen error: Bad replace blend eq

DecodeVerts:

#00 pc 0x0000000000000d34
#1 pc 0x00000000006f701c libppsspp_jni.so (DrawEngineCommon::DecodeVerts(unsigned char*)+144) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)

SasInstance::~SasInstance(): Scudo ERROR: corrupted chunk header at address 0x

backtrace:
  #00  pc 0x0000000000e02a58  libppsspp_jni.so (UI::ViewGroup::Update()+68) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #01  pc 0x0000000000e02a5c  libppsspp_jni.so (UI::ViewGroup::Update()+72) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #02  pc 0x0000000000e02a5c  libppsspp_jni.so (UI::ViewGroup::Update()+72) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #03  pc 0x0000000000e02a5c  libppsspp_jni.so (UI::ViewGroup::Update()+72) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #04  pc 0x0000000000e02a5c  libppsspp_jni.so (UI::ViewGroup::Update()+72) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #05  pc 0x0000000000e09070  libppsspp_jni.so (UI::ScrollView::Update()+40) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #06  pc 0x0000000000e02a5c  libppsspp_jni.so (UI::ViewGroup::Update()+72) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #07  pc 0x0000000000df20b0  libppsspp_jni.so (UI::UpdateViewHierarchy(UI::ViewGroup*)+1276) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #08  pc 0x0000000000df544c  libppsspp_jni.so (UIScreen::update()+136) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #09  pc 0x00000000008d64d8  libppsspp_jni.so (GamePauseScreen::update()+28) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #10  pc 0x0000000000df3744  libppsspp_jni.so (ScreenManager::update()+92) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #11  pc 0x000000000089729c  libppsspp_jni.so (NativeFrame(GraphicsContext*)+352) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)
  #12  pc 0x0000000000891a14  libppsspp_jni.so (EmuThreadFunc()) (BuildId: 798816bc73236bf364cac9a9a27b059dac876e4b)

@hrydgard
Copy link
Owner Author

hrydgard commented Oct 29, 2024

some more log scanning:

  #00  pc 0x000000000097158c  libppsspp_jni.so (std::__ndk1::__function::__func<DisplayLayoutScreen::CreateViews()::$_6, std::__ndk1::allocator<DisplayLayoutScreen::CreateViews()::$_6>, UI::EventReturn (UI::EventParams&)>::operator()(UI::EventParams&)) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #01  pc 0x0000000000df993c  libppsspp_jni.so (UI::Event::Dispatch(UI::EventParams&)+52) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #02  pc 0x0000000000df0f90  libppsspp_jni.so (UI::DispatchEvents()+316) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #03  pc 0x0000000000df3494  libppsspp_jni.so (UI::UpdateViewHierarchy(UI::ViewGroup*)+1280) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #04  pc 0x0000000000df682c  libppsspp_jni.so (UIScreen::update()+136) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #05  pc 0x0000000000df4b24  libppsspp_jni.so (ScreenManager::update()+92) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #06  pc 0x0000000000896368  libppsspp_jni.so (NativeFrame(GraphicsContext*)+352) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #07  pc 0x000000000088f190  libppsspp_jni.so (VulkanEmuThread(ANativeWindow*)) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)

  #00  pc 0x0000000000503f54  arm/libppsspp_jni.so (TessellationDataTransferGLES::SendDataToShader(SimpleVertex const* const*, int, int, unsigned int, Spline::Weight2D const&)+183) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #01  pc 0x0000000000537aa7  arm/libppsspp_jni.so (void DrawEngineCommon::SubmitCurve<Spline::BezierSurface>(void const*, void const*, Spline::BezierSurface&, unsigned int, int*, char const*)+678) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #02  pc 0x00000000005816bf  arm/libppsspp_jni.so (GPUCommonHW::Execute_Bezier(unsigned int, unsigned int)+702) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #03  pc 0x00000000005808a5  arm/libppsspp_jni.so (GPUCommonHW::FastRunLoop(DisplayList&)+140) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #04  pc 0x000000000057bb9b  arm/libppsspp_jni.so (GPUCommon::InterpretList(DisplayList&)+470) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #05  pc 0x000000000057b449  arm/libppsspp_jni.so (GPUCommon::ProcessDLQueue()+196) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #06  pc 0x000000000057b6f1  arm/libppsspp_jni.so (GPUCommon::UpdateStall(int, unsigned int)+56) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #07  pc 0x0000000000409e65  arm/libppsspp_jni.so (void WrapI_UU<&sceGeListUpdateStallAddr(unsigned int, unsigned int)>()) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
00  pc 0x000000000060c45c  arm/libppsspp_jni.so (ConvertRGBA8888ToRGBA5551(unsigned short*, unsigned int const*, unsigned int)+61) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #01  pc 0x000000000062483b  arm/libppsspp_jni.so (Draw::ConvertFromRGBA8888(unsigned char*, unsigned char const*, unsigned int, unsigned int, unsigned int, unsigned int, Draw::DataFormat)+158) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #02  pc 0x00000000006320f7  arm/libppsspp_jni.so (GLQueueRunner::CopyFromReadbackBuffer(GLRFramebuffer*, int, int, Draw::DataFormat, Draw::DataFormat, int, unsigned char*)+122) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #03  pc 0x000000000062e2f7  arm/libppsspp_jni.so (GLRenderManager::CopyFramebufferToMemory(GLRFramebuffer*, int, int, int, int, int, Draw::DataFormat, unsigned char*, int, Draw::ReadbackMode, char const*)+394) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #04  pc 0x0000000000be255b  arm/libppsspp_jni.so (Draw::OpenGLContext::CopyFramebufferToMemory(Draw::Framebuffer*, int, int, int, int, int, Draw::DataFormat, void*, int, Draw::ReadbackMode, char const*)+98) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #05  pc 0x0000000000528639  arm/libppsspp_jni.so (FramebufferManagerCommon::ReadbackFramebuffer(VirtualFramebuffer*, int, int, int, int, RasterChannel, Draw::ReadbackMode)+588) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #06  pc 0x0000000000522601  arm/libppsspp_jni.so (FramebufferManagerCommon::ReadFramebufferToMemory(VirtualFramebuffer*, int, int, int, int, RasterChannel, Draw::ReadbackMode)+212) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #07  pc 0x0000000000521511  arm/libppsspp_jni.so (FramebufferManagerCommon::NotifyRenderFramebufferSwitched(VirtualFramebuffer*, VirtualFramebuffer*, bool)+504) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #08  pc 0x000000000052035f  arm/libppsspp_jni.so (FramebufferManagerCommon::DoSetRenderFrameBuffer(FramebufferHeuristicParams&, unsigned int)+1690) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #09  pc 0x0000000000580ba5  arm/libppsspp_jni.so (GPUCommonHW::Execute_Prim(unsigned int, unsigned int)+556) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #10  pc 0x00000000005808a5  arm/libppsspp_jni.so (GPUCommonHW::FastRunLoop(DisplayList&)+140) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #11  pc 0x000000000057bb9b  arm/libppsspp_jni.so (GPUCommon::InterpretList(DisplayList&)+470) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #12  pc 0x000000000057b449  arm/libppsspp_jni.so (GPUCommon::ProcessDLQueue()+196) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #13  pc 0x000000000057d9b1  arm/libppsspp_jni.so (GPUCommon::InterruptEnd(int)+364) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
  #14  pc 0x0000000000426cc1  arm/libppsspp_jni.so (__KernelReturnFromInterrupt()+76) (BuildId: 90be93969050f9f3aa387e297c874203dd15b134)
ANR, stuck here (seems to be __UPnPShutdown. We should probably only shut that down on app exit):

  #02  pc 0x0000000001002ca4  arm64/libppsspp_jni.so (std::__ndk1::thread::join()+28) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #03  pc 0x00000000005e5f68  arm64/libppsspp_jni.so (__NetShutdown()+92) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #04  pc 0x0000000000598530  arm64/libppsspp_jni.so (__KernelShutdown()+376) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #05  pc 0x000000000069410c  arm64/libppsspp_jni.so (CPU_Shutdown()+148) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)
  #06  pc 0x00000000006949f4  arm64/libppsspp_jni.so (PSP_Shutdown()+184) (BuildId: 9bf166f3475f206d280e63b935ff1b2700fe2c79)

@hrydgard
Copy link
Owner Author

The upnp thread is polling too much even if not enabled, should be cleaned up at some point.

@hrydgard
Copy link
Owner Author

hrydgard commented Nov 1, 2024

(Playback.cpp:RunMountedReplay:777): [!GPURecord::IsActivePending()] ( mali_missing_circle.ppdmp, 23.3s) Cannot run replay while recording.

Not sure how the user managed to get here on Android...

#02  pc 0x00000000000160fc  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80)
#03  pc 0x0000000000006f64  /system/lib64/liblog.so (__android_log_assert+308)
#04  pc 0x000000000087c0dc  arm64/libppsspp_jni.so (HandleAssert(char const*, char const*, int, char const*, char const*, ...)+340) (BuildId: b8aeecf4c0e9f6d4b7aca9971932b2275bfeda50)
#05  pc 0x000000000074ea10  arm64/libppsspp_jni.so (GPURecord::RunMountedReplay(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)+92) (BuildId: b8aeecf4c0e9f6d4b7aca9971932b2275bfeda50)
#06  pc 0x00000000005ba3f4  arm64/libppsspp_jni.so (__KernelGPUReplay()+344) (BuildId: b8aeecf4c0e9f6d4b7aca9971932b2275bfeda50)
#07  pc 0x0000000000555948  arm64/libppsspp_jni.so (CallSyscallWithoutFlags(HLEFunction const*)+52) (BuildId: b8aeecf4c0e9f6d4b7aca9971932b2275bfeda50)

@hrydgard hrydgard modified the milestones: v1.18.0, v1.18.1 Nov 3, 2024
@hrydgard
Copy link
Owner Author

hrydgard commented Nov 4, 2024

Savedata I/O thread seems to cause ANRs in combination with switching away from the app.

Java_org_ppsspp_ppsspp_NativeActivity_requestExitVulkanRenderLoop

SaveIO:

  #00  pc 0x000000000009ac0c  /apex/com.android.runtime/lib/bionic/libc.so (write+12)
  #01  pc 0x00000000003dde81  arm/libppsspp_jni.so (DirectoryFileHandle::Write(unsigned char const*, long long)+40) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #02  pc 0x00000000003df331  arm/libppsspp_jni.so (DirectoryFileSystem::WriteFile(unsigned int, unsigned char const*, long long)+36) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #03  pc 0x00000000003e5aa1  arm/libppsspp_jni.so (MetaFileSystem::WriteFile(unsigned int, unsigned char const*, long long)+144) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #04  pc 0x00000000003cd245  arm/libppsspp_jni.so ((anonymous namespace)::WritePSPFile(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, unsigned char const*, unsigned int)) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #05  pc 0x00000000003ce207  arm/libppsspp_jni.so (SavedataParam::Save(SceUtilitySavedataParam*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, bool)+3950) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #06  pc 0x00000000003cb419  arm/libppsspp_jni.so (PSPSaveDialog::ExecuteNotVisibleIOAction()+492) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)

emuthread:

  #02  pc 0x0000000000d6725d  arm/libppsspp_jni.so (std::__ndk1::thread::join()+12) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #03  pc 0x00000000003ca39f  arm/libppsspp_jni.so (PSPSaveDialog::Update(int)+382) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #04  pc 0x0000000000498f7d  arm/libppsspp_jni.so (void WrapI_I<&sceUtilitySavedataUpdate(int)>()) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)
  #05  pc 0x00000000003ee071  arm/libppsspp_jni.so (CallSyscallWithoutFlags(HLEFunction const*)+32) (BuildId: dff756d9318bf0c280091fd082b250c960d76659)

@hrydgard
Copy link
Owner Author

Will restart this in a new issue after releasing the first 1.19 builds to beta testing.

@hrydgard hrydgard closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants