Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crashing with SIGABRT in `once.h` on definition of `dispatch_once`

Tags:

xcode

ios

cocoa

I'm suddenly getting a SIGABRT in dispatch_once as shown in Xcode below.

No changes have been recently added that use dispatch_once.

dispatch_once(predicate, block); Thread 1: signal SIGABRT

SIGABRT in dispatch_once

#if DISPATCH_ONCE_INLINE_FASTPATH
DISPATCH_INLINE DISPATCH_ALWAYS_INLINE DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
void
_dispatch_once(dispatch_once_t *predicate,
        DISPATCH_NOESCAPE dispatch_block_t block)
{
    if (DISPATCH_EXPECT(*predicate, ~0l) != ~0l) {
        dispatch_once(predicate, block);
    } else {
        dispatch_compiler_barrier();
    }
    DISPATCH_COMPILER_CAN_ASSUME(*predicate == ~0l);
}
#undef dispatch_once
#define dispatch_once _dispatch_once
#endif
#endif // DISPATCH_ONCE_INLINE_FASTPATH
like image 740
pkamb Avatar asked Oct 18 '22 10:10

pkamb


1 Answers

In my case it was caused, but no confirmed by logs or exception traces, by the use of KeychainItemWrapper, as recommended here. I dropped that old class and replaced it with the modern solution SAMKeychain.

like image 158
buguibu Avatar answered Oct 21 '22 00:10

buguibu