This is a migrated thread and some comments may be shown as answers.
XF (Android) - Fatal exception/NullPointerException
3 Answers 22 Views
This is a migrated thread and some comments may be shown as answers.
Yordan
Top achievements
Rank 1
Yordan asked on 14 Dec 2015, 11:09 AM

 Hello,

I am using the Calendar widget to write an Android app using Xamarin.Forms. I have a page which content is only a RadCalendar. The page crashes sometimes and I still can't investigate the specific situation. So far, I found out that the page crashes when I have some Appointments for the current month (which is also the month which the Calendar starts showing initially). The stack trace is as follows:

12-14 11:18:14.908 E/AndroidRuntime( 4971): FATAL EXCEPTION: main
12-14 11:18:14.908 E/AndroidRuntime( 4971): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.events.EventRenderer.drawEventsInModeShapeAndText(EventRenderer.java:207)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.events.EventRenderer.renderEvents(EventRenderer.java:56)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.CalendarDayCell.drawEvents(CalendarDayCell.java:397)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.CalendarDayCell.render(CalendarDayCell.java:284)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.CalendarRow.render(CalendarRow.java:103)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.CalendarFragment.drawRows(CalendarFragment.java:518)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.CalendarFragment.render(CalendarFragment.java:243)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at com.telerik.widget.calendar.CalendarScrollManager$FragmentHolder$LayerView.onDraw(CalendarScrollManager.java:134)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:15199)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14133)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3394)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3373)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14093)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14128)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:15202)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14133)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14128)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14128)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14128)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:15202)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14133)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14128)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1229)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:15202)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14133)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.java:14156)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.draw(View.java:14923)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.updateDisplayListIfDirty(View.java:14128)
12-14 11:18:14.908 E/AndroidRuntime( 4971): at android.view.View.getDisplayList(View.ja

I can't however reproduce the issue on the Sample app (SDK Browser).

If I found out more, I will post it below.

My info:
OS: Windows 10
IDE: Visual studio Premium 2013 version 12.0.40629.00 update 5
Xamarin SDK: 4.0.0.1717
Xamarin.Android: 6.0.0.35
Telerik for Xamarin version: 2015.3.1202.200

3 Answers, 1 is accepted

Sort by
0
Yordan
Top achievements
Rank 1
answered on 14 Dec 2015, 11:21 AM
I have just found out that the reason for this to happen is because I have an Appointment with a null value for the Title property.

Maybe a check for null will be smart here. :)
0
Yordan
Top achievements
Rank 1
answered on 14 Dec 2015, 12:44 PM
I have reported this as bug to the Support Team.
0
Rosy Topchiyska
Telerik team
answered on 15 Dec 2015, 11:18 AM
Hello Yordan,

Thank you for reporting this issue. It will be fixed in the next official release, which is planned for mid-January.

Regards,
Rosy Topchiyska
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Yordan
Top achievements
Rank 1
Answers by
Yordan
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Share this question
or