{ "id": "99038", "key": "TIMOB-10406", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14098", "description": "Sprint 2012-18 API", "name": "Sprint 2012-18 API", "archived": true, "released": true, "releaseDate": "2012-09-10" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-07T12:50:33.000+0000", "created": "2012-08-10T17:07:41.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "api" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "20280", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "98039", "key": "TIMOB-10152", "fields": { "summary": "Android: TabGroup - Application doesn't display contents on screen and crashes when hardware back button is pressed on Samsung Galaxy Note", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "21090", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "100014", "key": "TIMOB-10687", "fields": { "summary": "KitchenSink: KitchenSink crashes on launch on Android Emulator 2.2 and Android device 2.2", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "21089", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "97447", "key": "TIMOB-9985", "fields": { "summary": "Android: KitchenSink: App process dying repeatedly and not rendering on emulator.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-12-06T19:29:41.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "KS crashes on Galaxy Tab (3.2) and HTC Sensation 4G (2.3.4) on V8 only. It doesn't happen on Galaxy SII (2.3.6) and Galaxy Nexus (4.0.2). The log is attached.\r\nThis crash happens on master but not on 2.1.1.GA.\r\nThe stack trace is\r\n{code}\r\n\r\n********** Crash dump: **********\r\nBuild fingerprint: 'samsung/SGH-I777/SGH-I777:2.3.6/GINGERBREAD/UCKK6:user/release-keys'\r\npid: 5031, tid: 5040 >>> com.appcelerator.kitchensink <<<\r\nsignal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000c\r\nStack frame #00 pc 0006f474 /data/data/com.appcelerator.kitchensink/lib/libkroll-v8.so: Routine _M_insert in /Users/pwang/android-ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h:306\r\nStack frame #01 pc 00073c0e /data/data/com.appcelerator.kitchensink/lib/libkroll-v8.so: Routine Handle in src/native/V8Runtime.cpp:371\r\nStack frame #02 pc 000926da /data/data/com.appcelerator.kitchensink/lib/libkroll-v8.so: Routine setter_tab in src/native/../../generated/org.appcelerator.titanium.proxy.TiWindowProxy.cpp:1113\r\nCrash dump is completed\r\n{code}", "attachment": [ { "id": "30876", "filename": "app.js", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-29T14:45:04.000+0000", "size": 848, "mimeType": "text/javascript" }, { "id": "30428", "filename": "log", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-10T17:07:41.000+0000", "size": 10499, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "Android: KS crashes on Galaxy Tab and HTC Sensation 4G on V8 only", "creator": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Galaxy Tab (3.2)\r\nHTC Sensation 4G (2.3.4)", "comment": { "comments": [ { "id": "214201", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It turns out PR#2673 (https://github.com/appcelerator/titanium_mobile/pull/2673) causes this crash.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T15:55:00.000+0000", "updated": "2012-08-13T15:55:00.000+0000" }, { "id": "214421", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This might be related to a GC bug we have seen before with TabGroup.\r\nWe might want to hold off until TIMOB-9911 is merged which will refactor\r\na lot of the tab group code.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T13:57:01.000+0000", "updated": "2012-08-14T13:57:01.000+0000" }, { "id": "214828", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Haven't seen the crash yet, but did notice sometimes the tab group comes up with no tabs.\r\nSeen this so far on my HTC One X, I'll try some other devices and see what happens.\r\nI am not sure yet if this is related to this crash.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-16T12:10:52.000+0000", "updated": "2012-08-16T12:10:52.000+0000" }, { "id": "214882", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So it seems the crash I reproduced is caused by the TabGroup being unreachable (thus eligible for GC)\r\nbetween the open() call and the tab group being opened (this is an async operation).\r\n\r\nA simple solution that seems to fix the crash is to change the \"ApplicationTabGroup\" variable\r\nin app.js to a global.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-16T14:37:36.000+0000", "updated": "2012-08-16T14:37:36.000+0000" }, { "id": "214885", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue occurs only on master and not on 2.1.2 so it does not need the backport.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-16T14:38:46.000+0000", "updated": "2012-08-16T14:38:46.000+0000" }, { "id": "216117", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "With some more tedious debugging I figured out what's going on.\r\n\r\nSo it appears the windows for each tab are getting \"detached\" due to not being reachable\r\nanymore in JS. This is normal behavior and the window proxies won't get deleted since Java still references them.\r\n\r\nThe problem is with the window's children views. Due to how we lazy load these into the Java Window object, they don't\r\nhave any references in Java. So when they get detached (same time as the window since they are also \"weak\") Java will come\r\nalong later, finalize the Java object, and delete the native object for the proxy.\r\n\r\nEventually we go to open the window and load its child views. When we try to access the native object for the proxy\r\nthe application crashes since we deleted it earlier.\r\n\r\nThe easiest solution here is to probably create an array of pending windows to keep\r\nthe windows from ever detaching until we have opened them. It's sort of a hack, but it wouldn't require\r\nany immediate major changes to our memory management. So I'll probably implement the quick solution for now\r\nand open a task to research a better solution to this problem which may arrise in other cases.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-24T22:11:12.000+0000", "updated": "2012-08-24T22:11:12.000+0000" }, { "id": "216118", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We could also update the KS example to not discard the reference.\r\nRight now it creates the tab group in a closure and only keeps it in a local variable.\r\nOut side of KS this would basically require any developer to retain a reference to the group\r\nuntil it has opened.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-24T22:33:23.000+0000", "updated": "2012-08-24T22:33:23.000+0000" }, { "id": "216900", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attaching a test case which reproduces the underlying flaw in a more simplified case.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-29T14:45:04.000+0000", "updated": "2012-08-29T14:45:04.000+0000" }, { "id": "217771", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #2877|https://github.com/appcelerator/titanium_mobile/pull/2877] to resolve issue.\r\n\r\nh3. Functional Testing\r\n*Note*: The issue is device sensitive. Try testing on a variety of devices\r\nincluding those listed in this ticket as being affected by this bug.\r\n\r\nh4. Simplified Case\r\n1. Run the simplified test case attached (app.js).\r\n2. Try moving finger in the blue view area to generate events.\r\n3. Click the button and you should see an alert.\r\n4. Repeat steps 2-3 to verify the application does not crash.\r\n\r\nh4. KitchenSink\r\n1. Build KS and install onto device.\r\n2. Run KS and verify it doesn't crash on startup.\r\n3. Try changing tabs and verify it does not crash.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-05T21:58:49.000+0000", "updated": "2012-09-05T21:58:49.000+0000" }, { "id": "218013", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #2887|https://github.com/appcelerator/titanium_mobile/pull/2887] to fix regression with Rhino runtime.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-07T11:55:41.000+0000", "updated": "2012-09-07T11:55:41.000+0000" }, { "id": "230263", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the issue,not reproducible.KS does not crash on 2.3.4 & 4.0.3\r\nTitanium studio : 3.0.0.201211301903\r\nSDK Version : 3.0.0.v20121204154658\r\nCLI version : 3.0.19\r\nOS : OSX 10.8.2\r\nAndroid : 2.3.4 & 4.0.3\r\nKS : 2.1.4", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T19:29:41.000+0000", "updated": "2012-12-06T19:29:41.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }