[TIMOB-28127] iOS: TiUIListItemProxy overreleased causing intermittent crashing w/ macOS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-10-02T14:38:26.000+0000 |
Affected Version/s | Release 9.2.0 |
Fix Version/s | Release 9.2.1 |
Components | iOS |
Labels | engSchedule |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2020-09-11T17:22:29.000+0000 |
Updated | 2020-10-02T14:38:26.000+0000 |
Description
Occasionally our unit test suite is crashing due to this issue, but it's always spitting out lots of warnings.
objc[14701]: TiUIListItemProxy object 0x7fdd2a8c4e00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a070000 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a04f600 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a056c00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a04ca00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a17ec00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a059a00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a1a6000 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a1a2400 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a0fc800 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a1a2a00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a1a3400 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a1a3e00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2b959200 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2b95e000 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2b95e600 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2b962000 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a8c8800 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a8c3400 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a8c3a00 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
objc[14701]: TiUIListItemProxy object 0x7fdd2a8cb000 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
So I suppose we're double releasing the proxies?
Attachments
File | Date | Size |
---|---|---|
mocha_2020-09-11-095125_macos-walle.crash | 2020-09-11T17:21:10.000+0000 | 146435 |
mocha_2020-09-11-104957_macos-walle.crash | 2020-09-11T18:03:23.000+0000 | 145383 |
mocha_2020-09-14-113832_slapchop-macos.crash | 2020-09-14T18:41:08.000+0000 | 145366 |
mocha_2020-09-14-113909_slapchop-macos.crash | 2020-09-14T18:41:08.000+0000 | 148568 |
These positions of the code look awfully suspicious: - https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIListView.m#L376-L382 - https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIListView.m#L1518-L1539 In both cases we have a
TiUIListItem
and aTiUIListItemProxy
linked and ask torelease
both (in the latter we release the proxy but autorelease the cell). ButTiUIListItem
'sdealloc
method seems to release the linked proxy as well.Holy moly! We had some very similar crashes related to list items in the past already - this one is definitely the cause. In both of your snippets, the proxy should deallocate / be GC'd automatically, because it is initialized in the same scope. You can use the "Profiler" mode in Xcode to see if the change causes a new memory leak.
I am also seeing these in the logs, so presumably TableView suffers from he same sort of issue:
Test Case -
1. I am seeing the overrelease message in Mac app only, not on iOS simulator and no crash. 2. As Hans has mentioned theTiUIListItemProxy and TiUIListItem creation, at given code snippet, are in local scope and it should be released. If we do not release it, memory is leaking. Need to check in detail.
https://github.com/appcelerator/titanium_mobile/pull/12104
https://github.com/appcelerator/titanium_mobile/pull/12104
FR Passed, waiting on Jenkins build and 9.2.1 build.
*Closing ticket*. Fix verified in SDK version
9.2.1.v20201001120538
, and9.3.0.v20201001144501
. Unable to see any crashing. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/12104