stefan-niedermann / nextcloud-deck

πŸ“‹ Android client for nextcloud deck app
https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play
GNU General Public License v3.0
495 stars 53 forks source link

A crash in attachments window #599

Closed cab404 closed 4 years ago

cab404 commented 4 years ago

To Reproduce Steps to reproduce the behavior:

  1. Card β†’ Attachments
  2. Add an 4K image attachment.
  3. Click refresh circle on the bottom right
App Version: 1.5.6
App Version Code: 1005006
App Flavor: fdroid

Files App Version Code: com.nextcloud.client

---

OS Version: 4.14.117-perf+(V11.0.16.0.QFQMIXM)
OS API Level: 29
Device: laurel_sprout
Manufacturer: Xiaomi
Model (and Product): Mi A3 (laurel_sprout)

---

java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
    at it.niedermann.nextcloud.deck.ui.attachments.AttachmentAdapter.onBindViewHolder(AttachmentAdapter.java:55)
    at it.niedermann.nextcloud.deck.ui.attachments.AttachmentAdapter.onBindViewHolder(AttachmentAdapter.java:29)
    at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
    at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
    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:4134)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
    at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at androidx.viewpager2.widget.ViewPager2.onLayout(ViewPager2.java:527)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at com.android.internal.policy.DecorView.onLayout(DecorView.java:779)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3081)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2591)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1722)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7605)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
    at android.view.Choreographer.doCallbacks(Choreographer.java:852)
    at android.view.Choreographer.doFrame(Choreographer.java:787)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1014)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7397)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
stefan-niedermann commented 4 years ago

refresh circle at the bottom right

I assume with you mean the sync icon πŸ”„ ? This actually isn't a button but an indicator that shows that the image hasn't been synchronized yet (not uploaded yet).


PS.: Please update to the latest version (at time writing this is 1.7.0 on F-Droid). We usually provide only support for the latest version, though there haven't been changes in this part of the code, so i will have a look. PS 2: Could you please tell me about how you opened this issue? I am pretty sure there should be an issue template which clearly states that we will directly close issues which do not fill the complete template :wink: :point_up: Seems that i forgot to adjust a link, therefore i'd like to know the way you got here :smile:

stefan-niedermann commented 4 years ago

Will be fixed in 1.8.3. (I am still interested in the answer to PS 2 :wink: )

cab404 commented 4 years ago

Will be fixed in 1.8.3. (I am still interested in the answer to PS 2 wink )

I've got a huge log from the app, so I tried to merge sections from it and this template :/

I didn't find a big red button to submit or email a stacktrace, so I've gone to fdroid and pressed "Issues" button. Then I just opened a bug report here.

cab404 commented 4 years ago

at time writing this is 1.7.0 on F-Droid

Ooops, stale repos D:

stefan-niedermann commented 4 years ago

Thanks :)

Ooops, stale repos D:

Just update your F-Droid cache, they actually have version 1.7.0 already: https://f-droid.org/de/packages/it.niedermann.nextcloud.deck/ :slightly_smiling_face:

cab404 commented 4 years ago

Thanks :)

Ooops, stale repos D:

Just update your F-Droid cache, they actually have version 1.7.0 already: https://f-droid.org/de/packages/it.niedermann.nextcloud.deck/ slightly_smiling_face

Done, reproduced)

App Version: 1.7.0
App Version Code: 1007000
App Flavor: fdroid

Files App Version Code: com.nextcloud.client

---

OS Version: 4.14.117-perf+(V11.0.16.0.QFQMIXM)
OS API Level: 29
Device: laurel_sprout
Manufacturer: Xiaomi
Model (and Product): Mi A3 (laurel_sprout)

---

java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
    at it.niedermann.nextcloud.deck.ui.attachments.AttachmentAdapter.onBindViewHolder(AttachmentAdapter.java:55)
    at it.niedermann.nextcloud.deck.ui.attachments.AttachmentAdapter.onBindViewHolder(AttachmentAdapter.java:29)
    at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
    at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
    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:4134)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
    at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at androidx.viewpager2.widget.ViewPager2.onLayout(ViewPager2.java:527)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at com.android.internal.policy.DecorView.onLayout(DecorView.java:779)
    at android.view.View.layout(View.java:21931)
    at android.view.ViewGroup.layout(ViewGroup.java:6260)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3081)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2591)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1722)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7605)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
    at android.view.Choreographer.doCallbacks(Choreographer.java:852)
    at android.view.Choreographer.doFrame(Choreographer.java:787)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1014)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7397)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
stefan-niedermann commented 4 years ago

Easy buddy, i already found and fixed the issue - The fix will be shipped with version 1.8.3 :laughing:

Thanks again for the report!

cab404 commented 4 years ago

Easy buddy, i already found and fixed the issue - The fix will be shipped with version 1.8.3 laughing

Thanks again for the report!

Thank you) I can PR some improvements for the crash page later (e.g "Submit an issue" button with logs integrated into issue template), will that be of any use?

stefan-niedermann commented 4 years ago

Thank you, i also thought about it, but decided to not do it for several reasons:

But if you are interested in contributing, just have a look at the good first issue label. For bigger contributions we also pay out bounties (depending on the amount and quality of contribution) 🍻 πŸš€