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

large message bubble backgrounds fail to render #3148

Closed
BP602 opened this issue May 10, 2015 · 18 comments
Closed

large message bubble backgrounds fail to render #3148

BP602 opened this issue May 10, 2015 · 18 comments
Assignees
Milestone

Comments

@BP602
Copy link

BP602 commented May 10, 2015

Message doesn't show when sent and has no background when received.

screenshot_2015-05-10-18-18-34
screenshot_2015-05-10-18-18-49

Its seems to be specific to this piece of text, although it could be length related:

Rêve :
- Big fish de Tim Burton
"un homme raconte si souvent ses histoires qu'il ne finit par ne faire plus qu'un avec ses histoires et ainsi il devient immortel"

- "Utopie" de Thomas More 

- Gustave Thibon "Faire rêver les hommes est le plus sûr moyen de les tenir endormis" 

- Jeanne Bernis "L'imagination" le manque, l'éloignement rend désirable, la cristallisation, le rêve est trompeur et engendre des désillusions, sublime la realite

- Freud : "Le bonheur est un rêve d'enfant réalisé à l'âge adulte
" Tout rêve est réalisation de désir"
"Le rêve ne pense ni ne calcule, d'une manière générale il ne juge pas, il se contente de transformer"

- Paulo Coelho :" C'est la possibilité de réaliser un rêve qui rend la vie interessante"

- Vera Wong : "Princess" - Jeune fille habillé en princesse pour un parfum, fait rêver 

- Raymond Trousson : "Le ver est dans le fruit" ,  monde uniforme, tout est contrôlé, révèle l'anti-utopie 

- Le seigneur des anneaux 


Objet : 
- Antoine de Saint-Exupery : "Ce n'est point dans l'objet que réside le sens des choses mais dans la démarche" 

- Fight Club de D.Fincher- 1999 - Scene de la rêverie autour du catalogue Ikea

- Gran Torino -  Clint Eastwood -  2008 - que léguer et à qui léguer. 

- Émile Zola "L'assomoir" - La machine et l'homme dans l'industrie, personnification de l'objet (Marteau) 

- Wall-E- Andrew Stanton 

- Alexandro Zinna "L'objet et ses interfaces"- une différence entre l'objet utile(uniforme, usine) et l'objet esthétique (unique, artisanal). Les deux tendent parfois à se rapprocher 

-" Le bonheur c'est de continuer à désirer ce que l'on possède" Saint Augustin 

- Marie Piquemal "Ils ont décidé de vivre avec cent objets"-Liberation

Device info: HTC one M7 GE, stock android 5.0.1, TextSecure 2.14.1
Debug log: https://gist.github.com/anonymous/5d33a6dac7f6873495fd

@BP602 BP602 changed the title Wierd behavior with specific text [Bug] Weird behavior with specific text [Bug] May 10, 2015
@2-4601
Copy link
Contributor

2-4601 commented May 10, 2015

Tried to reproduce this with the given text using different themes and languages but failed.
TS 2.14.1
stock Android 5.1, Nexus 4
Android 4.0.4, Huawei U8800

I don't get any of those OpenGLRenderer warnings.

@moxie0 moxie0 added this to the 2.16.0 milestone May 10, 2015
@mcginty
Copy link
Contributor

mcginty commented May 10, 2015

Seems like this can be caused when rendering large TextViews - http://stackoverflow.com/questions/27444387/issue-on-openglrenderer-path-too-large-to-be-rendered-to-a-texture. Might need to set the layerType to software to mitigate, because this is a new device so I doubt it's a legacy problem.

@BP602
Copy link
Author

BP602 commented May 11, 2015

I can reproduce it on a LG g2, Cyanogen/Stock Android 5.0.2, TextSecure 2.14.1 2.13

@mcginty
Copy link
Contributor

mcginty commented May 11, 2015

@5boro I'm assuming this is not a consistent thing, and is just with this specifically long text?

@BP602
Copy link
Author

BP602 commented May 11, 2015

It is consistent, but seems specific to this text.
Debug log for the LG g2 : https://gist.github.com/anonymous/d45a79c0b0a1c469436b

@BP602
Copy link
Author

BP602 commented May 12, 2015

I just noticed that the text in written in white over white background, so the bug is just that there's no background either when sent or received with this text.

@agrajaghh
Copy link
Contributor

might be related to #3134 (white cursor)?

@BP602
Copy link
Author

BP602 commented May 12, 2015

Just tried a few things, it is length related, and the limit seems to be between 750 and 1000 characters.
The text was over 1700.

@McLoo
Copy link
Contributor

McLoo commented May 12, 2015

It's not the number of chars, but the number of lines!
If the background is visible for you, just feed some/many/a big amount of line breaks and the background gets veeery transparent.

Tested on dark theme. no blue bubble background, but visible white characters on black background.
As on dark theme sender and receiver text color is white <> light theme sender:white, receiver:black

@BP602
Copy link
Author

BP602 commented May 12, 2015

Good catch, but why wasn't @2-4601 able to reproduce it?

@McLoo
Copy link
Contributor

McLoo commented May 14, 2015

@5boro cause copying your text sample here eliminates all the line breaks, when pasted into TS - At least when I was testing.

@2-4601
Copy link
Contributor

2-4601 commented May 14, 2015

I saved the text (with all 39 lines) to a file and copypasted it to TextSecure from there.

@BP602
Copy link
Author

BP602 commented May 14, 2015

Are you on Android >5 @McLoo ?
Because I had the occasion to test it on a few of my friends phone, 2 Galaxy S5 and a Meizu MX3, all were on Kitkat, and the bug wasn't reproducing.

@2-4601
Copy link
Contributor

2-4601 commented May 14, 2015

I can reproduce this now on my Nexus 4, stock Lollipop 5.1.
It requires 106 or more line breaks (I had also one character/byte on each line when testing).

Here's a debug log where I

  • send a message with 105 line breaks and it renders correctly
  • check that the log contains no OpenGLRenderer warnings
  • send another message with 106 line breaks and the rendering breaks

@mcginty
Copy link
Contributor

mcginty commented May 14, 2015

Thanks for the testing all. My guess is that the line-number threshold to set off this error is variable depending on what the device decides is its max OpenGL texture size.

@mcginty
Copy link
Contributor

mcginty commented May 19, 2015

Yeah, any bubble > 4096px will cause this error, whether we set the LayerType to software or hardware.

Even more strangely, if we use a ColorDrawable or RectShape drawable instead of a GradientDrawable or RoundedRectShape drawable, this error doesn't happen. It appears Android doesn't handle rounded corners efficiently, making me wonder if we're better off using nine-patches instead of shape drawables for them.

@mcginty mcginty changed the title Weird behavior with specific text [Bug] large message bubble backgrounds fail to render May 19, 2015
@mcginty
Copy link
Contributor

mcginty commented May 19, 2015

Basically we need to not use our own shape-based drawables and move to 9patches. I started the process, but there's a lot of busywork for asset generation and re-aligning stuff.

@moxie0 moxie0 modified the milestones: 2.16.0, 2.17.0 May 21, 2015
@mcginty mcginty modified the milestones: 2.17.0, 2.18.0 Jun 4, 2015
@mcginty mcginty modified the milestones: 2.18.0, 2.19.0 Jun 4, 2015
@mcginty
Copy link
Contributor

mcginty commented Jul 2, 2015

Fixed in 2.21.0

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

No branches or pull requests

6 participants