Fwd: Luabind access violation on module definition

Thales Luis Rodrigues Sabino <[email protected]> Thu, 26 Apr 2012 18:23:55 -0300
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <CAHvrNafW5gAf+F0kvRJEimn5T+N3gT86B5FWtH7v-AW0iHwQiQ@mail.gmail.com>
Hi, thanks for the support.

The application crashes in the file xstring. Two steps back in the stack
trace and I got that the crash occurs here

LUABIND_API void add_overload(
    object const& context, char const* name, object const& fn)
{
    function_object* f = *touserdata<function_object*>(getupvalue(fn, 1));
    f->name = name;

*    if (object overloads = context[name])*
    {
        if (is_luabind_function(overloads) && is_luabind_function(fn))
        {
            f->next = *touserdata<function_object*>(getupvalue(overloads,
1));
            f->keepalive = overloads;
        }
    }

    context[name] = fn;
}


---------- Forwarded message ----------
From: Ryan Pavlik <[email protected]>
Date: Thu, Apr 26, 2012 at 6:06 PM
Subject: Re: [luabind] Luabind access violation on module definition
To: [email protected]


I've used it in 64-bit on Linux. Could  you try building with debug on and
see actually where it's crashing? 64-bit pointers on their own aren't too
useful, sadly.

Ryan

On Thu, Apr 26, 2012 at 2:31 PM, Thales Luis Rodrigues Sabino <
[email protected]> wrote:

> Hello everyone,
>
> I'm new to the list and to lua and to luabind. I was looking into a way to
> include a script language into my application and lua was my choice. I
> discover lua bind project when looking for simple examples for exporting
> classes to lua.
>
> I tried run the first example on the documentation
>
> int main( int argc, char* argv[] ) {
>  using namespace luabind;
>
>  lua_State *L = luaL_newstate();
>  open(L);
>
> module(L) [
>  def( "greet", &greet )
> ];
>
> But it crashes on the module definition. I'm writing a 64bits application
> to run under Windows. So, I compiled lua for 64bits and I compiled luabind
> to 64bits with VC2010 as well. The problem is that it crashes on the module
> definition. More especifically
>
> Unhandled exception at 0x000007fef27438ac (luabind.dll) in
> LuaBindExample.exe: 0xC0000005: Access violation writing location
> 0x000000013f9ff7b1.
>
> Does luabind works with 64bits?
>
> Thanks in advance.
>
> --
> Anyday, anytime.
>
> http://www.capimlokura.com.br
>
> Thales Luis Rodrigues Sabino
> TLuisRS
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>


-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[email protected]
http://academic.cleardefinition.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user




-- 
Anyday, anytime.

http://www.capimlokura.com.br

Thales Luis Rodrigues Sabino
TLuisRS

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user