Re: C++ function called twice!!

Kristoffer Danielsson <[email protected]> Wed, 1 Feb 2012 00:46:03 +0100
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi again. You were right. I'm a noob :PIt was a bug in my code... sorry!
 Date: Tue, 31 Jan 2012 17:21:22 -0600
From: [email protected]
To: [email protected]
Subject: Re: [luabind] C++ function called twice!!

It's hard to know with such generic dummy code - can you make a minimal test case that shows the issue?  I'm doubting it's a Lua bug - it may be a Luabind bug, or it may be a bug in your code, but I've never seen this happen before.

Ryan

On Tue, Jan 31, 2012 at 4:12 PM, Kristoffer Danielsson <[email protected]> wrote:





Luabind 0.9 (090216), Lua 5.1.3, VC++ 2010 SP1, debug mode.
 
I have a complex script with a function. Let's call it "foo". I call "foo" using call_function<>. "foo" then calls C++ function "bar". You get the idea :P

 
function foo(blah a)
     a:bar(x)
end
 
I have debugged this thoroughly and I'm convinced that "bar" is called twice. Putting debug printouts around it and catching breakpoints in my C++ code proves this. There is only one call to "bar" from Lua, yet it seems to call it twice. My parameters are pushed to the Lua stack ONCE.

 
Has anyone of you guys encountered this weird behavior? Is it a known bug? My guess is that this is a bug inside LUA!
 
Please advise!
 		 	   		  

------------------------------------------------------------------------------

Keep Your Developer Skills Current with LearnDevNow!

The most comprehensive online learning library for Microsoft developers

is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,

Metro Style Apps, more. Free future releases when you subscribe now!

http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________

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



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

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