{ "id": "83066", "key": "TIMOB-6303", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-12-01T16:03:25.000+0000", "created": "2011-11-23T16:53:34.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "branch-v8", "qe-port" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14014", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "83227", "key": "TIMOB-6375", "fields": { "summary": "Android: showContacts - v8/rhino - Selecting a person then clicking \"back\" results in crash", "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": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2012-08-13T12:58:57.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": [], "description": "To reproduce:\r\n1) KS -> Phone -> Contacts -> Display people\r\n2) choose one contact\r\n3) press BACK key\r\nThen the program crashes. The error message is:\r\n***************************************************\r\nE/AndroidRuntime( 2584): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 2584): java.lang.RuntimeException: Unable to resume activity {com.appcelerator.titanium/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: trying to requery an already closed cursor\r\nE/AndroidRuntime( 2584): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2227)\r\nE/AndroidRuntime( 2584): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2255)\r\nE/AndroidRuntime( 2584): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1028)\r\nE/AndroidRuntime( 2584): at android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/AndroidRuntime( 2584): at android.os.Looper.loop(Looper.java:132)\r\nE/AndroidRuntime( 2584): at android.app.ActivityThread.main(ActivityThread.java:4025)\r\nE/AndroidRuntime( 2584): at java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 2584): at java.lang.reflect.Method.invoke(Method.java:491)\r\nE/AndroidRuntime( 2584): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)\r\nE/AndroidRuntime( 2584): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)\r\nE/AndroidRuntime( 2584): at dalvik.system.NativeStart.main(Native Method)\r\nE/AndroidRuntime( 2584): Caused by: java.lang.IllegalStateException: trying to requery an already closed cursor\r\nE/AndroidRuntime( 2584): at android.app.Activity.performRestart(Activity.java:4394)\r\nE/AndroidRuntime( 2584): at android.app.Activity.performResume(Activity.java:4420)\r\nE/AndroidRuntime( 2584): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2217)\r\nE/AndroidRuntime( 2584): ... 10 more\r\nW/ActivityManager( 141): Force finishing activity com.appcelerator.titanium/org.appcelerator.titanium.TiActivity\r\nW/ActivityManager( 141): Activity pause timeout for ActivityRecord{4119f5b8 com.appcelerator.titanium/org.appcelerator.titanium.TiActivity}\r\n***************************************************\r\n\r\nCan not reproduce this issue on HTC 2.3.4.", "attachment": [], "flagged": false, "summary": "Android: Contacts: Rhino/v8, crashes when pressing BACK key in Display People", "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": "Studio 1.0.4.201108101535\r\nRuntime: 1.8.0.1\r\nMacOSX: 10.6.8\r\nDevice: ASUS Tab 3.1", "comment": { "comments": [ { "id": "173998", "author": { "name": "prevostc", "key": "prevostc", "displayName": "Clément Prévost", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have a similar issue.\r\n\r\nMyapp is basically a dialer, with a contact list, and a search box.\r\nThe app launches, display the UI, show the contact list.\r\nPressing the menu button show a menu with only one item: \"Preferences\".\r\nPressing this item show the android preferences for this app (/platform/android/xml/preferences.xml).\r\n\r\nThen if I press the back button the app totally crash.\r\n\r\nHere is my app.js code (notice the getAllPeople call).\r\n\r\n===============================================================\r\nvar win = Titanium.UI.createWindow({\r\n\tid:'win',\r\n\turl:'ui/base.js',\r\n\texitOnClose: true,\r\n\tcontacts: Ti.Contacts.getAllPeople(),\r\n});\r\n===============================================================\r\n\r\nAnd in base.js I create an android menu bind to the android preferences.\r\n\r\n===============================================================\r\nvar activity = Ti.Android.currentActivity;\r\nactivity.onCreateOptionsMenu = function(e) {\r\n\te.menu.add({\r\n\t\ttitle : 'Preferences'\r\n\t}).addEventListener('click', function(e) {\r\n\t\tTi.UI.Android.openPreferences();\r\n\t});\r\n}\r\n===============================================================\r\n\r\nThis is the error report from the android emulator process console:\r\n\r\n===============================================================\r\nE/TiUncaughtHandler( 1717): (main) [28494,32944] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to resume activity {com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity}: android.database.StaleDataException: Attempted to access a cursor after it has been closed.; Titanium 1.7.5,2011/11/02 17:00,ab20af7\r\nE/TiUncaughtHandler( 1717): java.lang.RuntimeException: Unable to resume activity {com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity}: android.database.StaleDataException: Attempted to access a cursor after it has been closed.\r\nE/TiUncaughtHandler( 1717): \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:2443)\r\nE/TiUncaughtHandler( 1717): \tat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2471)\r\nE/TiUncaughtHandler( 1717): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1172)\r\nE/TiUncaughtHandler( 1717): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/TiUncaughtHandler( 1717): \tat android.os.Looper.loop(Looper.java:137)\r\nE/TiUncaughtHandler( 1717): \tat android.app.ActivityThread.main(ActivityThread.java:4340)\r\nE/TiUncaughtHandler( 1717): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiUncaughtHandler( 1717): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\nE/TiUncaughtHandler( 1717): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)\r\nE/TiUncaughtHandler( 1717): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)\r\nE/TiUncaughtHandler( 1717): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/TiUncaughtHandler( 1717): Caused by: android.database.StaleDataException: Attempted to access a cursor after it has been closed.\r\nE/TiUncaughtHandler( 1717): \tat android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:75)\r\nE/TiUncaughtHandler( 1717): \tat android.database.BulkCursorToCursorAdaptor.requery(BulkCursorToCursorAdaptor.java:144)\r\nE/TiUncaughtHandler( 1717): \tat android.database.CursorWrapper.requery(CursorWrapper.java:182)\r\nE/TiUncaughtHandler( 1717): \tat android.app.Activity.performRestart(Activity.java:4505)\r\nE/TiUncaughtHandler( 1717): \tat android.app.Activity.performResume(Activity.java:4531)\r\nE/TiUncaughtHandler( 1717): \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:2433)\r\nE/TiUncaughtHandler( 1717): \t... 10 more\r\nD/dalvikvm( 1717): GC_CONCURRENT freed 171K, 5% free 7869K/8263K, paused 9ms+11ms\r\nE/AndroidRuntime( 1717): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 1717): java.lang.RuntimeException: Unable to resume activity {com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity}: android.database.StaleDataException: Attempted to access a cursor after it has been closed.\r\nE/AndroidRuntime( 1717): \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:2443)\r\nE/AndroidRuntime( 1717): \tat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2471)\r\nE/AndroidRuntime( 1717): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1172)\r\nE/AndroidRuntime( 1717): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/AndroidRuntime( 1717): \tat android.os.Looper.loop(Looper.java:137)\r\nE/AndroidRuntime( 1717): \tat android.app.ActivityThread.main(ActivityThread.java:4340)\r\nE/AndroidRuntime( 1717): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 1717): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\nE/AndroidRuntime( 1717): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)\r\nE/AndroidRuntime( 1717): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)\r\nE/AndroidRuntime( 1717): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/AndroidRuntime( 1717): Caused by: android.database.StaleDataException: Attempted to access a cursor after it has been closed.\r\nE/AndroidRuntime( 1717): \tat android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:75)\r\nE/AndroidRuntime( 1717): \tat android.database.BulkCursorToCursorAdaptor.requery(BulkCursorToCursorAdaptor.java:144)\r\nE/AndroidRuntime( 1717): \tat android.database.CursorWrapper.requery(CursorWrapper.java:182)\r\nE/AndroidRuntime( 1717): \tat android.app.Activity.performRestart(Activity.java:4505)\r\nE/AndroidRuntime( 1717): \tat android.app.Activity.performResume(Activity.java:4531)\r\nE/AndroidRuntime( 1717): \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:2433)\r\nE/AndroidRuntime( 1717): \t... 10 more\r\nW/ActivityManager( 87): Force finishing activity com.prevost.irishdialer/.IrishDialerActivity\r\nW/ActivityManager( 87): Activity pause timeout for ActivityRecord{4124da40 com.prevost.irishdialer/.IrishDialerActivity}\r\nW/NetworkManagementSocketTagger( 87): setKernelCountSet(10021, 1) failed with errno -2\r\nW/NetworkManagementSocketTagger( 87): setKernelCountSet(10049, 0) failed with errno -2\r\nI/Process ( 1717): Sending signal. PID: 1717 SIG: 9\r\nI/ActivityManager( 87): Process com.prevost.irishdialer (pid 1717) has died.\r\nW/InputDispatcher( 87): channel '41348050 com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8\r\nE/InputDispatcher( 87): channel '41348050 com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!\r\nI/WindowManager( 87): WIN DEATH: Window{413627a8 com.prevost.irishdialer/ti.modules.titanium.ui.android.TiPreferencesActivity paused=false}\r\nI/WindowManager( 87): WIN DEATH: Window{41348050 com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity paused=false}\r\nW/InputDispatcher( 87): Attempted to unregister already unregistered input channel '41348050 com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity (server)'\r\nI/WindowManager( 87): WINDOW DIED Window{41348050 com.prevost.irishdialer/com.prevost.irishdialer.IrishDialerActivity paused=false}\r\nE/InputDispatcher( 87): Received spurious receive callback for unknown input channel. fd=191, events=0x8\r\nW/InputManagerService( 87): Got RemoteException sending setActive(false) notification to pid 1717 uid 10049\r\nW/ActivityManager( 87): Activity destroy timeout for ActivityRecord{4124da40 com.prevost.irishdialer/.IrishDialerActivity}\r\nW/ActivityManager( 87): Activity destroy timeout for ActivityRecord{412aaf78 com.prevost.irishdialer/ti.modules.titanium.ui.android.TiPreferencesActivity}\r\n===============================================================", "updateAuthor": { "name": "prevostc", "key": "prevostc", "displayName": "Clément Prévost", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-27T09:06:20.000+0000", "updated": "2011-11-27T09:06:20.000+0000" }, { "id": "174133", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "May be resolved by PR https://github.com/appcelerator/titanium_mobile/pull/778", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-28T17:17:56.000+0000", "updated": "2011-11-28T17:17:56.000+0000" }, { "id": "174502", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce with latest master", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-01T15:57:32.000+0000", "updated": "2011-12-01T15:57:32.000+0000" }, { "id": "214141", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with \r\nmobile sdk-2.2.0.v20120810080115\r\nTitanium Studio, build: 2.1.1.201207271312\r\nDevice:\r\nGalaxy S III Android version 4.0.4\r\n", "updateAuthor": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T12:58:41.000+0000", "updated": "2012-08-13T12:58:41.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }