16

So, I acknowledge that this is a truly vague question. What happens is that very randomly and rarely on only Samsung devices (2x S3 and 1xS4 mini) the starting activity (basically any activity, I have not found common ground) won't render and shows only a white screen. The funny thing is that actually the views are there, I can click the white screen and when I hit the correct spots, I can open dialogs using buttons, and go to the next activities. What is more weird is the fact that when the next activity opens using an animation, I can see the activity for a fraction of a second.

So, has anyone ever seen or experienced this?

Note: As this is such a random bug, I would need to copy the whole project here for code samples and I just cannot do that.

serv-inc
  • 35,772
  • 9
  • 166
  • 188
splangi
  • 683
  • 7
  • 17
  • 1
    Have you figure out what happen? – dilix Feb 12 '16 at 16:30
  • 2
    Was you app theme appcompat? – dilix Feb 12 '16 at 16:31
  • Do you animate your views/layout? Anything thats not 'basic' android? – David Medenjak Feb 12 '16 at 17:26
  • @DavidMedenjak in my case I do nothing that could lead to this problem, almost everytime everything is ok, but sometimes (it seems like when the whole system is overloaded - I could switch on\off wi-fi, bluethooth, open many apps) on the start of the app everything is white. Device monitor shows that all views are on the screen but nothing appears. – dilix Feb 12 '16 at 17:43
  • 1
    Nope, its still a problem thats in the app. Although I think I have narrowed down to opening multiple activities at once, using startactivities(Intent[]) – splangi Feb 13 '16 at 19:24
  • 1
    Oh, and my theme is appcompat, but changing it back to holo is not an option. – splangi Feb 15 '16 at 09:38
  • 1
    Would you like to share some code? – zackygaurav Feb 18 '16 at 15:19

1 Answers1

9

It is known to Google that there is a problem with appcompat on various devices, such as

(~100 users):
- 50% Enspert (Rainbow, likely the Wiko model #8 mentioned)
- 30% Samsung (SM G3815, SM G730A, SM T217A, GT S7275B, GT S7275R)
- 10% MyPhone (Agua Rio)

The thread says (on Feb 8th)

This is potentially 'fixed' by an AOSP commit which will be in the next release: https://android-review.googlesource.com/#/c/198301/

See also the github issue where it is said

Various Samsung phones are including older versions of the android support library in the framework or classpath.

For a possible workaround, see appcompat-v7 v21.0.0 causing crash on Samsung devices with Android v4.2.2, where the proposed solutions are

using

-keep class !android.support.v7.internal.view.menu.**,android.support.v7.** {*;}

and

The better solution is add the following lines instead:

-keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }

Update: seems like it's fixed in the android 7.0 appcompat library (SDK 24.0)

According to the last posts of the bug-report, this should be fixed on the new version of the support library (24) : https://code.google.com/p/android/issues/detail?id=78377#c374

Someone even claimed it fixed it.

Community
  • 1
  • 1
serv-inc
  • 35,772
  • 9
  • 166
  • 188
  • Nice answer but we faced this problem even without proguard on debug build and literally we don't have any crash, only blank screen. – dilix Feb 24 '16 at 14:37
  • Have you tried with the [patched `appcompat` library](https://android-review.googlesource.com/#/c/198301/)? – serv-inc Feb 24 '16 at 20:20
  • Not yet, I've only check suggestion about keeps, I think we'll try it, thx. – dilix Feb 24 '16 at 20:39
  • It turns out, this is not a solution after all. As dilix said, this is happening also on debug build and we dont have a crash, but a blank screen. – splangi Jul 12 '16 at 08:58
  • @splangi: So it happens on Nougat (7.0, sdk version 24) devices, too? (They only fixed it there.) That's not good. If this answer is truly useless, the bounty can be offered for some other answer. Would you rather like me to offer it now, or rather when someone else answers? – serv-inc Jul 12 '16 at 19:12
  • @dilix: you might have a word to say about this, too – serv-inc Jul 12 '16 at 19:19
  • 1
    @splangi: the bug report just points out that samsung uses an older support library, which might be the case. So it could be a **similar** problem. – serv-inc Jul 12 '16 at 19:21