EXC_BAD_ACCESS issue need advice

Could you help me with resolving this issue, please. I've got following trace:

ksmemory_notifyUnhandledFatalSignal
EXC_BAD_ACCESS (KERN_INVALID_ADDRESS)

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000002b

Crashed: com.apple.main-thread
0  KSCrash                        0xbff8 ksmemory_notifyUnhandledFatalSignal + 12
1  KSCrash                        0xcd6c handleSignal + 100
2  libsystem_platform.dylib       0x4178 _sigtramp + 56
3  libsystem_kernel.dylib         0x42f8 mach_msg2_internal + 76
4  libsystem_kernel.dylib         0x4214 mach_msg_overwrite + 428
5  libsystem_kernel.dylib         0x405c mach_msg + 24
6  CoreFoundation                 0x46868 __CFRunLoopServiceMachPort + 160
7  CoreFoundation                 0x1d848 __CFRunLoopRun + 1188
8  CoreFoundation                 0x1ca6c _CFRunLoopRunSpecificWithOptions + 532
9  GraphicsServices               0x1498 GSEventRunModal + 120
10 UIKitCore                      0x9ddf8 -[UIApplication _run] + 792
11 UIKitCore                      0x46e54 UIApplicationMain + 336
12 UIKitCore                      0x172938 -[UIScrollView contentInset] + 588
13 AppName                       0xed9440 main + 4386804800 (AppDelegate.swift:4386804800)
14 ???                            0x189f76e28 (Missing)

It appears that a variable or object is attempting to access another object that has already been deallocated. Based on the stack trace, the issue was likely detected while layout was in progress.

Our analytics show this happens generally on app launch and occasionally during normal use.

Unfortunately, I couldn't gather additional diagnostic data. I tried to reproduce the issue using the Leaks tool and enabled runtime diagnostics (Address Sanitizer, Malloc Scribble, Zombies), but without success.

I may be overlooking something — any suggestions would be greatly appreciated.

Thank you in advance

Thanks for the post, my guess here is your process is called KSCrash? The crash file should be posted as an attachment to be able to analyze.

Kindly submit a comprehensive crash report, adhering to the guidelines outlined in Posting a Crash Report.

https://developer.apple.com/forums/thread/688669

As you said, the error typically indicates that your application is trying to access memory that has already been deallocated or is otherwise invalid. Although you mentioned using Address Sanitizer, double-check your configuration to ensure it's correctly enabled. Sometimes, specific project settings might prevent tools from working as expected. If you're using collections that hold objects, ensure they are not being modified. Use or breakpoints to trace object lifetimes and ensure they are being deallocated when expected. This can help pinpoint where the object is being released prematurely. If you're using third-party libraries, ensure they are up-to-date, as bugs in libraries can manifest similarly. However it seems like the crash is in the main binary. In Xcode, use the "Leaks" and "Zombies" instruments to track over-released objects.

I’m looking forward to your crash file! But nothing better than being able to reproduce it!

Albert Pascual
  Worldwide Developer Relations.

EXC_BAD_ACCESS issue need advice
 
 
Q