apps-android-commons: [Urgent] Version 2.6.6 crash

New crash in version 2.6.6 affecting 12 users with 79 reports. 😕 It appears to be caused by uploading. I tried to contact the user to get more information, but we’ll see if he responds.

java.lang.NullPointerException: 
  at fr.free.nrw.commons.modifications.ModificationsSyncAdapter.onPerformSync (ModificationsSyncAdapter.java:105)
  at android.content.AbstractThreadedSyncAdapter$SyncThread.run (AbstractThreadedSyncAdapter.java:272)

(Yes, the stack trace is only 2 lines. Not sure why)

Android 5.1 | 60 | 75.9% Android 7.0 | 10 | 12.7% Android 8.0 | 5 | 6.3% Android 6.0 | 2 | 2.5% Others | 2 | 2.5%

A37f (A37f) | 59 | 74.7% ZenFone 3 Max (ZC520TL) (ASUS_X008_1) | 8 | 10.1% Mi A1 (tissot_sprout) | 3 | 3.8% OnePlus3T (OnePlus3T) | 2 | 2.5% Others | 7 | 8.9%

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 29 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@neslihanturan

But I learned that IP address of my VPN is blocked (the one that I used on my Android device, not laptop). I am not able to test to upload via app without VPN (since there is still block from Turkey),

You might be able to avoid this problem by getting whitelisted (IP block exemption).

Just in case anyone here is still trying to find the root cause for this issue (or any issue, for that matter) and isn’t aware of git bisect, give it a try! You’ll almost always find the root cause without a lot of effort. I’ve used it multiple times with fruitful results.

Hi team, since this is one of our most critical issue I tried to investigate. I think it is related with #1042 and @Inject’s creating an instance when it is necessary. But I am not a Dagger expert yet to detect the problem. However, since I am able to upload form my beta account and not able to upload from my production, I prepared a comparison to catch something. Sharing with you and hoping it will make a flash of inspiration of you. I have marked the differences between called methods. compare1 compare2 compare3

If you want a detailed investigation of any other informations such as object references etc. please let me know. It seems like it is all I can do to help this discussion.

Hi team, I am able to reproduce the bug with devices 5.0.2 and 4.42 API. It happens with category and without category uploads. When I follow debug break points, weirdly ModificationSyncAdapter is called even if I don’t add any categories.

  • I am able to upload with web site and see my new uploads from app’s interface.
  • When I upload an image with category it is normal ModificationSyncAdapter is being called. But according to my debug, it is called on uploads without categories and even with no uploads. And here is @misaochan 's great theory comes, whenever a category of previous uploads didn’t added, ModificationSysncAdapter being called to add this missing category. It was a known issue #310 . But currently it may trigger NPE.
  • I was able to upload while testing our master before release, but at some point I couldn’t be able to upload anymore (and I don’t think this is API level dependent), guess what one of my category information is not added yet.