apps-android-commons: Crash when scrolling down my contributions
Latest master 2ed5a74
11-16 07:58:29.607 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme pointer 1
11-16 07:58:45.923 5635 5804 I clp-JNI : Add pinfo. (channel) b15b7b1 fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity (server) (pkg) AppWindowToken{21bd8c5 token=Token{dce033c ActivityRecord{a13012f u0 fr.free.nrw.commons/.contributions.MainActivity t16652}}} 15666 10383 (action) 0
11-16 07:58:45.927 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme key 0
11-16 07:58:45.968 5635 5804 I clp-JNI : Add pinfo. (channel) b15b7b1 fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity (server) (pkg) AppWindowToken{21bd8c5 token=Token{dce033c ActivityRecord{a13012f u0 fr.free.nrw.commons/.contributions.MainActivity t16652}}} 15666 10383 (action) 1
11-16 07:58:45.969 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme key 1
11-16 07:58:45.969 15666 22165 V OkHttp : --> GET https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns.json
11-16 07:58:45.971 15666 22165 V OkHttp : <-- 200 OK https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns.json (1ms, unknown-length body)
11-16 07:58:45.973 15666 15666 D ScrollView: onsize change changed
11-16 07:58:45.973 15666 15666 D ScrollView: onsize change changed
11-16 07:58:45.989 15666 22173 D OkHttp : --> GET https://commons.wikimedia.org/w/api.php?format=json&formatversion=2&errorformat=plaintext&action=query&meta=notifications¬format=model¬limit=max¬wikis=wikidatawiki%7Ccommonswiki%7Cenwiki¬filter=%21read
11-16 07:58:45.990 15666 22173 D CookieManager: Domain:commons.wikimedia.org
11-16 07:58:46.018 15666 22082 D OkHttp : --> GET https://commons.wikimedia.org/w/api.php?action=query&format=json&formatversion=2&generator=allimages&gaisort=timestamp&gaidir=older&prop=imageinfo&iiprop=url|extmetadata&iiurlwidth=640&iiextmetadatafilter=DateTime|Categories|GPSLatitude|GPSLongitude|ImageDescription|DateTimeOriginal|Artist|LicenseShortName|LicenseUrl&gaiuser=Syced&gailimit=10&gaicontinue=20201024151506|Nandi_bear_1961_(cropped).png&continue=gaicontinue||
11-16 07:58:46.018 15666 22082 D CookieManager: Domain:commons.wikimedia.org
11-16 07:58:46.525 15666 22173 D OkHttp : <-- 200 https://commons.wikimedia.org/w/api.php?format=json&formatversion=2&errorformat=plaintext&action=query&meta=notifications¬format=model¬limit=max¬wikis=wikidatawiki%7Ccommonswiki%7Cenwiki¬filter=%21read (534ms, unknown-length body)
11-16 07:58:46.526 15666 15666 D ContributionsFragment: Number of notifications is 0
11-16 07:58:47.439 5635 5804 I clp-JNI : Add pinfo. (channel) b15b7b1 fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity (server) (pkg) AppWindowToken{21bd8c5 token=Token{dce033c ActivityRecord{a13012f u0 fr.free.nrw.commons/.contributions.MainActivity t16652}}} 15666 10383 (action) 0
11-16 07:58:47.440 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme pointer 0
11-16 07:58:47.486 15666 15666 W StaticLayout: maxLineHeight should not be -1. maxLines:2 lineCount:2
11-16 07:58:47.486 15666 15666 W StaticLayout: maxLineHeight should not be -1. maxLines:2 lineCount:2
11-16 07:58:47.512 5635 5804 I clp-JNI : Add pinfo. (channel) b15b7b1 fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity (server) (pkg) AppWindowToken{21bd8c5 token=Token{dce033c ActivityRecord{a13012f u0 fr.free.nrw.commons/.contributions.MainActivity t16652}}} 15666 10383 (action) 1
11-16 07:58:47.513 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme pointer 1
11-16 07:58:47.531 15666 17503 I : Increase max job count 60
11-16 07:58:48.582 15666 22082 D OkHttp : <-- 200 https://commons.wikimedia.org/w/api.php?action=query&format=json&formatversion=2&generator=allimages&gaisort=timestamp&gaidir=older&prop=imageinfo&iiprop=url|extmetadata&iiurlwidth=640&iiextmetadatafilter=DateTime|Categories|GPSLatitude|GPSLongitude|ImageDescription|DateTimeOriginal|Artist|LicenseShortName|LicenseUrl&gaiuser=Syced&gailimit=10&gaicontinue=20201024151506|Nandi_bear_1961_(cropped).png&continue=gaicontinue|| (2564ms, unknown-length body)
11-16 07:58:48.584 15666 22082 D OkHttp : --> GET https://commons.wikimedia.org/w/api.php?format=json&action=wbgetentities&props=labels&languagefallback=1&ids=M95178133%7CM95178483%7CM95186315%7CM95187080%7CM95190808%7CM95206194%7CM95223029%7CM95272930%7CM95288857%7CM95410471
11-16 07:58:48.585 15666 22082 D CookieManager: Domain:commons.wikimedia.org
11-16 07:58:48.681 5635 5804 I clp-JNI : Add pinfo. (channel) b15b7b1 fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity (server) (pkg) AppWindowToken{21bd8c5 token=Token{dce033c ActivityRecord{a13012f u0 fr.free.nrw.commons/.contributions.MainActivity t16652}}} 15666 10383 (action) 0
11-16 07:58:48.682 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme pointer 0
11-16 07:58:48.748 5635 5804 I clp-JNI : Add pinfo. (channel) b15b7b1 fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity (server) (pkg) AppWindowToken{21bd8c5 token=Token{dce033c ActivityRecord{a13012f u0 fr.free.nrw.commons/.contributions.MainActivity t16652}}} 15666 10383 (action) 1
11-16 07:58:48.749 15666 15666 D ViewRootImpl@de9072a[MainActivity]: ViewPostIme pointer 1
11-16 07:58:49.105 15666 22169 D OkHttp : --> GET https://en.wikipedia.org/api/rest_v1/page/media-list/Takahan_Ryokan
11-16 07:58:49.106 15666 22169 D CookieManager: Domain:en.wikipedia.org
11-16 07:58:49.106 15666 22169 D CookieManager: Adding centralauth cookies
11-16 07:58:49.227 15666 22169 D OkHttp : <-- 200 https://en.wikipedia.org/api/rest_v1/page/media-list/Takahan_Ryokan (122ms, 80-byte body)
11-16 07:58:49.295 15666 22082 D OkHttp : <-- 200 https://commons.wikimedia.org/w/api.php?format=json&action=wbgetentities&props=labels&languagefallback=1&ids=M95178133%7CM95178483%7CM95186315%7CM95187080%7CM95190808%7CM95206194%7CM95223029%7CM95272930%7CM95288857%7CM95410471 (710ms, unknown-length body)
11-16 07:58:49.363 15666 15666 D AndroidRuntime: Shutting down VM
11-16 07:58:49.365 15666 15666 E AndroidRuntime: FATAL EXCEPTION: main
11-16 07:58:49.365 15666 15666 E AndroidRuntime: Process: fr.free.nrw.commons, PID: 15666
11-16 07:58:49.365 15666 15666 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'fr.free.nrw.commons.Media fr.free.nrw.commons.contributions.Contribution.getMedia()' on a null object reference
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at fr.free.nrw.commons.contributions.ContributionViewHolder.init(ContributionViewHolder.java:70)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at fr.free.nrw.commons.contributions.ContributionsListAdapter.onBindViewHolder(ContributionsListAdapter.java:49)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at fr.free.nrw.commons.contributions.ContributionsListAdapter.onBindViewHolder(ContributionsListAdapter.java:14)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7093)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7172)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6037)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6304)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6143)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6139)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2314)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:560)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4141)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3853)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4410)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at com.android.internal.policy.DecorView.onLayout(DecorView.java:1041)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.View.layout(View.java:22420)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3343)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2807)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1853)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8476)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:761)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:696)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7032)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
11-16 07:58:49.365 15666 15666 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Not sure if that matters, but some context: I used Nearby to upload a picture of both items Takahan Ryokan and Nakatani Foundation.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (10 by maintainers)
It happens to me:
Hi @gouri-panda, No problem, yes can you try calling setStableIds(true) for the adapter and see if this solves the issue?
Hi, I have been able to reproduce this issue too, seems like this happens while some upload is going on and since we use the the pagedListAdapter, whose getItem function is @Nullable we need to handle the case when the item returned is null, this could happen when the differ is still processing the item, @gouri-panda , you might want to handle this in the adapter itself instead of the ViewHolder
Sure, thanks! 🙂
On Tue, 17 Nov 2020, 04:36 gouri-panda, notifications@github.com wrote: