[Bug] Google+ crashes on Android app when viewing certain images – your browser might be affected too

A variety of users have reported that Google+ crashes when viewing a image on their Android app / browser. Thanks to one of our writers, Justin, for pointing this out to us. Said image’s size is 8×51150.

Android

Here is how you replicate the bug on your Android device with the Google+ app.

1. Visit Daniel Quah’s Google+ profile here.

Whoops, did it just crash on you? I did a logcat of said bug on my Xperia Z3 (Android 5.0.2) and came up with:

E/AndroidRuntime(22506): FATAL EXCEPTION: main
E/AndroidRuntime(22506): Process: com.google.android.apps.plus, PID: 22506
E/AndroidRuntime(22506): java.lang.IllegalStateException: onMeasure() did not set the measured dimension by calling setMeasuredDimension()
E/AndroidRuntime(22506): at android.view.View.measure(View.java:17532)
E/AndroidRuntime(22506): at mnm.onMeasure(PG:218)
E/AndroidRuntime(22506): at android.view.View.measure(View.java:17520)
E/AndroidRuntime(22506): at com.google.android.libraries.social.stream.legacy.views.StreamGridView.c(PG:1299)
E/AndroidRuntime(22506): at com.google.android.libraries.social.stream.legacy.views.StreamGridView.a(PG:860)
E/AndroidRuntime(22506): at com.google.android.libraries.social.stream.legacy.views.StreamGridView.computeScroll(PG:810)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14125)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
E/AndroidRuntime(22506): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
E/AndroidRuntime(22506): at android.view.View.updateDisplayListIfDirty(View.java:14098)
E/AndroidRuntime(22506): at android.view.View.getDisplayList(View.java:14161)
E/AndroidRuntime(22506): at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:268)
E/AndroidRuntime(22506): at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:274)
E/AndroidRuntime(22506): at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:313)
E/AndroidRuntime(22506): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2503)
E/AndroidRuntime(22506): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2341)
E/AndroidRuntime(22506): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1972)
E/AndroidRuntime(22506): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1058)
E/AndroidRuntime(22506): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5796)
E/AndroidRuntime(22506): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
E/AndroidRuntime(22506): at android.view.Choreographer.doCallbacks(Choreographer.java:580)
E/AndroidRuntime(22506): at android.view.Choreographer.doFrame(Choreographer.java:550)
E/AndroidRuntime(22506): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
E/AndroidRuntime(22506): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(22506): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(22506): at android.os.Looper.loop(Looper

The debug log does look boring, though the exciting part is at “onMeasure() did not set the measured dimension by calling setMeasuredDimension()” which throws us a “java.lang.IllegalStateException”. Why did that happen? The class was called without setting any images and it resulted in the error. Android documentation provided by Google states that when overriding this method, you have to call setMeasuredDimension(int, int) to store the measured width and height of this view. Failing to do so will trigger an exception(IllegalStateException) at measurement time( measure(int, int) ), which is in fact, the said bug.

Desktop

We have tested this on multiple browsers and the results were surprising. The tested browsers were Chrome, Firefox, IceWeasel (Debian’s fork of Firefox), and Internet Explorer. Spoiler: Internet Explorer did well, better than others, in fact.

On Chrome, click on this link to go directly to Daniel’s post. The image is kind of small, but try to click on the small white strip that is the image. The image will not load at all and you will be greeted with the below message. The below error message is too generic for us to know what happened. Thanks to Chrome’s per tab process management, this isn’t a big deal as the tab can be closed and your browser wouldn’t crash.

Firefox on the other hand…

Screenshot from 2015-07-13 01-50-27

 

 

On Firefox or its derivatives, the browser would freeze as the browser runs all tabs in a single process, and the entire browser would crash if you were to click on the image. Closing the tab alone will not help at all, but I digress, as this is a browser specific feature.

 

On Internet Explorer? Surprise, surprise! When we tested this bug on IE 11 and IE 9, the bug did not happen at all. (Hurray for the small percentage of us using IE?). Initially, it would display a message stating

google.com is not responding due to a long-running script.

Give it a moments, and a few seconds later, the image will load.

 

iOS

There isn’t one. Tested on iOS 9 with the Google+ app.

 

We will be reaching out to Google+ team to report this aforementioned bug and will update this post accordingly when the team gets back to us. In the meantime, be careful of people in your circle exploiting this bug.

Stay safe on the Internet folks!

 

Thanks Justin for finding the bug!

 

Update: Justin has posted the bug report on Google+ community

Update(26 July 2015) : Google has not acknowledge the bug, but it is now not possible to upload the image on Google+ desktop.

Uploadfailed

Update(22 September 2015) : Google has fixed the bug on the Desktop end. It is now possible to view the image on the desktop end. However, when the image is zoomed in, the image will disappear even if zoomed out.

2015-09-21

 

Daniel Quah

18 Year old dude, who loves cat and tech