[Semi-critical] Assert doesn't return the value properly since about an hour

Describe the bug. Describe what is happening when the bug occurs. Describe what you would normally expect to occur.

assert doesn’t always return the value anymore. This causes my game to break. assert should always return the value passed to it, and if it is false, error.

> print('hello?', assert(tonumber('1')))
hello?

Oddly enough, when calling it multiple times, only the last value is not returned properly.

> print('hello?', assert(tonumber('1')), assert(tonumber('2')))
hello? 1
> print('hello?', assert(tonumber('1')), assert(tonumber('1')), assert(tonumber('2')))
hello? 1 1

How often does the bug happen (Everytime/sometimes/rarely)? What are the steps that reproduce the bug? Please list them in very high detail. Provide simple example places that exhibit the bug and provide description of what you believe should be the behavior.

Always, see above. Happens in Studio and all new game servers.

Where does the bug happen (www, gametest, etc) Is it level-specific? Is it game specific? Please post a link to the place that exhibits the issue.

Live

Would a screenshot or video help describe it to someone? If so, post one.

n/a

For graphics bugs, it is sometimes helpful to know your system specs, especially graphics card.

n/a

When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.

Since an hour.

Anything else that you would want to know about the bug if it were your job to find and fix it.

n/a

1 Like

Should be fixed in new servers, sorry about this! (optimization we enabled ~2 hours ago went awry)

3 Likes

Can confirm it’s working again now, thanks!

And yeah confirming that the issue was only for using assert in contexts where Lua expects a function call to return an arbitrary unknown number of values, so

local foo = assert(...)

would work but

function foo() return assert(...) end

would not.

Explains why I originally had the issue with local x = {assert(...), assert(...)} too.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.