Jump to content

Inspect Self BUG


YIJI
  • Pending

The string.match function in "scripts\widgets\text.lua" line 187 is unable to handle utf-8 characters and will return nil when usings regex "(%w+)". That will cause game to crash in "PlayerAvatarPopup" when doing self inspection

 

7E}HJDVU3V$X](8T]W(8I17_副本.jpg

1D]{{DCOADDI54({ILYU7XS.png


Steps to Reproduce
Click Inspect Self



User Feedback


I don't seem to have this issue when clicking the inspect self button, with proof uploaded. It looks like you have mods enabled. Try disabling them is my best suggestion. Don't know if your OS will make a difference. 

 

Inspecting Self is Ok.mp4

Share this comment


Link to comment
Share on other sites

This bug appeared after version 287366 and has not been fixed so far (version 287758).

In scripts/widgets/text.lua line188,

string.match(line, first)

variable first could be nil when some language mod (such as Chinese Language Pack) was enable.

In line 187 of text.lua , I found this code:

 local first = str:match("(%w+)(.+)")

When str does not contain any letters, first would be nil .

for example: 

Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> str = "觀自在菩薩行深般若波羅蜜多時,照見五蘊皆空"
> print(str:match("(%w+)(.+)"))
nil
> str = "吾怒矣,甚 Angry。是不可行,今寧獲罪於諸君"
> print(str:match("(%w+)(.+)"))
Angry   。是不可行,今寧獲罪於諸君
>

In line 188 of text.lua, the developer did not strictly ensure that the variable first is not nil before calling string.format(), thus causing this bug.

Edited by Flynn_

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...