TeamUlysses / ulib

ULib: A Lua library for more rapid development on Garry's Mod servers
http://ulyssesmod.net
Other
104 stars 55 forks source link

ULib.execFile can cause errors #26

Closed markusmarkusz closed 5 years ago

markusmarkusz commented 8 years ago

Steps to reproduce

  1. Create for example a server.cfg
  2. Execute it with (in this case) "ulx exec server.cfg" (This command is using ULib.execFile)
  3. Have fun.

    Expected behavior

A config should get executed.

Actual behavior

The log got spammed.

Error(s) in server console, if any

http://hastebin.com/taqozogeyi.txt (it can also happen if there are other commands)

Version

ULib v2.61 ULX v3.71d (07/02/16)

With this I generated a 2 Gigabyte log on a test server.

Nayruden commented 7 years ago

Unable to reproduce, can you link your server.cfg with any sensitive values removed?

markusmarkusz commented 7 years ago

I know why that happens. If you're trying to execute a blocked ConVar/ConCommand then this issue happens. For example with rcon_password "". game.ConsoleCommand() doesn't allow executing this. You can test it with a server.cfg like this:

rcon_password ""
sv_password ""
(any var that can be executed)
Nayruden commented 7 years ago

I tested with ttt_preptime_seconds "10", as that was what was in your spam, and it worked fine for me.

markusmarkusz commented 7 years ago

Try this config:

rcon_password “hereisapassword“
sv_password "hereisapassword"
ttt_preptime_seconds "10"
Nayruden commented 7 years ago

Sorry for the delay... I tried the config you gave and it still works fine for me.

markusmarkusz commented 7 years ago

This is strange. The bug seems to happen only by chance, but it exists. Just because game.ConsoleCommand() can't execute all commands.

Nayruden commented 7 years ago

So if you run "ulx exec server.cfg", you only occasionally get the error?

markusmarkusz commented 7 years ago

I haven't used this command so often, because I don't need so large server logs. But I got this message spammed after I ran a server.cfg, where sv_password and rcon_password were set to "". I can test again, even if I don't do it. But it is strange that you didn't get this problem. Is it perhaps dependent on the line endings?

markusmarkusz commented 7 years ago

Try testing this config: https://hastebin.com/fuzepawawu.cfg