pantasystem / Milktea

Misskey, MastodonのAndroidクライアント「Milktea」のソースコード
GNU General Public License v3.0
257 stars 22 forks source link

投票周りの不具合が原因でタイムライン画面がクラッシュする不具合 #1888

Open pantasystem opened 1 year ago

pantasystem commented 1 year ago

該当箇所をコメントアウトすることで応急定期に対応したが、抜本的な解決はできていない。

Fatal Exception: java.lang.NullPointerException: Missing required view with ID: jp.panta.misskeyandroidclient:id/progressBar
       at net.pantasystem.milktea.note.databinding.ItemChoiceBinding.bind(ItemChoiceBinding.java:1)
       at net.pantasystem.milktea.note.poll.PollListLinearLayoutBinder.bindPollChoices(PollListLinearLayoutBinder.java:79)
       at net.pantasystem.milktea.note.poll.PollHelper.bindPollChoices(PollHelper.java:79)
       at net.pantasystem.milktea.note.databinding.ItemSimpleNoteBindingImpl.executeBindings(ItemSimpleNoteBindingImpl.java:2736)
       at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:43)
       at androidx.databinding.ViewDataBinding.executeBindingsOn(ViewDataBinding.java)
       at net.pantasystem.milktea.note.databinding.ItemNoteBindingImpl.executeBindings(ItemNoteBindingImpl.java:197)
       at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:43)
       at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:4)
       at net.pantasystem.milktea.note.timeline.TimelineListAdapter$NoteViewHolderBase.bind(TimelineListAdapter.java:110)
       at net.pantasystem.milktea.note.timeline.TimelineListAdapter.onBindViewHolder(TimelineListAdapter.java:110)
       at net.pantasystem.milktea.note.timeline.TimelineListAdapter.onBindViewHolder(TimelineListAdapter.java:110)
       at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:1554)
       at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:1554)
       at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:1554)
       at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:1554)
       at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:46)
       at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:174)
       at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:174)
       at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:174)
       at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:74)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:346)
       at android.os.Looper.loop(Looper.java:475)
       at android.app.ActivityThread.main(ActivityThread.java:7950)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
pantasystem commented 1 year ago

おそらく投票の集計を表示するようになった結果 複数のViewをViewGroupにinflateすることになり、 既存の投票のProgressをうまくBindすることができなくなったのが原因と思われます。

pantasystem commented 1 year ago

現状投票の集計結果の表示は無効にしています。