Skip to content

Crash when gallery image is shared with the Commons app #668

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

Closed
nicolas-raoul opened this issue May 21, 2017 · 23 comments
Closed

Crash when gallery image is shared with the Commons app #668

nicolas-raoul opened this issue May 21, 2017 · 23 comments

Comments

@nicolas-raoul
Copy link
Member

From the stock gallery I shared to Commons.
The image loaded fullscreen, but surprisingly the UI did not load anything else.
Killing Commons by swiping it was not enough to fix the problem, I had to force-stop it in Settings→Apps

@misaochan
Copy link
Member

@nicolas-raoul does this happen all the time for you, or just once?

Sorry, I am going to be in a plane most of tomorrow so can't check it :(

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented May 23, 2017 via email

@misaochan
Copy link
Member

Wow, that is pretty bad.

Do you guys think we should revert to the last stable version for production (2.2.2)? It will be missing all the improvements we made over the weekend but it might be needed if lots of people aren't able to upload. Please help test if you can and provide feedback.

@nicolas-raoul do you think you could do the revert for production if needed? I will be flying/ transiting till Thursday so I may not be able to access the internet. I'm in Zurich airport now, leaving soon.

We can probably leave the beta on 2.4 since anyone who really needs to will be able to drop out of beta.

Thanks!

@VojtechDostal
Copy link
Collaborator

This just happened to me too. There was an android update in the morning, or maybe just Google Play's update. Whatever it was, I couldnt open the Commons app today (it said: "app not installed"). So I uninstalled and installed the app again, it now works, but when I choose a picture to upload it just shows on full-screen. When I try to do this repeatedly, or try to click here an there, it often causes the app to crash.

I don't mind keeping it in beta, as soon as we will work on this in a matter of days/few weeks max. If it takes more then let's revert to the stable version.

@tobias47n9e
Copy link
Member

Couldn't reproduce the issue today trying a few different Android versions in the emulator. Anyone have steps that always lead to the issue?

@tobias47n9e tobias47n9e changed the title Title/description fields do not appear, just the image fullscreen Crash when gallery image is shared with the Commons app May 23, 2017
@nicolas-raoul
Copy link
Member Author

@VojtechDostal Would you mind repeating the full-screen bug while taking the log with adb logcat, and sending us the log? Thanks a lot!
Same for the crashes if possible, as a new issue :-)

@VojtechDostal
Copy link
Collaborator

OK, will do but not before today evening. Which category of logs in Android Studio do you want me to send? I can choose several options from the rollup. thanks

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented May 24, 2017 via email

@misaochan
Copy link
Member

I reverted production to the latest stable version (2.2.2). Left 2.4 in beta, so those who aren't having issues or want to test the new features can remain in 2.4, while those who are having issues can opt out of beta for the time being.

Hopefully we'll find a fix for 2.4 soon.

@VojtechDostal
Copy link
Collaborator

I cannot reproduce the problem I had yesterday. I will keep trying.

@misaochan
Copy link
Member

@nicolas-raoul Are you able to reproduce the issue with 2.4? If you are, could you post the logs? Thanks!

@misaochan
Copy link
Member

There is a crash report, not sure if it's the same bug:

USER_COMMENT=Tried to share two pictures with the Wikimedia Commons app
ANDROID_VERSION=7.1.1
APP_VERSION_NAME=2.4
BRAND=OnePlus
PHONE_MODEL=ONEPLUS A3003
CUSTOM_DATA=
STACK_TRACE=java.lang.ClassCastException: com.facebook.drawee.view.SimpleDraweeView cannot be cast to fr.free.nrw.commons.MediaWikiImageView
at fr.free.nrw.commons.upload.MultipleUploadListFragment$PhotoDisplayAdapter.getView(MultipleUploadListFragment.java:82)
at android.widget.AbsListView.obtainView(AbsListView.java:2379)
at android.widget.GridView.onMeasure(GridView.java:1065)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:19955)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure(View.java:19955)
at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:1081)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
at android.view.View.measure(View.java:19955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6087)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:689)
at android.view.View.measure(View.java:19955)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2309)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1392)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1645)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1280)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6432)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:621)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
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:6290)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented May 26, 2017 via email

@misaochan
Copy link
Member

Got 2 more crash reports similar to the one above. I think that is quite clearly the source of the issue, or at least one of the sources.

@misaochan
Copy link
Member

misaochan commented May 26, 2017

Oh, @dbrant , I think that portion of MultipleUploadListFragment.java was part of your patch, haha. :) Any idea what could've broken it?

@dbrant
Copy link
Collaborator

dbrant commented May 26, 2017

D'oh! Will look into it asap.

@dbrant
Copy link
Collaborator

dbrant commented May 26, 2017

Should be fixed via #681.

@misaochan
Copy link
Member

Thanks @dbrant ! Will push to beta ASAP. In the meantime, if anyone could help test the current master branch and see if it's still crashing for them, that would be a huge help. :)

@misaochan
Copy link
Member

v 2.4.1 pushed to beta, if anyone is still having issues with this crash please let us know.

@misaochan
Copy link
Member

Anyone? Will close issue otherwise.

@VojtechDostal
Copy link
Collaborator

No problem here.

@tobias47n9e
Copy link
Member

It works for me. A seperate issue to implement some upload tests would be a good idea though. We should never accidentally break our main features.

@misaochan
Copy link
Member

@tobias47n9e : Agreed, sounds like a good idea to me

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

No branches or pull requests

5 participants