Code Monkey home page Code Monkey logo

Comments (13)

britzl avatar britzl commented on July 18, 2024

So one word is repeated?

from defold-richtext.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

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.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

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.

britzl avatar britzl commented on July 18, 2024

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.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

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.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

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.

britzl avatar britzl commented on July 18, 2024

Any luck reproducing this issue?

from defold-richtext.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

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.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

I have this happening again to a user:

B13BE884-C7C4-4AB9-AA11-88321325ACB5

https://steamcommunity.com/app/1016770/discussions/0/1753520327890252593/#c1753520327891986196

from defold-richtext.

britzl avatar britzl commented on July 18, 2024

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.

dapetcu21 avatar dapetcu21 commented on July 18, 2024

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() and gui.set_outline().

from defold-richtext.

britzl avatar britzl commented on July 18, 2024

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.

britzl avatar britzl commented on July 18, 2024

No updates to this issue in a long time and no clear steps to reproduce. Closing.

from defold-richtext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.