[TIMOB-18215] iOS: App crashes while parsing XML
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-12-19T06:46:42.000+0000 |
Affected Version/s | Release 3.5.0 |
Fix Version/s | Release 3.5.0, Release 4.0.0 |
Components | iOS |
Labels | crash, ios, qe-3.5.0, qe-testadded, regression |
Reporter | Eric Wieber |
Assignee | Vishal Duggal |
Created | 2014-12-16T19:30:40.000+0000 |
Updated | 2014-12-19T18:43:11.000+0000 |
Description
App will crash while parsing XML.
*Steps to reproduce issue*:
1. Create new project using attached app.js
2. Run the app
3. Click "load" until the app crashes (wait for parsing to finish between clicks. Could take 10+ clicks)
*Expected Result*:
App will not crash
*Notes*:
Does not occur with SDK 3.4.1.GA. This is a regression
See related tickets below
*Example output*:
This is what is left in console after the crash occurs. It should convert up to number 745. I get the below output and the app crashes to the home screen.
[INFO] : XHR has loaded..
[INFO] : parse XML...
[INFO] : about to convert XML node to JS node number 0
[INFO] : about to convert XML node to JS node number 1
[INFO] : about to convert XML node to JS node number 2
[INFO] : about to convert XML node to JS node number 3
[INFO] : about to convert XML node to JS node number 4
[INFO] : about to convert XML node to JS node number 5
[INFO] : about to convert XML node to JS node number 6
[INFO] : about to convert XML node to JS node number 7
[INFO] : about to convert XML node to JS node number 8
[INFO] : about to convert XML node to JS node number 9
[INFO] : about to convert XML node to JS node number 10
[INFO] : about to convert XML node to JS node number 11
[INFO] : about to convert XML node to JS node number 12
[INFO] : about to convert XML node to JS node number 13
[INFO] : about to convert XML node to JS node number 14
[INFO] : about to convert XML node to JS node number 15
[INFO] : about to convert XML node to JS node number 16
[INFO] : about to convert XML node to JS node number 17
[INFO] : about to convert XML node to JS node number 18
[INFO] : about to convert XML node to JS node number 19
[INFO] : about to convert XML node to JS node number 20
[INFO] : about to convert XML node to JS node number 21
[INFO] : about to convert XML node to JS node number 22
[INFO] : about to convert XML node to JS node number 23
[INFO] : about to convert XML node to JS node number 24
[INFO] : about to convert XML node to JS node number 25
[INFO] : about to convert XML node to JS node number 26
[INFO] : about to convert XML node to JS node number 27
[INFO] : about to convert XML node to JS node number 28
[INFO] : about to convert XML node to JS node number 29
[INFO] : about to convert XML node to JS node number 30
[INFO] : about to convert XML node to JS node number 31
[INFO] : about to convert XML node to JS node number 32
[INFO] : about to convert XML node to JS node number 33
[INFO] : about to convert XML node to JS node number 34
[INFO] : about to convert XML node to JS node number 35
[INFO] : about to convert XML node to JS node number 36
[INFO] : about to convert XML node to JS node number 37
[INFO] : about to convert XML node to JS node number 38
[INFO] : about to convert XML node to JS node number 39
[INFO] : about to convert XML node to JS node number 40
[INFO] : about to convert XML node to JS node number 41
[INFO] : about to convert XML node to JS node number 42
[INFO] : about to convert XML node to JS node number 43
[INFO] : about to convert XML node to JS node number 44
[INFO] : about to convert XML node to JS node number 45
[INFO] : about to convert XML node to JS node number 46
[INFO] : about to convert XML node to JS node number 47
[INFO] : about to convert XML node to JS node number 48
[INFO] : about to convert XML node to JS node number 49
[INFO] : about to convert XML node to JS node number 50
[INFO] : about to convert XML node to JS node number 51
[INFO] : about to convert XML node to JS node number 52
[INFO] : about to convert XML node to JS node number 53
[INFO] : about to convert XML node to JS node number 54
[INFO] : about to convert XML node to JS node number 55
[INFO] : about to convert XML node to JS node number 56
[INFO] : about to convert XML node to JS node number 57
[INFO] : about to convert XML node to JS node number 58
[INFO] : about to convert XML node to JS node number 59
[INFO] : about to convert XML node to JS node number 60
[INFO] : about to convert XML node to JS node number 61
[INFO] : about to convert XML node to JS node number 62
[INFO] : about to convert XML node to JS node number 63
[INFO] : about to convert XML node to JS node number 64
[INFO] : about to convert XML node to JS node number 65
[INFO] : about to convert XML node to JS node number 66
[INFO] : about to convert XML node to JS node number 67
[INFO] : about to convert XML node to JS node number 68
[INFO] : about to convert XML node to JS node number 69
[INFO] : about to convert XML node to JS node number 70
[INFO] : about to convert XML node to JS node number 71
[INFO] : about to convert XML node to JS node number 72
[INFO] : about to convert XML node to JS node number 73
[INFO] : about to convert XML node to JS node number 74
[INFO] : about to convert XML node to JS node number 75
[INFO] : about to convert XML node to JS node number 76
[INFO] : about to convert XML node to JS node number 77
[INFO] : about to convert XML node to JS node number 78
[INFO] : about to convert XML node to JS node number 79
[INFO] : about to convert XML node to JS node number 80
[INFO] : about to convert XML node to JS node number 81
[INFO] : about to convert XML node to JS node number 82
[INFO] : about to convert XML node to JS node number 83
[INFO] : about to convert XML node to JS node number 84
[INFO] : about to convert XML node to JS node number 85
[INFO] : about to convert XML node to JS node number 86
[INFO] : about to convert XML node to JS node number 87
[INFO] : about to convert XML node to JS node number 88
[INFO] : about to convert XML node to JS node number 89
[INFO] : about to convert XML node to JS node number 90
[INFO] : about to convert XML node to JS node number 91
[INFO] : about to convert XML node to JS node number 92
[INFO] : about to convert XML node to JS node number 93
[INFO] : about to convert XML node to JS node number 94
[INFO] : about to convert XML node to JS node number 95
[INFO] : about to convert XML node to JS node number 96
[INFO] : about to convert XML node to JS node number 97
[INFO] : about to convert XML node to JS node number 98
[INFO] : about to convert XML node to JS node number 99
[INFO] : about to convert XML node to JS node number 100
[INFO] : about to convert XML node to JS node number 101
[INFO] : about to convert XML node to JS node number 102
[INFO] : about to convert XML node to JS node number 103
[INFO] : about to convert XML node to JS node number 104
[INFO] : about to convert XML node to JS node number 105
[INFO] : about to convert XML node to JS node number 106
[INFO] : about to convert XML node to JS node number 107
[INFO] : about to convert XML node to JS node number 108
[INFO] : about to convert XML node to JS node number 109
[INFO] : about to convert XML node to JS node number 110
[INFO] : about to convert XML node to JS node number 111
[INFO] : about to convert XML node to JS node number 112
[INFO] : about to convert XML node to JS node number 113
[INFO] : about to convert XML node to JS node number 114
[INFO] : about to convert XML node to JS node number 115
[INFO] : about to convert XML node to JS node number 116
[INFO] : about to convert XML node to JS node number 117
[INFO] : about to convert XML node to JS node number 118
[INFO] : about to convert XML node to JS node number 119
[INFO] : about to convert XML node to JS node number 120
[INFO] : about to convert XML node to JS node number 121
[INFO] : about to convert XML node to JS node number 122
[INFO] : about to convert XML node to JS node number 123
[INFO] : about to convert XML node to JS node number 124
[INFO] : about to convert XML node to JS node number 125
[INFO] : about to convert XML node to JS node number 126
[INFO] : about to convert XML node to JS node number 127
[INFO] : about to convert XML node to JS node number 128
[INFO] : about to convert XML node to JS node number 129
[INFO] : about to convert XML node to JS node number 130
[INFO] : about to convert XML node to JS node number 131
[INFO] : about to convert XML node to JS node number 132
[INFO] : about to convert XML node to JS node number 133
[INFO] : about to convert XML node to JS node number 134
[INFO] : about to convert XML node to JS node number 135
[INFO] : about to convert XML node to JS node number 136
[INFO] : about to convert XML node to JS node number 137
[INFO] : about to convert XML node to JS node number 138
[INFO] : about to convert XML node to JS node number 139
[INFO] : about to convert XML node to JS node number 140
[INFO] : about to convert XML node to JS node number 141
[INFO] : about to convert XML node to JS node number 142
[INFO] : about to convert XML node to JS node number 143
[INFO] : about to convert XML node to JS node number 144
[INFO] : about to convert XML node to JS node number 145
[INFO] : about to convert XML node to JS node number 146
[INFO] : about to convert XML node to JS node number 147
[INFO] : about to convert XML node to JS node number 148
[INFO] : about to convert XML node to JS node number 149
[INFO] : about to convert XML node to JS node number 150
[INFO] : about to convert XML node to JS node number 151
[INFO] : about to convert XML node to JS node number 152
[INFO] : about to convert XML node to JS node number 153
[INFO] : about to convert XML node to JS node number 154
[INFO] : about to convert XML node to JS node number 155
[INFO] : about to convert XML node to JS node number 156
[INFO] : about to convert XML node to JS node number 157
[INFO] : about to convert XML node to JS node number 158
[INFO] : about to convert XML node to JS node number 159
[INFO] : about to convert XML node to JS node number 160
[INFO] : about to convert XML node to JS node number 161
[INFO] : about to convert XML node to JS node number 162
[INFO] : about to convert XML node to JS node number 163
[INFO] : about to convert XML node to JS node number 164
[INFO] : about to convert XML node to JS node number 165
[INFO] : about to convert XML node to JS node number 166
[INFO] : about to convert XML node to JS node number 167
[INFO] : about to convert XML node to JS node number 168
[INFO] : about to convert XML node to JS node number 169
[INFO] : about to convert XML node to JS node number 170
[INFO] : about to convert XML node to JS node number 171
[INFO] : about to convert XML node to JS node number 172
[INFO] : about to convert XML node to JS node number 173
[INFO] : about to convert XML node to JS node number 174
[INFO] : about to convert XML node to JS node number 175
[INFO] : about to convert XML node to JS node number 176
[INFO] : about to convert XML node to JS node number 177
[INFO] : about to convert XML node to JS node number 178
[INFO] : about to convert XML node to JS node number 179
[INFO] : about to convert XML node to JS node number 180
[INFO] : about to convert XML node to JS node number 181
[INFO] : about to convert XML node to JS node number 182
[INFO] : about to convert XML node to JS node number 183
[INFO] : about to convert XML node to JS node number 184
[INFO] : about to convert XML node to JS node number 185
[INFO] : about to convert XML node to JS node number 186
[INFO] : about to convert XML node to JS node number 187
[INFO] : about to convert XML node to JS node number 188
[INFO] : about to convert XML node to JS node number 189
[INFO] : about to convert XML node to JS node number 190
[INFO] : about to convert XML node to JS node number 191
[INFO] : about to convert XML node to JS node number 192
[INFO] : about to convert XML node to JS node number 193
[INFO] : about to convert XML node to JS node number 194
[INFO] : about to convert XML node to JS node number 195
[INFO] : about to convert XML node to JS node number 196
[INFO] : about to convert XML node to JS node number 197
[INFO] : about to convert XML node to JS node number 198
[INFO] : about to convert XML node to JS node number 199
[INFO] : about to convert XML node to JS node number 200
[INFO] : about to convert XML node to JS node number 201
[INFO] : about to convert XML node to JS node number 202
[INFO] : about to convert XML node to JS node number 203
[INFO] : about to convert XML node to JS node number 204
[INFO] : about to convert XML node to JS node number 205
[INFO] : about to convert XML node to JS node number 206
[INFO] : about to convert XML node to JS node number 207
[INFO] : about to convert XML node to JS node number 208
[INFO] : about to convert XML node to JS node number 209
[INFO] : about to convert XML node to JS node number 210
[INFO] : about to convert XML node to JS node number 211
[INFO] : about to convert XML node to JS node number 212
[INFO] : about to convert XML node to JS node number 213
[INFO] : about to convert XML node to JS node number 214
[INFO] : about to convert XML node to JS node number 215
[INFO] : about to convert XML node to JS node number 216
[INFO] : about to convert XML node to JS node number 217
[INFO] : about to convert XML node to JS node number 218
[INFO] : about to convert XML node to JS node number 219
[INFO] : about to convert XML node to JS node number 220
[INFO] : about to convert XML node to JS node number 221
[INFO] : about to convert XML node to JS node number 222
[INFO] : about to convert XML node to JS node number 223
[INFO] : about to convert XML node to JS node number 224
[INFO] : about to convert XML node to JS node number 225
[INFO] : about to convert XML node to JS node number 226
[INFO] : about to convert XML node to JS node number 227
[INFO] : about to convert XML node to JS node number 228
[INFO] : about to convert XML node to JS node number 229
[INFO] : about to convert XML node to JS node number 230
[INFO] : about to convert XML node to JS node number 231
[INFO] : about to convert XML node to JS node number 232
[INFO] : about to convert XML node to JS node number 233
[INFO] : about to convert XML node to JS node number 234
[INFO] : about to convert XML node to JS node number 235
[INFO] : about to convert XML node to JS node number 236
[INFO] : about to convert XML node to JS node number 237
[INFO] : about to convert XML node to JS node number 238
[INFO] : about to convert XML node to JS node number 239
[INFO] : about to convert XML node to JS node number 240
[INFO] : about to convert XML node to JS node number 241
[INFO] : about to convert XML node to JS node number 242
Attachments
File | Date | Size |
---|---|---|
app.js | 2014-12-16T19:30:40.000+0000 | 8158 |
[~jalter] Here's the link to the Phobos-based build: http://builds.appcelerator.com/#3_5_X_v2
The Exception is:
* Getting the same exception when running the test using the JavaScriptCore framework shipped with iOS via: https://github.com/appcelerator/titanium_mobile/pull/6450 * And with the Phobos-based build: http://builds.appcelerator.com/#3_5_X_v2
Taken a look at this on https://github.com/appcelerator/titanium_mobile/pull/6450. The exception [~jalter] has mentioned appeared randomly on different methods, and also occasionally the following exception: *EXC_BAD_ACCESS(code=EXC_i386_GPFLT)* Exploring this further, this implies the following: _Memory protection is also implemented using the segment descriptors. First, the processor checks whether a value loaded in a segment register references a valid descriptor. Then it checks that every linear address calculated actually lies within the segment. Also, the type of access (read, write, or execute) is checked against the information in the segment descriptor. Whenever one of these checks fails, exception (interrupt) 13 (hex 0D) is raised. This exception is called a General Protection Fault (GPF)._ Which got me to check about whether the framework supports i386_64 since this have been happening on simulator, which got me to this: https://github.com/phoboslab/JavaScriptCore-iOS/issues/22 saying that *phobos doesn't build for i386_64.* So i took out a device (iPhone 6 iOS 8.2) and tested, with zombie objects enabled, and reproduced consistently the following, in line 192 of KrollMethod.m:
where methodSignature is the zombie object. and it always occurs after convert XML node to JS node number 42 These are things I discovered so far. Will continue on it.
Looks like in KrollMethod.m
target
is getting deallocated prematurely.Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6507 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6508
Closed the PR's
New PR's master - https://github.com/appcelerator/titanium_mobile/pull/6509 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6510
CR and FT passed. Merged PRs.
Closing ticket as fixed. Verified app does not crash while parsing XML; pressed the load button at least 15 times. Tested on: Appcelerator Studio, build: 3.4.1.201410281743 SDK build: 3.5.0.v20141219075715 CLI: 3.4.1 Alloy: 1.5.1 Xcode: 6.2 beta 3 Devices: iPhone 6 Plus (8.1.1), iPad Air 2 (8.2 b3), iphone 5 (8.1)