KotlinNullPointerException
See original GitHub issueHi, thank’s for great lib. However, I faced the issue: crash when first open a fragment with calendar view. It happened once, and I think the problem is in using unsafe (!!) call.
kotlin.KotlinNullPointerException
at com.kizitonwose.calendarview.ui.MonthViewHolder.bindMonth(MonthViewHolder.kt:39)
at com.kizitonwose.calendarview.ui.CalendarAdapter.onBindViewHolder(CalendarAdapter.kt:144)
at com.kizitonwose.calendarview.ui.CalendarAdapter.onBindViewHolder(CalendarAdapter.kt:27)
at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7033)
at com.kizitonwose.calendarview.ui.CalendarAdapter.onBindViewHolder(CalendarAdapter.kt:135)
at com.kizitonwose.calendarview.ui.CalendarAdapter.onBindViewHolder(CalendarAdapter.kt:27)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7075)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5991)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6258)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6097)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6093)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4115)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3832)
at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4385)
at android.view.View.layout(View.java:20715)
at android.view.ViewGroup.layout(ViewGroup.java:6202)
at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1915)
at android.view.View.layout(View.java:20715)
at android.view.ViewGroup.layout(ViewGroup.java:6202)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20715)
at android.view.ViewGroup.layout(ViewGroup.java:6202)
at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:444)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Kotlin - why do I get a KotlinNullPointerException
Starting from Kotlin 1.4, the exception will be NullPointerException instead (a different type), see here. So if any code catches explicitly ...
Read more >KotlinNullPointerException - Kotlin Programming Language
Returns an array of stack trace elements representing the stack trace pertaining to this throwable. val Throwable.stackTrace: Array<StackTraceElement> ...
Read more >build failed with kotlin.KotlinNullPointerException
Solved: I get this issue after an update followed by a rollback against the Gradle version. Background: Bamboo builds with Docker run tasks....
Read more >java.lang.NullPointerException is thrown instead of kotlin ...
NullPointerException is thrown instead of kotlin.KotlinNullPointerException in not-null assertions. Duplicates 1. Duplicates 1 issue (0 unresolved).
Read more >internal error (Caused by: kotlin.KotlinNullPointerException) #23
I got kotlin.KotlinNullPointerException when try to debug. The error seems to be caused by JDILauncher.createLaunchArgs The full error log: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is the initialization:
Is it correct?
Yes, I guess