Open avary opened 3 years ago
i have traced the bug here https://github.com/grishka/Houseclub/commit/524b6a9ab851497099bbf43f3290fea8af985105
file Houseclub/src/main/java/me/grishka/houseclub/fragments/NotificationListFragment.java line 133, i think it is related to "50" which is set in line 40 and 72. after iterating 50 times it crash..
I fixed it here: 1a923ddcac9715778de030b7af5fc024633962d6
thanks, it worked, but caught another bug, if in the notification list a user name as 'someone', when click it also crashes.
Describe the bug opening notification list crash the app
To Reproduce Steps to reproduce the behavior:
logcat shows following error
03-01 02:14:34.982 16777 16777 E AndroidRuntime: FATAL EXCEPTION: main 03-01 02:14:34.982 16777 16777 E AndroidRuntime: Process: me.grishka.houseclub, PID: 16777 03-01 02:14:34.982 16777 16777 E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'java.lang.String me.grishka.houseclub.api.model.User.name' on a null object reference 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at me.grishka.houseclub.fragments.NotificationListFragment$NotificationViewHolder.onBind(NotificationListFragment.java:131) 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at me.grishka.houseclub.fragments.NotificationListFragment$NotificationViewHolder.onBind(NotificationListFragment.java:112) 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at me.grishka.appkit.utils.BindableViewHolder.bind(BindableViewHolder.java:33) 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at me.grishka.houseclub.fragments.NotificationListFragment$NotificationListAdapter.onBindViewHolder(NotificationListFragment.java:93) 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at me.grishka.houseclub.fragments.NotificationListFragment$NotificationListAdapter.onBindViewHolder(NotificationListFragment.java:83) 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at me.grishka.appkit.views.UsableRecyclerView$FooterRecyclerAdapter.onBindViewHolder(UsableRecyclerView.java:478) 03-01 02:14:34.982 16777 16777 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7038)
Expected behavior should show list of notification or blank screen Screenshots
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.