Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current issues with direct Nearby uploads #1329

Closed
9 tasks done
misaochan opened this issue Mar 18, 2018 · 33 comments · Fixed by #1378
Closed
9 tasks done

Current issues with direct Nearby uploads #1329

misaochan opened this issue Mar 18, 2018 · 33 comments · Fixed by #1378

Comments

@misaochan
Copy link
Member

misaochan commented Mar 18, 2018

Summary:

I thought we should probably keep a list of issues we are experiencing with the directNearbyUploadsNew feature branch, so we don't miss anything out before releasing to production. Please feel free to edit this post to add issues or detail for issues.

Steps to reproduce:

Build from 2.7.x-release and test the Nearby feature

  • 1. Memory leaks PR Fix nearby leaks, at least some ot them #1390
  • 2. Crash when loading map (by the time I finished typing this out, I had lost the logcat. Sorry. :/ Will post when I encounter it again).
  • 3. Text wrap issues in bottom sheet (see SS below). I would recommend removing "Directions" text
  • 4. Fix "?" description bug in map (see SS below). This has already been fixed in list, we just need to copy the fix over to map. I should be able to do it after I'm done with my category PR.
  • 5. Crash on orientation change crashes when list view is open and orinetation changed. PR: Fix IndexOutOfBounds exception in Nearby #1385
  • 6. Bug: if you click one of nearby markers and make information bottom sheet visible, then go to settings and change theme, app will crash when you re-start nearby activity. Log is at below comment PR Fix NPE in nearby fragmnet #1391
  • 7. Action bar is hidden
  • 8. Fix current location point visibility when bottom sheet is expanded, and re-center button is clicked. PR: Fix nearby current location marker #1381
  • 9. Fix transparent view is top of menu bar - PR is ready waiting for review Fix transparent view allign #1378

screenshot_20180318-194400

@neslihanturan
Copy link
Collaborator

  1. Crash on orientation change

Then we are done. Btw weird, I could upload as far as I remember.

@misaochan
Copy link
Member Author

misaochan commented Mar 18, 2018

I think the crash was caused by re-loading the map after submitting the upload, since the line pointed to was a "IndexOutOfBounds" error at LatLng[] boundaryCoordinates = {places.get(0).location, // south (NearbyController.java). But I have not been able to reproduce it.

@misaochan
Copy link
Member Author

@neslihanturan I found a couple more issues. Sorry! :D

@neslihanturan
Copy link
Collaborator

@misaochan I will be looking at those issues today, can you write your new couple more issues too?

@misaochan
Copy link
Member Author

I added them to the opening post yesterday already. Thanks! :)

@neslihanturan
Copy link
Collaborator

neslihanturan commented Mar 19, 2018

+1 Bug, if you click one of nearby markers and make information bottom sheet visible, then go to settings and change theme, app will crash when you re-start nearby activity. Editing first entry accordingly.

java.lang.NullPointerException
                     at fr.free.nrw.commons.nearby.NearbyMapFragment.prepareViewsForSheetPosition(NearbyMapFragment.java:513)
                     at fr.free.nrw.commons.nearby.NearbyMapFragment$8.onStateChanged(NearbyMapFragment.java:345)

By the way, it doesn't crashes on orientation change anymore:/ maybe it was related with re-center button PR #1228 which is merged to another branch:/

@wailbabou
Copy link
Contributor

[ 6 ] onStateChanged called with STATE_SETTLING then STATE_HIDDEN after changing theme ( recreate() ) and going back to nearByActivity

Surrounding this line getView().requestFocus() with try catch fixed it , even if it's not good solution

@97balakrishnan
Copy link
Contributor

I think the list button can be made as a toggle to show list of nearby places on first click and hide them on second click

@97balakrishnan
Copy link
Contributor

 FATAL EXCEPTION: RxCachedThreadScheduler-1
                                                                           Process: fr.free.nrw.commons.debug, PID: 19653
                                                                           io.reactivex.exceptions.UndeliverableException: java.lang.IndexOutOfBoundsException
                                                                               at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:349)
                                                                               at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:48)
                                                                               at io.reactivex.Observable.subscribe(Observable.java:10901)
                                                                               at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
                                                                               at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
                                                                               at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
                                                                               at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
                                                                               at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
                                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
                                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                               at java.lang.Thread.run(Thread.java:818)
                                                                            Caused by: java.lang.IndexOutOfBoundsException
                                                                               at java.util.Collections$EmptyList.get(Collections.java:102)
                                                                               at fr.free.nrw.commons.nearby.NearbyController.loadAttractionsFromLocation(NearbyController.java:57)
                                                                               at fr.free.nrw.commons.nearby.NearbyActivity.lambda$refreshView$6$NearbyActivity(NearbyActivity.java:317)
                                                                               at fr.free.nrw.commons.nearby.NearbyActivity$$Lambda$6.call(Unknown Source)
                                                                               at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:42)
                                                                               at io.reactivex.Observable.subscribe(Observable.java:10901) 
                                                                               at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) 
                                                                               at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452) 
                                                                               at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61) 
                                                                               at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52) 
                                                                               at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) 
                                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) 
                                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                                               at java.lang.Thread.run(Thread.java:818) 

I still get this crash when orientation changes when the options on nearby list is enabled

@97balakrishnan
Copy link
Contributor

03-21 16:59:08.519 24135-24135/fr.free.nrw.commons.debug E/AndroidRuntime: FATAL EXCEPTION: main
                                                                           Process: fr.free.nrw.commons.debug, PID: 24135
                                                                           io.reactivex.exceptions.OnErrorNotImplementedException
                                                                               at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
                                                                               at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
                                                                               at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:74)
                                                                               at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:276)
                                                                               at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
                                                                               at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
                                                                               at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
                                                                               at android.os.Handler.handleCallback(Handler.java:739)
                                                                               at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                               at android.os.Looper.loop(Looper.java:135)
                                                                               at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                               at java.lang.reflect.Method.invoke(Native Method)
                                                                               at java.lang.reflect.Method.invoke(Method.java:372)
                                                                               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
                                                                            Caused by: java.lang.IndexOutOfBoundsException
                                                                               at java.util.Collections$EmptyList.get(Collections.java:102)
                                                                               at fr.free.nrw.commons.nearby.NearbyController.loadAttractionsFromLocation(NearbyController.java:57)
                                                                               at fr.free.nrw.commons.nearby.NearbyActivity.lambda$refreshView$6$NearbyActivity(NearbyActivity.java:317)
                                                                               at fr.free.nrw.commons.nearby.NearbyActivity$$Lambda$6.call(Unknown Source)
                                                                               at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:42)
                                                                               at io.reactivex.Observable.subscribe(Observable.java:10901)
                                                                               at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
                                                                               at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
                                                                               at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
                                                                               at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
                                                                               at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
                                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
                                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                               at java.lang.Thread.run(Thread.java:818)

I get this crash when internet is unavailable

@neslihanturan
Copy link
Collaborator

Thanks for your reports @97balakrishnan

@neslihanturan
Copy link
Collaborator

It is good to inform everyone interested to solve these bugs, please do not solve them before dNUnew branch is merged to master. @maskaravivek is working to rebase, after that we can send PRs related with these bugs.

@neslihanturan
Copy link
Collaborator

I am currently working on "internet unavailable crash", letting you know to prevent two persons working on the same issue.

@97balakrishnan
Copy link
Contributor

Ok I'll work on the text wrap issue after the branch is merged

@neslihanturan
Copy link
Collaborator

@97balakrishnan just setting singleLine=true on xml should work when it comes to text wrap problem. Or we can remove the text when there is no room . So we expect to see text when it fits.

Note: Merge is done, you can send your PR

This was referenced Mar 21, 2018
@maskaravivek
Copy link
Member

maskaravivek commented Mar 21, 2018

Update: dnuNew is now merged with master. Moreover, @Jatin0312's recenter changes are also merged.

Tests on master are still failing. :(

@neslihanturan
Copy link
Collaborator

@97balakrishnan after you saw that I was working on the internet thing and said "ok" , why did you create a related PR? We are not racing, we are colobrating please consider the comments next time...

@97balakrishnan
Copy link
Contributor

ok sorry :-)

@misaochan
Copy link
Member Author

Thanks so much for working on this, guys! :)

Just checking on our progress - which items have been solved? I guess 1, 3, 5 and 6 are done?

@misaochan
Copy link
Member Author

I still get the below crash occasionally when I change orientation in Nearby, or sometimes even if I go to another activity and then return (e.g. uploading, or wikipedia, etc). It doesn't happen reliably, though.

03-26 18:37:09.683: E/AndroidRuntime(2741): FATAL EXCEPTION: main
03-26 18:37:09.683: E/AndroidRuntime(2741): Process: fr.free.nrw.commons.debug, PID: 2741
03-26 18:37:09.683: E/AndroidRuntime(2741): io.reactivex.exceptions.OnErrorNotImplementedException: Index: 0
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:74)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:276)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at android.os.Handler.handleCallback(Handler.java:751)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at android.os.Handler.dispatchMessage(Handler.java:95)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at android.os.Looper.loop(Looper.java:154)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at android.app.ActivityThread.main(ActivityThread.java:6692)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.lang.reflect.Method.invoke(Native Method)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
03-26 18:37:09.683: E/AndroidRuntime(2741): Caused by: java.lang.IndexOutOfBoundsException: Index: 0
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.util.Collections$EmptyList.get(Collections.java:3690)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at fr.free.nrw.commons.nearby.NearbyController.loadAttractionsFromLocation(NearbyController.java:57)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at fr.free.nrw.commons.nearby.NearbyActivity.lambda$refreshView$6$NearbyActivity(NearbyActivity.java:351)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at fr.free.nrw.commons.nearby.NearbyActivity$$Lambda$6.call(Unknown Source)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:42)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.Observable.subscribe(Observable.java:10901)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
03-26 18:37:09.683: E/AndroidRuntime(2741): 	at java.lang.Thread.run(Thread.java:762)

@misaochan misaochan changed the title Current issues with directNearbyUploadsNew feature branch Current issues with direct Nearby uploads Mar 26, 2018
@neslihanturan
Copy link
Collaborator

neslihanturan commented Mar 26, 2018

I am not able to reproduce the error @misaochan :/ Besides I added one more issue on main list. Assigned 8 to myself.

@misaochan
Copy link
Member Author

@neslihanturan I'll try to look into the crash in that case, you can focus on 8. :)

@neslihanturan
Copy link
Collaborator

neslihanturan commented Mar 27, 2018

I was about to propose myself for 8 too:) 9 is also assigned to me

@neslihanturan
Copy link
Collaborator

I will solve 6 tomorrow and we can make a bug free (at least known ones:)) release hopefully:)

@neslihanturan
Copy link
Collaborator

We are almost done, except one leak, leak A at #1368

@misaochan
Copy link
Member Author

Wonderful, great job @neslihanturan . :) Release will be coming up shortly!

@97balakrishnan
Copy link
Contributor

03-31 20:14:38.343 9842-9842/fr.free.nrw.commons.debug E/LocationServiceManager: Security exception
                                                                                 java.lang.SecurityException: "network" location provider requires ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission.
                                                                                     at android.os.Parcel.readException(Parcel.java:1620)
                                                                                     at android.os.Parcel.readException(Parcel.java:1573)
                                                                                     at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:606)
                                                                                     at android.location.LocationManager.requestLocationUpdates(LocationManager.java:880)
                                                                                     at android.location.LocationManager.requestLocationUpdates(LocationManager.java:464)
                                                                                     at fr.free.nrw.commons.location.LocationServiceManager.requestLocationUpdatesFromProvider(LocationServiceManager.java:106)
                                                                                     at fr.free.nrw.commons.location.LocationServiceManager.registerLocationManager(LocationServiceManager.java:94)
                                                                                     at fr.free.nrw.commons.nearby.NearbyActivity.onStart(NearbyActivity.java:259)
                                                                                     at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1260)
                                                                                     at android.app.Activity.performStart(Activity.java:6276)
                                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389)
                                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
                                                                                     at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                     at android.os.Looper.loop(Looper.java:148)
                                                                                     at android.app.ActivityThread.main(ActivityThread.java:5443)
                                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
                                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

getting this exception on first time loading of nearby places after granting permission.
Nearby location doesnt load the first time due to this exception
Device Android 6.0.1
Version 2.7.0-debug master

@97balakrishnan
Copy link
Contributor

The directions symbol is overlapped by recenter button.

alt link

@misaochan
Copy link
Member Author

Interesting, the directions symbol was never meant to be there. What happens when you select one of the pins and expand the bottom sheet?

@97balakrishnan
Copy link
Contributor

It remains there even if i select the pin and expand. Note: I got the directions symbol only after i zoomed the map. It was not initially present.

@misaochan
Copy link
Member Author

Thanks @97balakrishnan . Could you create an issue for the problems you are experiencing, please? It would make it easier to organize the discussion.

@97balakrishnan
Copy link
Contributor

Ok sure

@misaochan
Copy link
Member Author

Thanks! As the release has gone ahead, I will close this so we can have a fresh start on discussing existing issues at #1400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants