Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27121] iOS: Infinite recursion crash

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterChristopher Williams
AssigneeVijay Singh
Created2019-06-03T18:25:16.000+0000
Updated2019-06-15T21:27:41.000+0000

Description

Seen on our CI build nodes when the test suite crashed. Here's the log prior to crash:
[2019-06-03T17:59:55.477Z] [INFO] :   !TEST_START: responseHeadersBug
[2019-06-03T17:59:55.477Z] [WARN] :   Automatic setter methods for properties are deprecated in SDK 8.0.0 and will be removed in SDK 9.0.0. Please modify the property in standard JS style: obj.timeout = value; or obj['timeout'] = value;
[2019-06-03T17:59:56.625Z] [WARN] :   Automatic getter methods for properties are in SDK 8.0.0 and will be removed in SDK 9.0.0. Please access the property in standard JS style: obj.allResponseHeaders or obj['allResponseHeaders']
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_END: {"state":"passed","duration":964,"suite":"Titanium.Network.HTTPClient","title":"responseHeadersBug","message":""}
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_START: requestHeaderMethods
[2019-06-03T17:59:56.625Z] [WARN] :   Automatic setter methods for properties are deprecated in SDK 8.0.0 and will be removed in SDK 9.0.0. Please modify the property in standard JS style: obj.timeout = value; or obj['timeout'] = value;
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_END: {"state":"passed","duration":103,"suite":"Titanium.Network.HTTPClient","title":"requestHeaderMethods","message":""}
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_START: sendData
[2019-06-03T17:59:56.625Z] [WARN] :   Automatic setter methods for properties are deprecated in SDK 8.0.0 and will be removed in SDK 9.0.0. Please modify the property in standard JS style: obj.timeout = value; or obj['timeout'] = value;
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_END: {"state":"passed","duration":141,"suite":"Titanium.Network.HTTPClient","title":"sendData","message":""}
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_END: {"state":"skipped","duration":0,"suite":"Titanium.Network.HTTPClient","title":"clearCookiePositiveTest","message":""}
[2019-06-03T17:59:56.625Z] [INFO] :   !TEST_START: clearCookieUnaffectedCheck
[2019-06-03T17:59:56.625Z] [WARN] :   Automatic setter methods for properties are deprecated in SDK 8.0.0 and will be removed in SDK 9.0.0. Please modify the property in standard JS style: obj.timeout = value; or obj['timeout'] = value;
[2019-06-03T18:00:02.522Z] [INFO] :   Second Load
[2019-06-03T18:00:11.433Z] -- End simulator log ---------------------------------------------------------
[2019-06-03T18:00:11.433Z] Failed to finish test suite before app crashed and logs ended!
script returned exit code 1
The attached crash log gives the details, and it's pretty clearly in an infinite recursion loop in TiBindingTiValueToNSObject and TiBindingTiValueToNSDictionary - presumably some object with a circular reference?

Attachments

FileDateSize
mocha_2019-06-03-110012_macos-rocket.crash2019-06-03T18:25:12.000+0000186135

Comments

  1. Hans Knöchel 2019-06-15

    It has to be an API (probably a Ti.Network cookie) that passes a type to the core that cannot be handled by other JSCore types. If that happens inside TiBindingTiValueToNSObject, then TiBindingTiValueToNSDictionary is called as a fallback. Long story short, the issue likely was that [this line](https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/31d9061b6754f30c6ced1b5ecc60f259cabbc078/Resources/ti.network.httpclient.test.js#L310) in the test suite did not properly unwrap the received headers when calling https://my.appcelerator.com/auth/login, so if the URL did not pass Set-Cookie, then the getter internally still checks for the key using \[\[\[self response\] headers\] valueForKey:args\], resulting in a object check with an undefined / non-string key. Still can be something else, but rewriting the test case should have fixed it. It seems like it was just removed, so maybe someone can clean it up and this ticket will be done as well.

JSON Source