What does “Arg = Exploded” mean in Swift crash log

2019-04-05 18:45发布

问题:

This question already has an answer here:

  • What's Dead & Exploded in Swift's exception stack? 3 answers

I get a crash log from Crashlytics/Fabric which reads like the following:

function signature specialization <Arg[0] = Exploded, Arg[1] = Owned To Guaranteed> of
MyClass.viewWillAppear (MyClass)(Swift.Bool) -> ()

what does exploded mean for Arg[0]? It's weird that there are two arguments because we're talking about viewWillAppear here - is the first argument the object itself?

回答1:

I got this issue a week ago, and thankfully managed to fix it remotely. I believe it is a parsing issue.

The issue was because I was getting an array of strings from the server, and one of the argument was empty, generating a parsing error of the arguments

["String1", "String2", "String3",]

should have been

["String1", "String2", "String3"]

In your case : Look for what is in your viewWillAppear and check for any parsing/serializing. A bad object returned is probably the root cause of this