PredicateKit icon indicating copy to clipboard operation
PredicateKit copied to clipboard

Lib crashes randomly with signal SIGABRT

Open srenrd opened this issue 2 years ago • 4 comments

The lib crashes randomly on Line 335: return try context.fetch(request) in public func result() throws -> [Entity]

It seemed like it started after upgrading to xCode 15.

PS. I'm using it for SwiftUI.

srenrd avatar Oct 25 '23 17:10 srenrd

Hey @srenrd! Thank you for reporting this. Please could you provide a small sample project reproducing the issue? Thank you.

ftchirou avatar Oct 30 '23 05:10 ftchirou

Hi, I've tried to recreate this bug in a new project, but without success. It is far to random. During a day of development i get this crash 0-2 times. However it does seem like large data sets and SwiftUI navigationLink plays a part in the crash.

I'll keep investigating and report back with further details.

srenrd avatar Nov 03 '23 08:11 srenrd

Hi again. I've managed to catch a bit of info on this. As described before, it seems totally random when this happens. But it is always the same line of code that crashes.

It happens when the .result() is called.

App(14673,0x305b87000) malloc: Non-aligned pointer 0x6000006f6b20 being freed (2) App(14673,0x305b87000) malloc: *** set a breakpoint in malloc_error_break to debug

Screenshot 2024-06-07 at 10 24 30

srenrd avatar Jun 07 '24 08:06 srenrd

I wonder if this is concurrency related. Do you get any errors/warnings when you pass the CoreData concurrency debug arguments on launch to your app?

-com.apple.CoreData.ConcurrencyDebug 1

ftchirou avatar Jun 11 '24 21:06 ftchirou