Error with LuaVerge
Displaying 1-9 of 9 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Code

In preparation for next week's heated competition, I tried to start up the most recent version of Verge with Lua turned on, but I got an error that seems to be related to Lua bindings...?

You will [should] be able to reproduce the error by following these simple steps! :D |:(
I built a release version in Visual Studio and copied that new verge.exe into the website's most recent release folder, (The download from the left sidebar (Which, unmodified, seems to work fine) ) replacing the old 2007 exe. Then I edited the verge.cfg file to enable Lua.

Upon opening Verge, I was notified of an "Access violation reading location 0x00000028." The error seems to have occurred in the function_committer.register function in function.hpp. Can anyone tell me what I'm doing wrong? Overkill, I'm looking in your direction. ;)

Posted on 2008-12-20 19:25:46

Overkill

Okay, so the very recent (developer) builds of Verge have kind of killed Lua support by accident. It's a situation that I hoped people wouldn't need to bring into light until we can spend some time to fix it. And the release isn't public, so I can't really take any responsibility here.

Zeromus optimized VC code to run faster, and in the process brought up a FEW problems with LuaVerge. Anyway, not responsible for this issue. Dev builds are unstable, after all! This is something that is still being worked out.

Gimme a sec, and I'll route down the executable for Verge that I've been using -- a little oldish, but it runs.

EDIT: See news post.

Posted on 2008-12-20 23:44:26 (last edited on 2008-12-21 00:33:41)

mcgrue

whoa whoa whoa.

Let's fix the problem. The reason I wanted to push the lua in this competition was to force these issues and smoke them out.

Posted on 2008-12-21 03:51:12

Overkill

Okay, but the issues caused by the recent dev builds are pretty major. It's because std::string was replaced by a custom StringRef class so that strings would use pooled memory (meaning less allocations and stuff -- which is good, I agree).

But LuaVerge is broken as a result, cause the functions expect StringRefs to be passed instead of std::string, and it can't cast with LuaBind's templated crap.

Though the luabind devs did introduce a few new features in 0.8 that may fix it, it'd take a fair chunk of time to actually put that in: http://github.com/luabind/luabind/commit/e57f769493ef32e940d7e31471d1d81e5c605f68

In addition, me and zeromus were talking about making our own custom Lua wrapper and tossing out LuaBind, but that opens up many potentional bugs. Although, it'd mean we'd have full control over our binding...

Anyway, that's what's going on in recent dev builds.

So in other words, I'm thinking to save some headaches, people should use http://www.bananattack.com/stuff/verge.exe at least until we fix it.

Posted on 2008-12-21 09:56:09 (last edited on 2008-12-21 10:28:02)

Brainkill

Hi Overkill. I've come across a problem using LuaVerge.

I only have three simple lines in my system.lua file:

function autoexec()
Exit("This game requires that Lua be disabled to run.");
end

But when I run Verge, I get this error:

Exiting:
Error when calling 'autoexec': attempt to call global 'Exit' (a nil value)
Traceback (most recent call first):
File '[string "function __err(e)..."]', line 34, in global Exit
File '[string "system.lua"]', line 2, in (function)

Am I doing something wrong?

Posted on 2008-12-23 17:32:32

Overkill

Yeah, there's a slight change in what needs to be done here, basically all the builtins in LuaVerge need to have "v3." in front of them. So try v3.Exit() instead of Exit and everything should be happy.

Posted on 2008-12-23 22:45:18

Brainkill

Yup. Everything is indeed happy. Thanks!

Posted on 2008-12-24 01:43:02

miky

Not everything is indeed happy for me. It says it can't access v3 (a nil value) when I do that.

:(

Posted on 2008-12-24 23:05:32

Brainkill

Hey miky, are you using the latest Verge.exe file from http://www.bananattack.com/stuff/verge.exe ?

It won't work, otherwise.

Merry Christmas, btw. :)

Posted on 2008-12-25 12:15:13 (last edited on 2008-12-25 12:19:00)


Displaying 1-9 of 9 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.