[Galaxy S III Q&A, Help & Troubleshooting] PierreTW:
[Q] Calendar apps keep crashing, saying "SQLiteException: no such column: setLunar"

Hi guys!

I recently upgraded my Samsung Galaxy S3 to Jelly Bean 4.1.1.

Now I have the stock ROM, with Auto CF-Root, and Triangle Away, so that Samsung sees it as a genuine Stock ROM.

Since then, I have a problem with Calendar application. The sCloudSync and sPlanner softwares from Samsung kept crashing, so I tried installing Google Calendar, but this one crashes as well!

So I plugged my phone and checked the logs, and here is what I find:

11-28 17:45:24.330: E/Trace(13008): error opening trace file: No such file or directory (2)
11-28 17:45:24.515: E/SQLiteLog(12003): (1) no such column: setLunar
11-28 17:45:24.520: E/DatabaseUtils(12003): Writing exception to parcel
11-28 17:45:24.520: E/DatabaseUtils(12003): android.database.sqlite.SQLiteException: no such column: setLunar (code 1): , while compiling: SELECT _id, _sync_id, eventStatus, dtstart, dtend, eventTimezone, rrule, rdate, exrule, exdate, duration, allDay, original_sync_id, originalInstanceTime, calendar_id, deleted, facebook_schedule_id, setLunar FROM view_events WHERE (((dtstart <= ? AND (lastDate IS NULL OR lastDate >= ?)) OR (originalInstanceTime IS NOT NULL AND originalInstanceTime <= ? AND originalInstanceTime >= ?)) AND (sync_events != ?) AND (lastSynced = ?))
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1011)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:622)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:400)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at com.android.providers.calendar.CalendarInstancesHelper.getEntries(CalendarInstancesHelper.java:657)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at com.android.providers.calendar.CalendarInstancesHelper.expandInstanceRangeLocked(CalendarInstancesHelper.java:604)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at com.android.providers.calendar.CalendarProvider2.acquireInstanceRangeLocked(CalendarProvider2.java:1812)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at com.android.providers.calendar.CalendarProvider2.acquireInstanceRange(CalendarProvider2.java:1735)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at com.android.providers.calendar.CalendarProvider2.handleInstanceQuery(CalendarProvider2.java:1488)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:987)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.content.ContentProvider.query(ContentProvider.java:652)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.content.ContentProvider$Transport.query(ContentProvider.java:189)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:113)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at android.os.Binder.execTransact(Binder.java:367)
11-28 17:45:24.520: E/DatabaseUtils(12003):	at dalvik.system.NativeStart.run(Native Method)
11-28 17:45:24.520: E/AndroidRuntime(13008): FATAL EXCEPTION: Thread-566
11-28 17:45:24.520: E/AndroidRuntime(13008): android.database.sqlite.SQLiteException: no such column: setLunar (code 1): , while compiling: SELECT _id, _sync_id, eventStatus, dtstart, dtend, eventTimezone, rrule, rdate, exrule, exdate, duration, allDay, original_sync_id, originalInstanceTime, calendar_id, deleted, facebook_schedule_id, setLunar FROM view_events WHERE (((dtstart <= ? AND (lastDate IS NULL OR lastDate >= ?)) OR (originalInstanceTime IS NOT NULL AND originalInstanceTime <= ? AND originalInstanceTime >= ?)) AND (sync_events != ?) AND (lastSynced = ?))
11-28 17:45:24.520: E/AndroidRuntime(13008):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:184)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at android.content.ContentResolver.query(ContentResolver.java:372)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at android.content.ContentResolver.query(ContentResolver.java:315)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at com.android.calendar.Event.instancesQuery(Event.java:328)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at com.android.calendar.Event.loadEvents(Event.java:261)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at com.android.calendar.EventLoader$LoadEventsRequest.processRequest(EventLoader.java:144)
11-28 17:45:24.520: E/AndroidRuntime(13008):	at com.android.calendar.EventLoader$LoaderThread.run(EventLoader.java:201)
11-28 17:45:24.575: E/android.os.Debug(2269): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error

What I understand is there is a missing column in a SQLite Database (android.database.sqlite.SQLiteException: no such column: setLunar), and because of that the application crashes.

Am I the only one experiencing this?

How can I force the re-creation of these Database? Maybe it is using a database with an old format (from my 4.0.4 ICS?)

I tried going in the Application Manager and clearing the data for these applications, and of course I tried de-installing and re-installing Google Clandar, but nothing works...

Thanks in advance for your help!!