Skip to content
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

Clean recent ISOs on a thread #15678

Merged
merged 3 commits into from
Jul 15, 2022

Conversation

unknownbrackets
Copy link
Collaborator

This uses a thread to check if the ISOs exist and resolve paths.

I initially started to do remove and add also, but then got worried there'd be some UI update race condition. Should be fine with just CleanRecent.

I'd consider this fixes #15137.

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.13.0 milestone Jul 12, 2022
@hrydgard
Copy link
Owner

Looking into the error before the last commit, I tried running with sanitizer, but didn't make a difference so it's probably not that type of corruption, but you never know. Here's the callstack when running the next-to-last commit:

libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
Process 48175 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001ac43ed98 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1ac43ed98 <+8>:  b.lo   0x1ac43edb8               ; <+40>
    0x1ac43ed9c <+12>: pacibsp 
    0x1ac43eda0 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1ac43eda4 <+20>: mov    x29, sp
Target 0: (PPSSPPHeadless) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00000001ac43ed98 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001ac473ee0 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x00000001ac3ae340 libsystem_c.dylib`abort + 168
    frame #3: 0x00000001ac42eb08 libc++abi.dylib`abort_message + 132
    frame #4: 0x00000001ac41e938 libc++abi.dylib`demangling_terminate_handler() + 312
    frame #5: 0x00000001ac314330 libobjc.A.dylib`_objc_terminate() + 160
    frame #6: 0x00000001ac42dea4 libc++abi.dylib`std::__terminate(void (*)()) + 20
    frame #7: 0x00000001ac42de40 libc++abi.dylib`std::terminate() + 64
    frame #8: 0x000000010000eee4 PPSSPPHeadless`__clang_call_terminate + 12
    frame #9: 0x0000000100164e64 PPSSPPHeadless`Config::~Config(this=0x00000001035922a0) at Config.cpp:1235:1
    frame #10: 0x000000010015f150 PPSSPPHeadless`Config::~Config(this=0x00000001035922a0) at Config.cpp:1230:19
    frame #11: 0x00000001ac35fdd0 libsystem_c.dylib`__cxa_finalize_ranges + 464
    frame #12: 0x00000001ac35fb74 libsystem_c.dylib`exit + 44
    frame #13: 0x00000001ac480ec4 libdyld.dylib`dyld4::LibSystemHelpers::exit(int) const + 20
    frame #14: 0x00000001068c10d8 dyld`start + 596
(lldb) 

@hrydgard hrydgard added the User Interface PPSSPP's own user interface / UX label Jul 13, 2022
@unknownbrackets
Copy link
Collaborator Author

Well, it means the ResetRecentIsosThread() function failed in the lock_guard, but that mutex should be just fine which is why I feel like something must've touched its bytes...

I don't think the problem is in these commits...

-[Unknown]

@hrydgard hrydgard merged commit 67b1a42 into hrydgard:master Jul 15, 2022
@unknownbrackets unknownbrackets deleted the clean-recent-thread branch July 15, 2022 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User Interface PPSSPP's own user interface / UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PPSSPP profiling notes
2 participants