XF (Android) - Fatal exception/NullPointerException

4 posts, 0 answers
  1. Yordan
    Yordan avatar
    14 posts
    Member since:
    Jan 2013

    Posted 14 Dec 2015 Link to this post

     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

  2. Yordan
    Yordan avatar
    14 posts
    Member since:
    Jan 2013

    Posted 14 Dec 2015 Link to this post

    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. :)
  3. DevCraft banner
  4. Yordan
    Yordan avatar
    14 posts
    Member since:
    Jan 2013

    Posted 14 Dec 2015 Link to this post

    I have reported this as bug to the Support Team.
  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 15 Dec 2015 Link to this post

    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
Back to Top
DevCraft banner