Crashing on writeLogs()
rcgary opened this issue · 2 comments
rcgary commented
I got some crashes happend on my hockey crash report:
Thread 13 Crashed:
0 JustLog 0x00000001015128b8 generic specialization <[Swift.Int : [Swift.String : protocol<>]] with [Swift.Int : [Swift.String : protocol<>]] : Swift.Collection in Swift> of Swift._copyCollectionToContiguousArray <A where A: Swift.Collection> (A) -> Swift.ContiguousArray<A.Iterator.Element> (LogstashDestination.swift:0)
1 JustLog 0x0000000101513b48 function signature specialization <Arg[0] = Owned To Guaranteed> of JustLog.LogstashDestination.(writeLogs () -> ()).(closure #1) (LogstashDestination.swift:0)
2 JustLog 0x000000010151179c JustLog.LogstashDestination.(writeLogs () -> ()).(closure #1) (LogstashDestination.swift:0)
3 Foundation 0x0000000186dd4374 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 12
Any idea why this happened?
Deleted user commented
@rcgary It seems that the crash is happening at line 82 of LogstashDestination.swift when sorting the collection
for log in self.logsToShip.sorted(by: { $0.0 < $1.0 }) {
Sorry of not being of any particular help, I'm confused by the stack trace, the only place where Int entries are added is in addLog
and given the time safety of Swift, I find hard to figure out why the < operator fails on Int values.
We are not encountering any crash in production at all, so cannot compare either.
Deleted user commented
@rcgary I'm closing the issue for inactivity. I trust you managed to sort this out in your code by now, if not, please reopen providing more details.