WindSekirun / NaraeImagePicker

MultiImagePicker for Android Application, written in Kotlin
Apache License 2.0
40 stars 14 forks source link

NullPointerException on sort() #26

Closed fabdurso closed 4 years ago

fabdurso commented 4 years ago

I'm experiencing this crash on my app. Version: 2.0.6.

  at java.util.ComparableTimSort.countRunAndMakeAscending (ComparableTimSort.java:320)

  at java.util.ComparableTimSort.sort (ComparableTimSort.java:188)

  at java.util.Arrays.sort (Arrays.java:1302)

  at java.util.Arrays.sort (Arrays.java:1485)

  at java.util.ArrayList.sort (ArrayList.java:1470)

  at java.util.Collections.sort (Collections.java:206)

  at java.util.Collections.sort (Collections.java:159)

  at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sort (MutableCollectionsJVM.kt:31)

  at com.github.windsekirun.naraeimagepicker.module.PickerSet.loadImageFirst (PickerSet.kt:53)

  at com.github.windsekirun.naraeimagepicker.fragment.FolderFragment$onViewCreated$1.invoke (FolderFragment.kt:35)

  at com.github.windsekirun.naraeimagepicker.fragment.FolderFragment$onViewCreated$1.invoke (FolderFragment.kt:21)

Thanks for the amazing job!

fabdurso commented 4 years ago

@WindSekirun @deepakkumardk any suggestion?

deepakkumardk commented 4 years ago

@thefabbulus You must have some null element in the titleItemSet list, try to debug that list and see if this is happening. As this is the only case when ComparableTimSort breaks as mentioned here, here & here Hope this helps.