How to debugging EXC_BAD_ACCESS KERN_INVALID_ADDRESS

Hi all, I'm trying to find the reason why my app is crashing and fix it. This is just happening in some devices and others are working fine. I have no idea how to do it and any hint on what to do will be really appreciated. I am in a test stage using testFlight and I am using crashlytics to collect the errors. The apps has Firebase services (Push Notification, firestore, crashlytics) google maps, Realm and more.

The error is below:

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000018
Crashed: com.apple.main-thread
0  myapp                    0x3dcd4c gmscore::vector::TextureAtlasElement::height() const + 72916
1  myapp                    0xe9e50 (anonymous namespace)::BubbleBehavior::Commit(gmscore::renderer::EntityRenderer*) + 4373995088
2  myapp                    0x2d14ac gmscore::renderer::EntityRenderer::Draw(bool, bool) + 340
3  myapp                    0x39d2dc -[GMSPhoenixRenderer drawForced:deferredPresentation:] + 13156
4  myapp                    0x37ed2c -[GMSEntityRendererView draw] + 116072
5  myapp                    0x3c2aa0 -[GMSVectorMapView draw] + 166696
6  myapp                    0x37d140 -[GMSEntityRendererView displayLinkFired:] + 108924
7  myapp                    0x37b4a8 -[GMSDisplayLink displayLinkFired:] + 101604
8  QuartzCore                     0x2fa14 CA::Display::DisplayLinkItem::dispatch_(CA::SignPost::Interval<(CA::SignPost::CAEventCode)835322056>&) + 48
9  QuartzCore                     0x32bfc CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 864
10 QuartzCore                     0x32708 CA::Display::DisplayLink::callback(_CADisplayTimer*, unsigned long long, unsigned long long, unsigned long long, bool, void*) + 844
11 QuartzCore                     0xb191c CA::Display::DisplayLink::dispatch_deferred_display_links(unsigned int) + 348
12 UIKitCore                      0xaa48c _UIUpdateSequenceRun + 84
13 UIKitCore                      0xa9b7c schedulerStepScheduledMainSection + 144
14 UIKitCore                      0xa9c38 runloopSourceCallback + 92
15 CoreFoundation                 0x3731c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
16 CoreFoundation                 0x36598 __CFRunLoopDoSource0 + 176
17 CoreFoundation                 0x34d4c __CFRunLoopDoSources0 + 244
18 CoreFoundation                 0x33a88 __CFRunLoopRun + 828
19 CoreFoundation                 0x33668 CFRunLoopRunSpecific + 608
20 GraphicsServices               0x35ec GSEventRunModal + 164
21 UIKitCore                      0x22c2b4 -[UIApplication _run] + 888
22 UIKitCore                      0x22b8f0 UIApplicationMain + 340
23 UIKitCore                      0x4559c8 __swift_destroy_boxed_opaque_existential_1Tm + 12220
24 myapp                    0x34704 main + 4373251844 (AppDelegate.swift:4373251844)
25 ???                            0x1bb0badcc (Falta)

I forgot to say that this happens when a marker is tapped and this should load a customInfoWindow but the app crashes in some devices: let customWindow = Bundle.main.loadNibNamed("InfoWindow", owner: self, options: nil)![0] as! CustomInfoWindow' So far the crash happens on iOS 15.8 (iPhone 7 plus) and 17.1.2 (iPhone 15 Max Pro) but it works in iPhone 11, 12 y 14

I fixed this problem updating my GoogleMaps pods: pod 'GoogleMaps', '8.3'

And setting translatesAutoresizingMaskIntoConstraints to false:

mapView.translatesAutoresizingMaskIntoConstraints = false
How to debugging EXC_BAD_ACCESS KERN_INVALID_ADDRESS
 
 
Q