{ "id": "171358", "key": "TIMOB-25888", "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": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-04-20T21:42:51.000+0000", "created": "2018-03-20T08:47:26.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2018-06-22T16:33:25.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": "On Android 8 with Titanium 7.1.0.GA the app crahses when calling getEventsBetweenDates(). With SDK 7.0.2.GA everything is okay.\r\n\r\nThis is the log I see after calling getEventsBetweenDates():\r\n\r\n{code}\r\n[WARN] W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference\r\n[WARN] W/System.err: \tat ti.modules.titanium.calendar.RecurrenceRuleProxy.fillFrequencyFields(RecurrenceRuleProxy.java:233)\r\n[WARN] W/System.err: \tat ti.modules.titanium.calendar.RecurrenceRuleProxy.(RecurrenceRuleProxy.java:189)\r\n[WARN] W/System.err: \tat ti.modules.titanium.calendar.EventProxy.setRecurrenceRules(EventProxy.java:499)\r\n[WARN] W/System.err: \tat ti.modules.titanium.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:133)\r\n[WARN] W/System.err: \tat ti.modules.titanium.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:272)\r\n[WARN] W/System.err: \tat ti.modules.titanium.calendar.CalendarProxy.getEventsBetweenDates(CalendarProxy.java:187)\r\n[WARN] W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)\r\n[WARN] W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:962)\r\n[WARN] W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1186)\r\n[WARN] W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:394)\r\n[WARN] W/System.err: \tat ti.modules.titanium.ui.PickerProxy.handleMessage(PickerProxy.java:351)\r\n[WARN] W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:101)\r\n[WARN] W/System.err: \tat android.os.Looper.loop(Looper.java:164)\r\n[WARN] W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:6541)\r\n[WARN] W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] W/System.err: \tat com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)\r\n[WARN] W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: getEventsBetweenDates() crashes", "creator": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 7.1.0.GA\r\nMac OS High Sierra, 64bit\r\nNode 8.9.1\r\nAndroid", "comment": { "comments": [ { "id": "435753", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~michielve], Thanks for sharing with us. Please create a full reproducible test code and provide here for us to test the issue. Also, provide detail affected environment. Thanks.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-03-20T09:06:49.000+0000", "updated": "2018-03-20T09:06:49.000+0000" }, { "id": "435758", "author": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "body": "No problem - *I see that this bug only happens with events that are repeated weekly*!.\r\n\r\n{code:javascript}\r\nvar calendarName = \"Name of calendar that has weekly repeated events\";\r\n\r\nfunction doClick(e) {\r\n\tif (!Ti.Calendar.hasCalendarPermissions()) {\r\n\t\tTi.Calendar.requestCalendarPermissions(function(args) {\r\n\t\t\tif (args.success) {\r\n\t\t\t\tshowCalendars();\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowCalendars();\r\n\t}\r\n}\r\n\r\nfunction showCalendars() {\r\n\tconsole.log(\"In showCalendars\");\r\n\tvar calendars = Ti.Calendar.allCalendars;\r\n\tfor (var i = 0; i < calendars.length; i++) {\r\n\t\tvar cal = calendars[i];\r\n\t\tif (cal.name === calendarName) {\r\n\t\t\tconsole.log(\"Try to show weekly events from calendar \" + calendarName);\r\n\t\t\tvar now = new Date();\r\n\t\t\ttry {\r\n\t\t\t\tvar events = cal.getEventsBetweenDates(new Date(now.getFullYear() - 1, now.getMonth(), now.getDate()), now);\r\n\t\t\t\tconsole.log(\"I have \" + events.length + \" events\");\r\n\t\t\t\tevents.forEach(function(event) {\r\n\t\t\t\t\tconsole.log(\"Event \" + event.title);\r\n\t\t\t\t});\r\n\t\t\t} catch (ex) {\r\n\t\t\t\tconsole.error(ex);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n{code}", "updateAuthor": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-20T12:52:17.000+0000", "updated": "2018-03-20T12:52:51.000+0000" }, { "id": "435765", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "Thank you! I was able to reproduce the issue.", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-03-20T16:28:04.000+0000", "updated": "2018-03-20T16:28:04.000+0000" }, { "id": "435767", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9949", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-03-20T16:47:07.000+0000", "updated": "2018-03-20T16:47:07.000+0000" }, { "id": "437049", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. PR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-20T21:42:46.000+0000", "updated": "2018-04-20T21:42:46.000+0000" }, { "id": "438641", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.3.0.v20180618182516.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-06-22T16:33:17.000+0000", "updated": "2018-06-22T16:33:17.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }