Code Monkey home page Code Monkey logo

Comments (9)

sbarisic avatar sbarisic commented on June 15, 2024

I think the problem was a nuget package that was oudated here, seems to work on my side just fine now. Try updating and compiling this module again

binaryload(file.Read("gluac.out"))()

This is how you execute the binary compiled by gluac.

from binarylua_win32.

VaasKahnGrim avatar VaasKahnGrim commented on June 15, 2024

I'm still getting Couldn't find function in library! when the file gets loaded on my end

from binarylua_win32.

sbarisic avatar sbarisic commented on June 15, 2024

binarylua_win32.zip

Hmm, very strange. Try this precompiled one.

from binarylua_win32.

VaasKahnGrim avatar VaasKahnGrim commented on June 15, 2024

results in a crash now, so I'm guessing its now doing something in lua atleast. I'm guna put the crash dump through metaconstructs mdump reader real quick

from binarylua_win32.

VaasKahnGrim avatar VaasKahnGrim commented on June 15, 2024

http://dumps.metastruct.uk.to/analyze/fcc897cdcf2b95003a2d623b1b503af8d473e42ed77f983ec5b854620d90244b

from binarylua_win32.

sbarisic avatar sbarisic commented on June 15, 2024

Try compiling a simple print("Hello World") and running that

Also if you could upload the existing source and compiled lua file that you tried to run and i'll check it out tomorrow or when i get some free time

from binarylua_win32.

VaasKahnGrim avatar VaasKahnGrim commented on June 15, 2024

upload_for_binarylua.zip

same issue with crashing. I zipped the compiled and uncompiled lua file for you. much appreciated btw for the help today and tomorrow

from binarylua_win32.

sbarisic avatar sbarisic commented on June 15, 2024

I put your gluac.out into garrysmod\data directory and appended the following code

print("Trying to load binarylua")
require "binarylua"

loaded_func = binaryload(file.Read("gluac.out"))
loaded_func()

To the end of this file garrysmod\lua\menu\menu.lua
This is what i get when i start the game and open the console

IFeayDN2rH

I really have no idea what's going on. Maybe try replicating this in the main menu or disabling all addons temporarily. One of them may be interfering, especially if it also uses binary modules... which should not happen.

It also works fine when i start the game and run the code serverside or clientside.

I am compiling binarylua_win32.dll in Visual Studio 2019 with Platform target x86 and unsafe code enabled, and when i run dumpbin /exports binarylua_win32.dll from the visual studio developer command prompt, i get the following lines somewhere in the output which means gmod should be able to load the dll just fine.

    ordinal hint RVA      name

          1    0 000059CE gmod13_close
          0    1 000059BE gmod13_open

I am assuming your crash happens when you call binarychunk(...) in lua?

from binarylua_win32.

VaasKahnGrim avatar VaasKahnGrim commented on June 15, 2024

Same version of VS here aswell.
I've moved the code to lua/menu/menu.lua at the end of the file now exactly as you have above and did a fresh compile with unsafe code enabled and targeting the x86 platform

as for the VSDCP I get the following output

lg cvkhg c

I also tested with commenting out these 2 lines which stops the crashing when main menu loads
--loaded_func = binaryload(file.Read("binarylua/gluac.out")) --loaded_func()

so my guess is probably something with binarychunk(...) or binaryload(...)? unsure. but loading the with require() isn't causing the issue for sure atleast

from binarylua_win32.

Related Issues (1)

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.