Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8053] Android: Calendar crashes on ICS

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-10T22:16:35.000+0000
Affected Version/sRelease 1.8.0.1, Release 3.0.0
Fix Version/sSprint 2012-17 API, Release 3.0.0
ComponentsAndroid
Labelsapi, module_calendar, qe-port, qe-testadded, triage
ReporterOpie Cyrus
AssigneeHieu Pham
Created2012-03-16T11:16:49.000+0000
Updated2013-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.

Comments

  1. Dan Tamas 2012-07-09

    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 ~~~
  2. Anirudh Nagesh 2012-07-10

    HD Ticket: appc.me/c/APP-631725
  3. Dan Tamas 2012-08-02

    Any news on this? At least an workaround? Thank you.
  4. Stephen Feather 2012-08-02

    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.
  5. Neeraj Gupta 2012-08-02

    Stephen - I agree with your comments. I have converted this to a bug and we will fix it for the next release.
  6. Tamila Smolich 2012-08-09

    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)
  7. florian bergmann 2012-08-20

    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?
  8. Neeraj Gupta 2012-08-20

    @Florian - This bug is scheduled to be fixed for the next release (2.2.0).
  9. Dan Tamas 2012-08-21

    @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.
  10. Neeraj Gupta 2012-08-21

    @Dan - 2.2.0 is tentatively scheduled for the October. We do plan to get this particular issue fixed in next week or two.
  11. Dan Tamas 2012-08-21

    @Neeraj Thank you
  12. Dan Tamas 2012-08-24

    Thank you, I tested on 2.3.7, 3.2, 4.0.3 and looks that is working ok :)
  13. Natalie Huynh 2012-12-05

    Can still reproduce this issue with 3.0.0.v20121204144658 with Motorola zoom 4.0.3 Permission Denial error
  14. Vishal Duggal 2012-12-10

    Need to generate permission. Can be included manually tight now but TIMOB-10540 is the ticket to generate them automatically.
  15. Hieu Pham 2012-12-10

    Tested with latest 3.0.X as a sanity check, it works fine when permission is included. Re-closing.
  16. Shyam Bhadauria 2012-12-14

    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

JSON Source