GithubHelp home page GithubHelp logo

Comments (13)

danielga avatar danielga commented on June 29, 2024 1

Seems like it's working, closing the issue.

from gm_luaerror.

danielga avatar danielga commented on June 29, 2024

You said you're running the module on a 32 bits dedicated Linux server. Is this on the main or x86-64 branch of Garry's Mod?

from gm_luaerror.

wrefgtzweve avatar wrefgtzweve commented on June 29, 2024
> version
Protocol version 24
Exe version 2022.06.08 (garrysmod)
Exe build: 19:30:41 Jun  1 2022 (8607) (4000)
GMod version 2022.06.10, branch: unknown
Linux 32bit Dedicated Server

Main, i require it on autorun

from gm_luaerror.

danielga avatar danielga commented on June 29, 2024

I am unable to reproduce the issue on a clean, main branch, dedicated Linux server.

version
Protocol version 24
Exe version 2022.06.08 (garrysmod)
Exe build: 19:30:41 Jun 1 2022 (8607) (4000)
GMod version 2022.06.10, branch: unknown
Linux 32bit Dedicated Server
lua_run PrintTable(luaerror)
> PrintTable(luaerror)...
EnableClientDetour = function: 0xf1b0d748
EnableCompiletimeDetour = function: 0xf1b0d7d8
EnableRuntimeDetour = function: 0xf1b0d790
FindWorkshopAddonFileOwner = function: 0xf1b0d7f8
Version = luaerror 1.5.8
VersionNum = 10508

Do you use other modules? If yes, can you list them please? Maybe providing links to them or their source code would help too.

from gm_luaerror.

wrefgtzweve avatar wrefgtzweve commented on June 29, 2024

We use
https://github.com/storm37000/gmsv_antifreeze
https://github.com/FredyH/GWSockets
https://github.com/danielga/gmsv_serversecure
https://github.com/WilliamVenner/gmsv_reqwest
https://github.com/FredyH/MySQLOO
and luaerror of course

from gm_luaerror.

danielga avatar danielga commented on June 29, 2024

After looking at luaerror's source code and what causes that error to appear, I've got an interesting test for you.

LUA->ReferencePush( 1 );
if( !LUA->IsType( -1, GarrysMod::Lua::Type::FUNCTION ) )
	LUA->ThrowError( "reference to AdvancedLuaErrorReporter is invalid" );

First, this gets the first element of Lua's registry.
In this case, we're checking if it's a function and it is, because the error is not that one.

AdvancedLuaErrorReporter = LUA->GetCFunction( -1 );
if( AdvancedLuaErrorReporter == nullptr )
	LUA->ThrowError( "unable to obtain AdvancedLuaErrorReporter" );

Secondly, we try to get a pointer to that function. Now, if it was the original one, this would've worked. Unfortunately, since the error you got was this one, it means it's NOT a C function.

Can you try print(debug.getregistry()[1]) and PrintTable(debug.getinfo(debug.getregistry()[1], "flnSu")) before you require luaerror? I think that'll tell us it's not the original function.

from gm_luaerror.

wrefgtzweve avatar wrefgtzweve commented on June 29, 2024
lua_run print(debug.getregistry()[1])
> print(debug.getregistry()[1])...
function: 0xf1bf91b8
lua_run PrintTable(debug.getinfo(debug.getregistry()[1], "flnSu"))
> PrintTable(debug.getinfo(debug.getregistry()[1], "flnSu"))...
currentline     =       -1
func    =       function: 0xf1bf91b8
isvararg        =       true
lastlinedefined =       221
linedefined     =       211
namewhat        =
nparams =       0
nups    =       1
short_src       =       lua/autorun/advr_error_api.lua
source  =       @lua/autorun/advr_error_api.lua
what    =       Lua

Hmmm
file originates from https://steamcommunity.com/sharedfiles/filedetails/?id=2853674790
which is used in https://github.com/Xalalau/gerror https://gerror.xalalau.com/

from gm_luaerror.

danielga avatar danielga commented on June 29, 2024

Can you give this build a go? I had to sigscan for the original function and detour that instead...

from gm_luaerror.

wrefgtzweve avatar wrefgtzweve commented on June 29, 2024
lua_run print(debug.getregistry()[1])
> print(debug.getregistry()[1])...
function: 0xf1c57348
lua_run debug.getregistry()[1] = function() end
> debug.getregistry()[1] = function() end...
lua_run print(debug.getregistry()[1])
> print(debug.getregistry()[1])...
function: 0xeaa616a8
lua_run require("luaerror")
> require("luaerror")...
lua_run print(luaerror)
> print(luaerror)...
table: 0xeaa619f0

from gm_luaerror.

brandonsturgeon avatar brandonsturgeon commented on June 29, 2024

I maintain a project that relies on this tool - I hear from a number of users that they still have this problem on the latest release.

What info could I gather from them to help debug the issue?

from gm_luaerror.

danielga avatar danielga commented on June 29, 2024

Do you gather analytics, like luaerror version? Because that would be really helpful to know whether they have it updated or not. If yes, it might've broken again, and I'd appreciate if you opened a new issue.

from gm_luaerror.

brandonsturgeon avatar brandonsturgeon commented on June 29, 2024

Noted. Thanks 👍

from gm_luaerror.

CheezusChrust avatar CheezusChrust commented on June 29, 2024

I posted a new issue regarding this about 3 weeks ago - #47
I'm running on the latest GMod update and latest version of luaerror

from gm_luaerror.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.