Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to invoke virtual method ...getAndroidCalendarUri() on on a null object reference #253

Open
flooose opened this issue May 26, 2016 · 4 comments

Comments

@flooose
Copy link

flooose commented May 26, 2016

I'm getting the following error when I run CaldavSyncAdapter on my cyanogenmod:

java.lang.NullPointerException: Attempt to invoke virtual method
'android.net.Uri org.gege.caldavsyncadapter.caldav.entities.DavCalendar.getAndroidCalendarUri()'
on a null object reference
at org.gege.caldavsyncadapter.caldav.entities.DavCalendar.createNewAndroidCalendar(DavCalendar.java:426)
at org.gege.caldavsyncadapter.caldav.entities.DavCalendar.checkAndroidCalendarList(DavCalendar.java:295)
at org.gege.caldavsyncadapter.syncadapter.SyncAdapter.onPerformSync(SyncAdapter.java:158)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
u

It seems like the Result instance is never instantiated, but I can't figure out why.

When I run the application in an emulator, I have no problems. The main differences between the emulator and the real device are that the emulator is running "normal" android and the aosp calendar app, while the real device is running cyanogenmod with the closed source calendar app shipped with opengapps.

Unfortunately, I haven't been able to get the debugger to stop at or near the place where the exception occurs, so I can't tell you more. Could this have to do with the fact that this isn't a normal app? If you give me some feedback in this regard, I'd be happy to explore it some more.

@daibutsunet
Copy link

@daibutsunet
Copy link

Sorry, the above link reads ok, but points to nowhere. Couldn't find out in a rush how to place a link here which reads and works correctly, so just follow it manually ...

@brianjmurrell
Copy link

I too seem to be getting this now:

05-03 16:46:18.723  8088  8107 E SyncAdapter: Updating calendar exception java.lang.NullPointerException
05-03 16:46:18.723  8088  8107 E SyncAdapter: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri org.gege.caldavsyncadapter.caldav.entities.DavCalendar.getAndroidCalendarUri()' on a null object reference
05-03 16:46:18.723  8088  8107 E SyncAdapter: 	at org.gege.caldavsyncadapter.caldav.entities.DavCalendar.createNewAndroidCalendar(DavCalendar.java:426)
05-03 16:46:18.723  8088  8107 E SyncAdapter: 	at org.gege.caldavsyncadapter.caldav.entities.DavCalendar.checkAndroidCalendarList(DavCalendar.java:295)
05-03 16:46:18.723  8088  8107 E SyncAdapter: 	at org.gege.caldavsyncadapter.syncadapter.SyncAdapter.onPerformSync(SyncAdapter.java:158)
05-03 16:46:18.723  8088  8107 E SyncAdapter: 	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)

Is there still no idea why this is happening?

Personally I suspect some kind of bad/improperly-handled data in the calendar data coming from the calendar server. In this case it's owncloud. But this only happens to one user so I don't think it's a general owncloud problem but rather some data in a particular user's calendar.

@brianjmurrell
Copy link

Personally I suspect some kind of bad/improperly-handled data

Maybe not. :-( Even with only a single calendar, empty, I get this issue, for (only) this one user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants