ifgarces / TomaRamosUandes_android

Simulador/planificador no oficial para la toma de ramos de la Universidad de los Andes, Chile
https://bit.ly/TomadorRamosUandes
MIT License
0 stars 0 forks source link

Crash sometimes when deleting an inscribed `Ramo` #11

Closed ifgarces closed 2 years ago

ifgarces commented 3 years ago
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionCatalogVH{5fb382f position=4 id=-1, oldPos=4, pLpos:-1 scrap [attachedScrap] tmpDetached no parent} androidx.recyclerview.widget.RecyclerView{71079e5 VFED.V... ......I. 33,117-1047,1249 #7f0a00d1 app:id/home_ramosRecycler}, adapter:com.ifgarces.tomaramosuandes.adapters.CatalogRamosAdapter@345dcba, layout:androidx.recyclerview.widget.LinearLayoutManager@fdbd76b, context:com.ifgarces.tomaramosuandes.HomeActivity@b04dc96

Sadly, there's not much clue of the exact reason of the error in the code. I don't even know how to make a try-catch for it.

ifgarces commented 3 years ago

Update: it has to do with the fact that, after dismissing RamoDialogFragment from HomeActivity, onResume method is not executed. I need to notify the activity from the dialog it has to update the recycler.