Random Lua error on my server.

I was away from my server for 1 day, everything went to shit.
I did not add any new content besides Cake Anti-Cheat which had absolutely no problems.

Out of nowhere today we’re getting this error constantly and it makes absolutely no sense.

Again, nothing new was added.

[ERROR] lua/includes/modules/concommand.lua:51: bad argument #1 to 'lower' (string expected, got nil)
  1. lower - [C]:-1
   2. Run - lua/includes/modules/concommand.lua:51
    3. unknown - addons/ulib/lua/ulib/shared/commands.lua:1310
     4. unknown - lua/includes/modules/concommand.lua:54

Any help would be appreciated.

[editline]28th July 2015[/editline]

Okay, I’ve just made a detour of concommand.Run to return nothing if the command is empty or nil.
I will post results to see if this fixes it.

Why would you do that? Why not just fix your code?

Look at the error.

I have no fucking clue WHERE the problem is.

I didn’t add anything (that I know of) that includes a concommand.Run function, all I’ve added recently was cake anti-cheat and i’m not about to spend 8 hours trying to find the error in there.

From the error, all I see is that it’s coming from ULib, and that’s not accurate at all.

[editline]28th July 2015[/editline]



[editline]28th July 2015[/editline]

Trying one more thing, after this I have absolutely no idea what to do.

Check the stack trace… the error is in ULib.

Yeah, nothing is fixing it. I consider myself screwed at this point.

[editline]28th July 2015[/editline]

Yes, I never modified ULib, I found the line of code but there’s no reason it should be broken.
There is no reason this should be happening when I HAVENT TOUCHED ANYTHING.
How am I supposed to fix something that has no real error?

That IS a real error. Can you post the line of ULib here?

if SERVER then
	sayCommandCallback = function( ply, sayCommand, argv )
		if not sayCmds[ sayCommand ] then
			return error( "Say command \"" .. sayCommand .. "\" is not defined!" )

		sayCmds[ sayCommand ].__fn( ply, sayCmds[ sayCommand ].__cmd, argv )

	local function hookRoute( ply, command, argv )
		concommand.Run( ply, table.remove( argv, 1 ), argv ) -- I assume it's here
	end -- Line 1310
	concommand.Add( "_u", hookRoute )

Here’s the patch script which didn’t work, it just happened again after being online for 40 minutes.

local patch = {}

patch.Detours = {}

function patch.Detour( nick, old, new )
	patch.Detours[old] = new
	MsgC( Color( 255, 0, 0 ), "[TSP] " )
	MsgC( Color( 255, 255, 0 ), "Detouring function " )
	MsgC( Color( 0, 255, 255 ), "'" .. nick .. "'
" )

patch.Detour( "concommand.Run", concommand.Run, function( ply, command, arguments, args )
	if command == "" or command == " " or command == nil then
		 MsgC( Color( 255, 0, 0 ), "Found empty command '" .. command .. "'
" )
		Color( 255, 0, 0 ), "[TSP] ",
		Color( 0, 255, 0 ), "[" .. command .. "]" )
		return patch.Detours[concommand.Run]( ply, command, arguments, args )
end )

patch.Detour( "string.lower", string.lower, function( str )
	if str == "" or str == " " or str == nil then
		MsgC( Color( 255, 0, 0 ), "Found empty string '" .. str .. "'
" )
		Color( 255, 0, 0 ), "[TSP] ",
		Color( 0, 255, 0 ), "[" .. command .. "]" )
		return patch.Detours[string.lower]( str )
end )

table.remove doesn’t return anything: that’s your problem.

why would an empty console command be the cause of your problem? that doesn’t make sense to me logically.
also, it’s kind of rude that you would chargeback ley to buy cigarettes when you claim your server rakes in over $1000 a month, tyler wearing.
you failed to install the module, you think that running multiple ACs is inefficient, you don’t like the logging because it’s not in one file, it has no menu, these are your reasons? it’s a pretty much autopilot anti-cheat, you can’t have your cake and eat it too.

Helped him over Steam. Dumb ULX hook override was the issue.

Totally irrelevant, stop fucking flaming.
Also none of your business, go away.

flaming? i’m point out the cold, hard truth, just because you don’t like something doesn’t mean you can just take your money back to buy cigarettes when you’ve paid for an addon, regardless of what claims you make.
to think you haven’t grown a bit in 5 years absolutely baffles me.

Looooooooool. Pretends to know me
Yeah have fun with that mate.

According to code_gs there is absolutely nothing we can do.
If anyone has any ideas it’d really help.

I submitted a bug report to ULX, I doubt anything will be done besides some kid telling me it’s my addons

i can happily tell you that code_gs is wrong, as unusual as it is for code_gs to be wrong, take a look at the function that the error originates from and see where else it’s called in ULX, all will become clear.

Both ULX and ULIB both don’t have a files at /lua/includes/modules, they don’t even have the includes folder at /lua/. You’re either running an ancient version of ULX or using some custom code. If updating ULX from the their GitHub doesn’t work then temporarily remove one addon at a time till you find the culprit.

Won’t help because even the one on GitHub has this problem, it’s really fucking simple to fix, the error legitimately tells you what the problem is, the thing is I’m not offering any help to Tyler because he chargebacked Ley and then defaulted out to asking for help when he ran into a problem.

That’s because I didn’t say that. I said an addon he had was conflicting with ULX’s concommand override, which created an error from different calling methods

Well then that would explain a lot, it sounded unusual that you would say that there was “absolutely nothing that could be done” considering how much unusual shit that occurred somewhere in the engine that has been fixed in GLua alone.

ULX devs fixed the exploit with removing an empty arg: https://github.com/Nayruden/Ulysses/commit/ddc0f93769c27f5ab0939c081a1bd95c5241a138