Page MenuHomePhabricator

App crashed when trying to open a searched item of "Search places"
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Go to the home page
  2. More
  3. Places
  4. Enter something to search (e.g., test)
  5. Longclick an item
  6. Open

Then the app crashes.

Note: As my network connection is not usually satisfactory, and there were network-related errors in the Logcat before the crash, the network might carry weight to the problem.

Screen Record

The Corresponding Crash Logcat of Screen Record

2025-04-25 12:17:53.676  5066-5066  wikipedia.alpha         pid-5066                             E  Not starting debugger since process cannot load the jdwp agent.
2025-04-25 12:18:25.422  5066-5442  org.wikipedia.alpha     org.wikipedia.alpha                  E  java.lang.NullPointerException
                                                                                                    	at org.wikipedia.dataclient.restbase.RbServiceError$Companion.create(RbServiceError.kt:27)
                                                                                                    	at org.wikipedia.dataclient.okhttp.HttpStatusException.<init>(HttpStatusException.kt:39)
                                                                                                    	at org.wikipedia.dataclient.okhttp.UnsuccessfulResponseInterceptor.intercept(UnsuccessfulResponseInterceptor.kt:16)
                                                                                                    	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
                                                                                                    	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
                                                                                                    	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
2025-04-25 12:18:25.422  5066-5066  Mbgl                    org.wikipedia.alpha                  E  {wikipedia.alpha}[Style]: Failed to load sprite: Code: 304, URL: https://maps.wikimedia.org/static/webgl/wikisprites%402x.json
2025-04-25 12:18:25.549  5066-5066  Mbgl                    org.wikipedia.alpha                  E  {wikipedia.alpha}[Style]: Failed to load sprite: Code: 304, URL: https://maps.wikimedia.org/static/webgl/wikisprites%402x.png
2025-04-25 12:18:25.937  5066-5350  Mbgl                    org.wikipedia.alpha                  E  {RenderThread 12}[Style]: Failed to load glyph range 0-255 for font stack Open Sans Regular: Code: 304, URL: https://maps.wikimedia.org/static/webgl/font/Open%20Sans%20Regular/0-255.pbf
2025-04-25 12:18:26.979  5066-5066  RippleDrawable          org.wikipedia.alpha                  E  The RippleDrawable.STYLE_PATTERNED animation is not supported for a non-hardware accelerated Canvas. Skipping animation.
2025-04-25 12:18:26.990  5066-5107  OpenGLRenderer          org.wikipedia.alpha                  E  Unable to match the desired swap behavior.
2025-04-25 12:18:26.992  5066-5107  FrameEvents             org.wikipedia.alpha                  E  updateAcquireFence: Did not find frame.
2025-04-25 12:18:27.560   572-2511  ActivityTaskManager     system_server                        E  setVisibility=false while transition is not collecting or finishing ActivityRecord{5b30e9c u0 org.wikipedia.alpha/org.wikipedia.places.PlacesActivity t10} caller=com.android.server.wm.ActivityRecord.setVisibility:5287 com.android.server.wm.ActivityRecord.makeInvisible:6077 com.android.server.wm.EnsureActivitiesVisibleHelper.setActivityVisibilityState:226 com.android.server.wm.EnsureActivitiesVisibleHelper.process:144 com.android.server.wm.TaskFragment.updateActivityVisibilities:1157 com.android.server.wm.Task.lambda$ensureActivitiesVisible$20:4878 com.android.server.wm.Task.$r8$lambda$glAS06h6u0gde7lZWW7SuxTbP1w:0 com.android.server.wm.Task$$ExternalSyntheticLambda16.accept:0 
2025-04-25 12:18:38.607  5066-5066  FrameTracker            org.wikipedia.alpha                  E  force finish cuj, time out: J<IME_INSETS_ANIMATION::0@0@org.wikipedia.alpha>
--------- beginning of crash
2025-04-25 12:18:39.487  5066-5066  AndroidRuntime          org.wikipedia.alpha                  E  FATAL EXCEPTION: main
                                                                                                    Process: org.wikipedia.alpha, PID: 5066
                                                                                                    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1092179530, result=97, data=Intent { (has extras) }} to activity {org.wikipedia.alpha/org.wikipedia.places.PlacesActivity}: java.lang.NullPointerException
                                                                                                    	at android.app.ActivityThread.deliverResults(ActivityThread.java:5527)
                                                                                                    	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5566)
                                                                                                    	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
                                                                                                    	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:205)
                                                                                                    	at android.os.Looper.loop(Looper.java:294)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8177)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
                                                                                                    Caused by: java.lang.NullPointerException
                                                                                                    	at org.wikipedia.places.PlacesFragment.placesSearchLauncher$lambda$2(PlacesFragment.kt:152)
                                                                                                    	at org.wikipedia.places.PlacesFragment.$r8$lambda$dCqpgweuKgbXHg3ASwJqV5l-i9U(PlacesFragment.kt:0)
                                                                                                    	at org.wikipedia.places.PlacesFragment$$ExternalSyntheticLambda3.onActivityResult(R8$$SyntheticClass:0)
                                                                                                    	at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.kt:350)
                                                                                                    	at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.kt:311)
                                                                                                    	at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.kt:756)
                                                                                                    	at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:151)
                                                                                                    	at org.wikipedia.activity.BaseActivity.onActivityResult(BaseActivity.kt:218)
                                                                                                    	at android.app.Activity.dispatchActivityResult(Activity.java:8943)
                                                                                                    	at android.app.ActivityThread.deliverResults(ActivityThread.java:5520)
                                                                                                    	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5566) 
                                                                                                    	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) 
                                                                                                    	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) 
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) 
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:205) 
                                                                                                    	at android.os.Looper.loop(Looper.java:294) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8177) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 
2025-04-25 12:18:39.588  7179-7179  wikipedia.alpha         pid-7179                             E  Not starting debugger since process cannot load the jdwp agent.

What happens?:
The app crashed.

What should have happened instead?:
Normal operation.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
2.7.50529-alpha-2025-04-24 (from Github Releases)

Other information (browser name/version, screenshots, etc.):
Android: 14
Device: Pixel 8

Event Timeline

Another great catch! This does not even have to do with a poor network connection; this merely happens when going to Search from Places, and long-pressing any search result to Open it.

The easiest way to fix this behavior will be to make the Open option go to read the selected article (rather than navigating back to Places), which is probably the intuitive result anyway.

ABorbaWMF subscribed.

Could not reproduce on 2.7.50530-r-2025-05-02

Looks like it is fixed. @Parallelll, you can test it with this build T393199