Sporadic crash - 'Invalid number value (infinite) in JSON write'

363 views
Skip to first unread message

Tobias Lie Andersen

unread,
Sep 24, 2019, 1:24:28 AM9/24/19
to Interactive Media Ads SDK
We have some sporadic crashes caused by the IMA SDK. It comes and goes in spikes, with a few thousand crashes one day, but then maybe several weeks until next spike.

Debugging this have turned out to be difficult as well, with little information to go from the crashlogs, and we are not able to reproduce it locally.

Do you know what can be causing this. With the information provided by the crashlog, it seems to be a problem with a parsed number being infinite, but we can't find out where this number comes from.

Providing the crashlog below.

Exception Type:  SIGABRT
Exception Codes: #0 at 0x1cffc50dc
Crashed Thread:  13

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid number value (infinite) in JSON write'

Last Exception Backtrace:
0   CoreFoundation                       0x00000001d042827c __exceptionPreprocess + 228
1   libobjc.A.dylib                      0x00000001cf6029f8 objc_exception_throw + 52
2   CoreFoundation                       0x00000001d03324b0 +[NSException raise:format:] + 112
3   Foundation                           0x00000001d0f2dc84 _writeJSONNumber + 560
4   Foundation                           0x00000001d0f2bb48 _writeJSONValue + 516
5   Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
6   CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
7   Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
8   Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
9   CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
10  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
11  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
12  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
13  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
14  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
15  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
16  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
17  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
18  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
19  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
20  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
21  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
22  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
23  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
24  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
25  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
26  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
27  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
28  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
29  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
30  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
31  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
32  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
33  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
34  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
35  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
36  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
37  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
38  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
39  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
40  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
41  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
42  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
43  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
44  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
45  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
46  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
47  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
48  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
49  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
50  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
51  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
52  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
53  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
54  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
55  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
56  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
57  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
58  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
59  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
60  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
61  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
62  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
63  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
64  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
65  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
66  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
67  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
68  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
69  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
70  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
71  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
72  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
73  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
74  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
75  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
76  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
77  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
78  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
79  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
80  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
81  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
82  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
83  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
84  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
85  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
86  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
87  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
88  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
89  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
90  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
91  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
92  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
93  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
94  Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
95  Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
96  CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
97  Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
98  Foundation                           0x00000001d0f2ed84 ___writeJSONArray_block_invoke + 152
99  CoreFoundation                       0x00000001d031165c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 212
100 Foundation                           0x00000001d0f2e53c _writeJSONArray + 284
101 Foundation                           0x00000001d0f2eb50 ___writeJSONObject_block_invoke + 188
102 CoreFoundation                       0x00000001d0312000 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 228
103 Foundation                           0x00000001d0f2e120 _writeJSONObject + 380
104 Foundation                           0x00000001d0deabdc -[_NSJSONWriter dataWithRootObject:options:error:] + 136
105 Foundation                           0x00000001d0dea904 +[NSJSONSerialization dataWithJSONObject:options:error:] + 352
106 GoogleInteractiveMediaAds            0x0000000104413718 0x1043e4000 + 194328
107 GoogleInteractiveMediaAds            0x0000000104418740 0x1043e4000 + 214848
108 libdispatch.dylib                    0x00000001cfe67a38 _dispatch_call_block_and_release + 20
109 libdispatch.dylib                    0x00000001cfe687d4 _dispatch_client_callout + 12
110 libdispatch.dylib                    0x00000001cfe11320 _dispatch_lane_serial_drain$VARIANT$mp + 588
111 libdispatch.dylib                    0x00000001cfe11e3c _dispatch_lane_invoke$VARIANT$mp + 424
112 libdispatch.dylib                    0x00000001cfe1a4a8 _dispatch_workloop_worker_thread + 592
113 libsystem_pthread.dylib              0x00000001d0048114 _pthread_wqthread + 300
114 libsystem_pthread.dylib              0x00000001d004acd4 start_wqthread + 0

IMA SDK

unread,
Sep 24, 2019, 6:07:26 AM9/24/19
to tobiaslie...@tv2.no, ima...@googlegroups.com
Hi Tobias,

Thank you for reporting this. Could you share your Ad tag via "Reply Privately to Author" option so I could investigate the issue further? 

Regards,
Teejay Pimentel
IMA SDK Team

ref:_00D1U1174p._5001UHHjYZ:ref

IMA SDK

unread,
Sep 25, 2019, 1:54:29 AM9/25/19
to tobiaslie...@tv2.no, ima...@googlegroups.com
Hi Tobias,

Thank you for providing the details privately.

I tested the Ad tags on our sample app and I wasn't able to reproduce the crash that you've encountered. Is there any specific device that you can provide where the crash occurs? This will help us to narrow down and identify the issue.

IMA SDK

unread,
Sep 25, 2019, 6:10:53 AM9/25/19
to tobiaslie...@tv2.no, ima...@googlegroups.com
Hi Tobias,

Thank you for providing the additional information. I'll raise this to the rest of the team and get back to you the soonest they provide their feedback.
Reply all
Reply to author
Forward
0 new messages