Closed dapetcu21 closed 3 years ago
So one word is repeated?
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.
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).
Maybe there's a rare crash somewhere that stops the flow of execution somehow. Do you have a Lua crash handler set?
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.
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.
Any luck reproducing this issue?
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.
I have this happening again to a user:
https://steamcommunity.com/app/1016770/discussions/0/1753520327890252593/#c1753520327891986196
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?
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:
richtext.characters(that_word)
(and delete the original nodes).gui.set_color()
and gui.set_outline()
.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.
No updates to this issue in a long time and no clear steps to reproduce. Closing.
I don't know if RichText is at fault, but we've been having this bug happen once or twice a day on one of our expo machines at Gamescom. RichText is the main shared codepath between all the occurence points of this bug, so I said I'd share.
We haven't had it ever happen on any other PC.
The machine is a MacBookPro10,1, 8GB RAM, Mojave 10.14.5, NVIDIA GT650M, connected to an external display.
Nothing in the console.