[TIMOB-8053] Android: Calendar crashes on ICS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-12-10T22:16:35.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 3.0.0 |
Fix Version/s | Sprint 2012-17 API, Release 3.0.0 |
Components | Android |
Labels | api, module_calendar, qe-port, qe-testadded, triage |
Reporter | Opie Cyrus |
Assignee | Hieu Pham |
Created | 2012-03-16T11:16:49.000+0000 |
Updated | 2013-09-25T09:08:16.000+0000 |
Description
How to reproduce:
1. Run this code on 4.0+ device
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Calendar',
backgroundColor:'#fff'
});
win.open();
function showCalendars(calendars) {
for (var i = 0; i < calendars.length; i++) {
Ti.API.info(calendars[i].name);
Ti.API.info(JSON.stringify(calendars[i]));
}
}
Ti.API.info('ALL CALENDARS:');
showCalendars(Ti.Android.Calendar.allCalendars);
Ti.API.info('SELECTABLE CALENDARS:');
showCalendars(Ti.Android.Calendar.selectableCalendars);
// SHOW ALL EVENTS FOR 2010 FOR ONE CALENDAR
var YEAR = 2012;
var TEST_WITH_THIS_CAL_ID = 1;
var calendar = Ti.Android.Calendar.getCalendarById(TEST_WITH_THIS_CAL_ID);
var events = calendar.getEventsInYear(YEAR);
if (events && events.length) {
Ti.API.info(events.length + ' event(s) in ' + YEAR);
for (var i = 0; i < events.length; i++) {
Ti.API.info(JSON.stringify(events[i]));
}
} else {
Ti.API.info('No events');
}
var CALENDAR_TO_USE = 1;
var calendar = Ti.Android.Calendar.getCalendarById(CALENDAR_TO_USE);
// Create the event
var eventBegins = new Date(2012, 03, 26, 12, 0, 0);
var eventEnds = new Date(2012, 03, 26, 14, 0, 0);
var details = {
title: 'Do some stuff',
description: "I'm going to do some stuff at this time.",
begin: eventBegins,
end: eventEnds
};
var event = calendar.createEvent(details);
// Now add a reminder via e-mail for 10 minutes before the event.
var reminderDetails = {
minutes: 10,
method: Ti.Android.Calendar.METHOD_EMAIL
};
event.createReminder(reminderDetails);
2. Observe crash. App should not crash
P.S: Permissions should be specify manually as there are no permission mappings for calendar at the moment.
more data of this, if it helps HTC One V with android 4.0.3 ~~~ 07-09 16:20:05.284: E/TiAPI(12548): ================================================== 07-09 16:20:05.284: E/Proxy(12548): Unable to lookup Proxy.prototype.getProperty 07-09 16:20:05.284: E/Proxy(12548): Unable to lookup Proxy.prototype.getProperty 07-09 16:20:05.284: I/TiAPI(12548): [{"hidden":false,"selected":true,"name":"PC Sync","id":"1"},{"hidden":false,"selected":true,"name":"People","id":"3"}] 07-09 16:20:05.284: E/TiAPI(12548): ================================================== 07-09 16:20:05.284: E/TiAPI(12548): ================================================== 07-09 16:20:05.284: E/Proxy(12548): Unable to lookup Proxy.prototype.getProperty 07-09 16:20:05.284: I/TiAPI(12548): {"hidden":false,"selected":true,"name":"PC Sync","id":"1"} 07-09 16:20:05.284: E/TiAPI(12548): ================================================== 07-09 16:20:05.295: D/dalvikvm(1833): GC_EXPLICIT freed 3K, 29% free 3422K/4771K, paused 2ms+9ms 07-09 16:20:05.295: I/XT9_C(1833): [T9_ReleaseBuffer] Release memory of LDB#0 07-09 16:20:05.315: D/memalloc(1833): /dev/pmem: Unmapping buffer base:0x527ab000 size:8355840 offset:7557120 07-09 16:20:05.345: D/TitaniumTableViewItem(12548): (main) [157,64656] Row content measure (322x39) 07-09 16:20:05.355: D/TitaniumTableViewItem(12548): (main) [2,64658] Row content measure (322x39) 07-09 16:20:05.365: D/TitaniumTableViewItem(12548): (main) [10,64668] Row content measure (322x39) 07-09 16:20:05.395: D/TiUIView(12548): (main) [32,64700] TAP, TAP, TAP on ti.modules.titanium.ui.ButtonProxy@40f145f8 07-09 16:20:05.395: E/DatabaseUtils(10724): Writing exception to parcel 07-09 16:20:05.395: E/DatabaseUtils(10724): java.lang.IllegalArgumentException: Invalid column visibility 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.database.sqlite.SQLiteQueryBuilder.computeProjection(SQLiteQueryBuilder.java:628) 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.database.sqlite.SQLiteQueryBuilder.buildQuery(SQLiteQueryBuilder.java:424) 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:368) 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:312) 07-09 16:20:05.395: E/DatabaseUtils(10724): at com.android.providers.calendar.CalendarProvider2.handleInstanceQuery(CalendarProvider2.java:1235) 07-09 16:20:05.395: E/DatabaseUtils(10724): at com.android.providers.calendar.HtcFilterImpl_google.do_Query_INSTANCES(HtcFilterImpl_google.java:298) 07-09 16:20:05.395: E/DatabaseUtils(10724): at com.android.providers.calendar.HtcFilterImpl_google.handle_Query(HtcFilterImpl_google.java:53) 07-09 16:20:05.395: E/DatabaseUtils(10724): at com.android.providers.calendar.HtcCalendarProvider.query(HtcCalendarProvider.java:117) 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.content.ContentProvider$Transport.query(ContentProvider.java:189) 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:141) 07-09 16:20:05.395: E/DatabaseUtils(10724): at android.os.Binder.execTransact(Binder.java:338) 07-09 16:20:05.395: E/DatabaseUtils(10724): at dalvik.system.NativeStart.run(Native Method) 07-09 16:20:05.405: W/System.err(12548): java.lang.IllegalArgumentException: Invalid column visibility 07-09 16:20:05.405: W/System.err(12548): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:165) 07-09 16:20:05.405: W/System.err(12548): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135) 07-09 16:20:05.405: W/System.err(12548): at android.content.ContentProviderProxy.query(ContentProviderNative.java:406) 07-09 16:20:05.405: W/System.err(12548): at android.content.ContentResolver.query(ContentResolver.java:315) 07-09 16:20:05.415: W/System.err(12548): at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:82) 07-09 16:20:05.415: W/System.err(12548): at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:216) 07-09 16:20:05.415: W/System.err(12548): at ti.modules.titanium.android.calendar.CalendarProxy.getEventsBetweenDates(CalendarProxy.java:157) 07-09 16:20:05.415: W/System.err(12548): at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) 07-09 16:20:05.415: W/System.err(12548): at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60) 07-09 16:20:05.425: W/System.err(12548): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:629) 07-09 16:20:05.425: W/System.err(12548): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:822) 07-09 16:20:05.425: W/System.err(12548): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:306) 07-09 16:20:05.425: W/System.err(12548): at android.os.Handler.dispatchMessage(Handler.java:95) 07-09 16:20:05.435: W/System.err(12548): at android.os.Looper.loop(Looper.java:154) 07-09 16:20:05.435: W/System.err(12548): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104) 07-09 16:20:05.465: E/TiJSError(12548): (main) [69,64769] ----- Titanium Javascript Runtime Error ----- 07-09 16:20:05.465: E/TiJSError(12548): (main) [0,64769] - In helpers/calendar_helper.js:81,35 07-09 16:20:05.465: E/TiJSError(12548): (main) [0,64769] - Message: Uncaught Error: Invalid column visibility 07-09 16:20:05.465: E/TiJSError(12548): (main) [0,64769] - Source: var cal_events = calendars[i].getEventsBetweenDates(startDate,endDate); 07-09 16:20:05.505: E/V8Exception(12548): Exception occurred at helpers/calendar_helper.js:81: Uncaught Error: Invalid column visibility ~~~
HD Ticket: appc.me/c/APP-631725
Any news on this? At least an workaround? Thank you.
Guys, 'Calendar currently does not work on ICS' is not a 'New Feature'. This would be a bug as Calendar WAS working, stopped working with ICS. ICS is rolling out on nearly all the new phones, leaving many of us without Cal support.
Stephen - I agree with your comments. I have converted this to a bug and we will fix it for the next release.
This issue exists on 2.0.3 as well, getting Runtime error "Uncaught Error: Invalid column visibility". Tested on: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK, build: 2.0.3.v20120806151610 Devices: Nexus 7 (4.1); Galaxy Nexus (4.0.4)
Shouldn't this be fixed? We need reliable estimations for fixes otherwise we can not give an estimation to our customers which is really... well necessary if we want to work with your products... anyway: Any updates on this? Any new estimations?
@Florian - This bug is scheduled to be fixed for the next release (2.2.0).
@Neeraj could I ask when is 2.2.0 scheduled to be released? I was testing with the latests 2.2.0 CI and is still present. Thank you.
@Dan - 2.2.0 is tentatively scheduled for the October. We do plan to get this particular issue fixed in next week or two.
@Neeraj Thank you
Thank you, I tested on 2.3.7, 3.2, 4.0.3 and looks that is working ok :)
Can still reproduce this issue with 3.0.0.v20121204144658 with Motorola zoom 4.0.3 Permission Denial error
Need to generate permission. Can be included manually tight now but TIMOB-10540 is the ticket to generate them automatically.
Tested with latest 3.0.X as a sanity check, it works fine when permission is included. Re-closing.
It worked without error when permission added to tiapp.xmls manually. Titanium SDK:3.0.0.v20121212184921 Titanium Studio:3.0.0.201212071410 Device:HTC Desire V Android 4.0.3