Page MenuHomePhabricator

App terminates when tapping search
Closed, ResolvedPublic1 Estimated Story Points

Description

Stack trace

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setSelectionAfterHeaderView()' on a null object reference
	at org.wikipedia.search.SearchResultsFragment$2$1.run(SearchResultsFragment.java:258)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6121)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

https://rink.hockeyapp.net/manage/apps/226650/app_versions/94/crash_reasons/166330480
https://play.google.com/apps/publish/?account=6169333749249604352#ReviewDetailsPlace:p=org.wikipedia&reviewid=gp:AOqpTOFMaSiG2OSHAHbYNPZI0-84Rsm2UD1-9f5mrNDNVm8Iy60N_rmKtZpipqCeKR4xMVZpZFPIRoOiKr1g

Environments observed

App version: 2.5.195
Android OS versions: Android 7.1
Device model: d855
Device language: English

Event Timeline

Dbrant subscribed.

@Dan653 This task describes the crash in the Android app only. If you observe similar behavior in the iOS app, please create a separate task.

Change 350208 had a related patch set uploaded (by Dbrant):
[apps/android/wikipedia@master] Fix: prevent possible crash when invoking search.

https://gerrit.wikimedia.org/r/350208

Change 350208 merged by jenkins-bot:
[apps/android/wikipedia@master] Fix: prevent possible crash when invoking search.

https://gerrit.wikimedia.org/r/350208

The TSG office doesn't have an Android 7 device right now, however on Samsung Galaxy Express 3 (J120A) with Android 6.0.1 and the latest app build 2.5.195-alpha-2017-05-05 there are no issues with crashing when tapping Search.

ABorbaWMF subscribed.

Tested on Nexus 4 Android 5.1 and Pixel Android 7.1.1 both on 2.5.195-alpha-2017-05-11

I have the pixel on 7.1.1 and I did a bunch of searching yesterday and today. I think this one is fixed.

Dbrant claimed this task.