Comments (13)
So one word is repeated?
from defold-richtext.
Yeah. Always last one. And it's not in the right place. Also the metrics for the whole line are incorrect (the line seems to be larger than it should be). What was kinda weird is that the game would go into a "mode" where this bug would happen consistently for some percentage of the rich text being created on the screen, then after a while, it would go back to normal.
from defold-richtext.
Maybe you're inserting/deleting things from the words array while iterating it? I don't remember something like that, though (except for combine_words, which I was not using in the build above).
from defold-richtext.
Maybe there's a rare crash somewhere that stops the flow of execution somehow. Do you have a Lua crash handler set?
from defold-richtext.
Fair point. I just realised that in that particular build, the google analytics extension calls sys.set_error_handler()
and doesn't print out the error, so it could have happened that GA swallowed the error. I'll put a print in that and hope it happens again.
I do have the calls to richtext.create()
wrapped in a xpcall
, so if anything happens there, the stack trace should get printed out regardless, but I've seen nothing of that.
from defold-richtext.
Though it seems like the errors are printed anyway by the engine before the error handler set with sys.set_error_handler()
is called... So that shouldn't be a problem.
from defold-richtext.
Any luck reproducing this issue?
from defold-richtext.
Not really. We haven't had direct access to the machine on which this was happening and we didn't get the chance to investigate further since Gamescom. But it's surely something we need to look into.
from defold-richtext.
I have this happening again to a user:
https://steamcommunity.com/app/1016770/discussions/0/1753520327890252593/#c1753520327891986196
from defold-richtext.
This is different issue from when some characters get lost though isn't it?
What's the string that gets passed to RichText for the choice "Let's go back to talking about yourself, Darryl"? Is there anything special with how you treat the returned result from RichText?
from defold-richtext.
I'm not sure. In the original issue the last word got duplicated, which is the case here as well. The only difference is that now I'm using combine_words (and also the code for that changed quite a bit since I first spotted the issue). It also seems like it manifests intermittently and only on particular machines (this user's for now).
The only operations that I do on the words are the following:
- I spawn them in a container text node with an empty string text (to not break batching), which I then use to vertically align the text inside another container.
- If I need shaky text (not in the above screenshot), then I go through the words table and replace words with
richtext.characters(that_word)
(and delete the original nodes). - I occasionally go through the words table to change the color of the text, but those are just two calls to
gui.set_color()
andgui.set_outline()
.
from defold-richtext.
Oh yeah, sorry, I seem to recall that there was an issue with some characters getting lost, but I think that was a different thing.
I wonder why it only happens for some users? It doesn't really feel like a rendering issue, more like a bug in RichText with a duplicate text node that gets places incorrectly. Could it be that the text is created more than once and that some cleanup code you have somewhere doesn't delete all nodes? It would not really explain why the text isn't in exactly the same place though... unless you modify the text afterwards and reposition words.
from defold-richtext.
No updates to this issue in a long time and no clear steps to reproduce. Closing.
from defold-richtext.
Related Issues (20)
- Add options to make images conform in scale to fit line height of previous or next char HOT 3
- Macro tag to apply multiple sets of commonly used tags at once HOT 4
- Unnecessary spaces between nodes of different colors. HOT 8
- Long Text HOT 1
- ALIGN_JUSTIFY last line bug HOT 3
- add ability to automatically scale text to fit in the bounds supplied HOT 1
- Spacing between words/nodes HOT 1
- Text alignment like pivot in text node HOT 4
- Multiple repeat tags causes Lua memory allocation error. HOT 1
- Cleaner unicode character insert method HOT 1
- Color tag shouldn't cause words to be "broken up"? HOT 7
- Add function to get plain text of text with tags in it HOT 1
- add ability to get the size needed for a richtext node before setting the text
- <a=msg_id>link</a> scales too much with size tag when size ~= 1.
- combine_words seems to be broken HOT 1
- When using <a> tag along with combine_words on_click throws an error HOT 1
- Color tag is adding extra white space between words HOT 1
- valign doesn't seem to be doing anything HOT 2
- Example Project Error HOT 1
- Add a richtext.remove equivalent for characters HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from defold-richtext.