How to fix the famous “message sent to deallocated instance” when it points to a SwiftUI component?

Short story: My SwiftUI app (let's say the name is *MyApplic*) is working on hundred of Apple devices (iPhone and iPad) like a charm. But at least 3 persons are concerned by a mysterious crash when they made the same action (navigate to an other view). Obviously, I can't reproduce this crash on devices I have... And of course, different devices and iOS versions. For example an iPhone X with iOS14.4, I have one and no problem on mine...

Here is the stack trace for error: *EXCBADACCESS KERNINVALIDADDRESS*



So, trying my best te fix it, I met a person who have to crash, and try to analyze it. Reproduce it with *NSZombiEnabled* gives me this information:
Code Block
[SwiftUI.AccessibilityNode retain]: message sent to deallocated instance 0x282146760

As it is on a physical device, I can't do many more with instruments, etc... But with *lldb* command line, I tried to know the malloc stack of the implied object. With the following command,
Code Block
(lldb) malloc_info --stack-history --max-frames=256 0x282146760

I have:



Please, could you give me some directions or indications? Is it a SwiftUI issue? Why do it happens on these devices in particular?

Are you able to figure out the issue. I am getting similar issue.

How to fix the famous “message sent to deallocated instance” when it points to a SwiftUI component?
 
 
Q