{ "id": "92930", "key": "TIMOB-9516", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13417", "description": "Sprint 2012-13 API", "name": "Sprint 2012-13 API", "archived": true, "released": true, "releaseDate": "2012-07-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-21T12:25:42.000+0000", "created": "2012-06-07T03:07:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "community", "module_notification_manager", "qe-testadded" ], "versions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17929", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "93041", "key": "TIMOB-9481", "fields": { "summary": "iOS: cancelLocalNotification on iOS is broken", "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": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-16T12:21:23.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "1> Please note that it was working fine under Ti mobile 1.7.3\r\n\r\n2> My app uses a background service initialized in app.js:\r\n\r\nvar service = Ti.App.iOS.registerBackgroundService({\r\n url: 'background.js'\r\n});\r\n\r\nAnd in background.js, I launch local notifications when needed to alert user:\r\nvar notification = Ti.App.iOS.scheduleLocalNotification({...});\r\n\r\nWhen coming back to foreground, App is frozen and then crash.\r\n\r\n3>\r\nThe problem seems to be similar to http://developer.appcelerator.com/question/133472/sdk-182-localnotification-crash.\r\nand is very annoying...because at the present time, i have to remove localnotifications from app.", "attachment": [], "flagged": false, "summary": "iOS: scheduleLocalNotification crash app - Ti SDK - > 2.0", "creator": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 5\r\nTitanium SDK 2.0.1GA2 and 2.0.2GA", "comment": { "comments": [ { "id": "198198", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Jean-Sébastien,\r\n\r\nWould it be possible to provide a code sample that reproduces the bug?\r\n\r\nThanks,\r\nBetty", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T12:45:14.000+0000", "updated": "2012-06-12T12:45:14.000+0000" }, { "id": "198205", "author": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi, here is sample test code. \r\n\r\nI tested it. Notification is displayed then app frozes and crash.\r\n-> Sometimes, first time after being displayed and click \"display\" (app), it works then going background again crash the app.\r\n-> if you refuse to display app after notification then click on app icon, it crashes a few seconds after.\r\n\r\nThis bug leads to no possible notification information given to user about background processes (in my case, photo transfer to server when going to background mode)\r\n\r\nFiles: app.js & background.js\r\n\r\n*******************\r\n** app.js **\r\n*******************\r\n\r\nvar tabGroup = Ti.UI.createTabGroup();\r\nvar win1= Ti.UI.createWindow({\r\n title:\"Tab1\",\r\n url:'./win1.js'\r\n});\r\nvar tab1=Ti.UI.createTab({\r\n title:'Tab1',\r\n window: win1\r\n});\r\nvar win2= Ti.UI.createWindow({\r\n title:\"Tab2\",\r\n url:'./win1.js'\r\n});\r\nvar tab2=Ti.UI.createTab({\r\n title:'Tab2',\r\n window: win2\r\n});\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n\r\n// not written but first check if iOS>=4 before creating service\r\nvar service = Ti.App.iOS.registerBackgroundService({ url: 'background.js' });\r\n\r\n*******************\r\n** background.js **\r\n*******************\r\n\r\nvar notification = Ti.App.iOS.scheduleLocalNotification({\r\n alertBody:\"Hello notif\",\r\n date: new Date(new Date().getTime()+3000) // 3 seconds after backgrounding\r\n});\r\n\r\nThanks for working on this bug !\r\n", "updateAuthor": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-12T13:05:49.000+0000", "updated": "2012-06-12T13:05:49.000+0000" }, { "id": "198309", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can not reproduce the bug using Ti SDK 2.0.1GA2 and 2.0.2GA. Here is the code I used:\r\n\r\n{code}\r\n//app.js\r\n\r\nvar tabGroup = Ti.UI.createTabGroup();\r\nvar win1= Ti.UI.createWindow({ title:\"Tab1\" });\r\nvar tab1=Ti.UI.createTab({ title:'Tab1', window: win1 });\r\nvar win2= Ti.UI.createWindow({ title:\"Tab2\"});\r\nvar tab2=Ti.UI.createTab({ title:'Tab2', window: win2 });\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n\r\n// not written but first check if iOS>=4 before creating service\r\nvar service = Ti.App.iOS.registerBackgroundService({ url: 'background.js' });\r\n\r\n//background.js\r\n\r\nvar notification = Ti.App.iOS.scheduleLocalNotification({ alertBody:\"Hello notif\", date: new Date(new Date().getTime()+3000)});\r\n{code}", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T04:20:05.000+0000", "updated": "2012-06-13T04:20:05.000+0000" }, { "id": "198311", "author": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi,\r\n\r\nI used Mac OS X Lion - Ti Studio v 2.0.3.201206051048 - Ti Mobile up to 2.1.0.v20120510171759 (from 2.0.2.v20120505151714) (from builds.appcelerator.com.s3.amazonaws.com/index.html in branch master)\r\n\r\nWhere can i only upload Ti SDK 2.0.1GA2 and 2.0.2GA ?\r\n\r\nThanks", "updateAuthor": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-13T04:31:59.000+0000", "updated": "2012-06-13T04:31:59.000+0000" }, { "id": "198312", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The latest officially released SDK can be downloaded via Titanium Studio by going to help > check for Titanium SDK updates. I would recommend using only the SDK versions obtained this way as there is support provided for them.", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T04:47:21.000+0000", "updated": "2012-06-13T04:47:21.000+0000" }, { "id": "198313", "author": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "body": "When i do help > check for Titanium SDK updates, last Ti SDK update is not proposed that's why I asked.\r\n\r\nWhat is the alternative way to download it ?\r\n\r\nThanks", "updateAuthor": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-13T05:16:48.000+0000", "updated": "2012-06-13T05:16:48.000+0000" }, { "id": "198314", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Check if you already have the latest SDK. Titanium should automatically download the latest SDKs (guide: https://wiki.appcelerator.org/display/tis/Downloading+Titanium+SDKs+in+Titanium+Studio). Try to install the latest version of Studio from here: http://titanium-studio.s3.amazonaws.com/latest/Titanium_Studio.dmg.", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T05:27:11.000+0000", "updated": "2012-06-13T05:27:11.000+0000" }, { "id": "198316", "author": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "body": "Just to be sure.\r\n\r\nWhen app goes on background then open app, I click on tab 1 then tab2 then tab1 and app freezes and crash.\r\n\r\nYou dont get this behavior at all ?\r\n\r\nthanks.", "updateAuthor": { "name": "jsgalloo", "key": "jsgalloo", "displayName": "Jean-Sébastien GALLOO", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-13T07:29:58.000+0000", "updated": "2012-06-13T07:29:58.000+0000" }, { "id": "198336", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, doing this crashes the app.", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T11:09:25.000+0000", "updated": "2012-06-13T11:09:25.000+0000" }, { "id": "199048", "author": { "name": "shekyboy", "key": "shekyboy", "displayName": "Abhishek Tiwari", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am facing the same issue on my App. Local notifications are critical to my app and this issue has made this feature useless. I tried all the recommended remedies to no avail. Please treat this as Sev 1 and address it ASAP!! \r\n\r\nHere is a recommendation, which hasnt worked for me 1.8.2, 2.0.1.GA2 and 2.0.2", "updateAuthor": { "name": "shekyboy", "key": "shekyboy", "displayName": "Abhishek Tiwari", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-18T20:57:44.000+0000", "updated": "2012-06-18T20:57:44.000+0000" }, { "id": "199052", "author": { "name": "shekyboy", "key": "shekyboy", "displayName": "Abhishek Tiwari", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Betty,\r\n\r\nIn the background.js file, please put the following in a function\r\n\r\nvar notification = Ti.App.iOS.scheduleLocalNotification({ alertBody:\"Hello notif\", date: new Date(new Date().getTime()+3000)});\r\n\r\n\r\nThat will help you reproduce the issue each time.\r\n\r\nAbhishek", "updateAuthor": { "name": "shekyboy", "key": "shekyboy", "displayName": "Abhishek Tiwari", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-18T21:59:35.000+0000", "updated": "2012-06-18T21:59:35.000+0000" }, { "id": "199315", "author": { "name": "joscandreu", "key": "joscandreu", "displayName": "Jose Carlos Andreu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Appcelerator: Please resolve this issue ASAP, it's been there since 1.8.2 at least ( @jsgallo states it's even before) and it makes the app crash, which can lead to AppStore rejections.\r\n\r\nAfter struggling with this issue I found a workaround that has worked for me.\r\nUse this module: https://github.com/benbahrenburg/LocalNotify\r\n\r\nIt handles notifications in a different way and it even lets you check which ones are active and haven't been fired.", "updateAuthor": { "name": "joscandreu", "key": "joscandreu", "displayName": "Jose Carlos Andreu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-20T04:07:14.000+0000", "updated": "2012-06-20T04:07:14.000+0000" }, { "id": "199330", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We are looking at issue now.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-20T08:19:36.000+0000", "updated": "2012-06-20T08:19:36.000+0000" }, { "id": "199618", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Turns out I've [fixed|https://github.com/appcelerator/titanium_mobile/commit/2774f7e589dd237c04791b9edee4e47929eb977d] this when testing [PR #2383|https://github.com/appcelerator/titanium_mobile/pull/2383]. So huzzah, it's already in 2.1.0.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-21T12:20:11.000+0000", "updated": "2012-06-21T12:20:11.000+0000" }, { "id": "199619", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This was fixed in an earlier sprint, so will be in 2.1.0 despite being marked as sprint 13. See git history of linked bug.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-21T12:25:42.000+0000", "updated": "2012-06-21T12:25:42.000+0000" }, { "id": "199902", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Ti Studio build 2.1.0.201206221045\r\nTi Mobile SDK 2.1.0.v20120622174154 hash rdc9dfbe5\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T11:43:17.000+0000", "updated": "2012-06-23T11:43:17.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }