Evaluating Decoda - Can't debug my embedded code sample
bluntcoder
Join Date: 2010-09-10 Member: 73965Members
<div class="IPBDescription">An exception has been caught: - attempt to call a nil value</div>Hello,
I'm evaluating Decoda for our next game. It looks pretty sweet so far, but I can't seem to get the debugger working with my embedded Lua sample executable. I have a simple program written in C++ that simply reads in an add() function and executes it. Essentially this sample: <a href="http://gamedevgeek.com/tutorials/calling-lua-functions/" target="_blank">http://gamedevgeek.com/tutorials/calling-lua-functions/</a>
I read that I had to embed lua directly in the program, so instead of statically linking to a lua5.1.lib, I downloaded the lua 5.1.4 source and threw it into my program. I set my project settings to the following:
<b>Command: C:\Documents and Settings\marekm\My Documents\Visual Studio 2005\Projects\luadd\Debug\luaadd.exe
Command Arguments: [none]
Working Directory: C:\Documents and Settings\marekm\My Documents\Visual Studio 2005\Projects\luadd\Debug\</b>
When I run with debugging, I get the following error pop up.
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->An exception has been caught: - attempt to call a nil value<!--colorc--></span><!--/colorc-->
If I use the release instead of the debug version, I get no pop up, but errors in the output:
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--coloro:#F4A460--><span style="color:#F4A460"><!--/coloro-->Warning 1004: Couldn't hook Lua function 'lua_newthread'
Warning 1000: Lua functions were not found during debugging session<!--colorc--></span><!--/colorc--><!--colorc--></span><!--/colorc-->
I'm using the latest Decoda with Lua 5.1.4. Sample program compiled with Visual Studio 2005 SP1 on Windows XP SP3.
Can anyone help me with this?
I'm evaluating Decoda for our next game. It looks pretty sweet so far, but I can't seem to get the debugger working with my embedded Lua sample executable. I have a simple program written in C++ that simply reads in an add() function and executes it. Essentially this sample: <a href="http://gamedevgeek.com/tutorials/calling-lua-functions/" target="_blank">http://gamedevgeek.com/tutorials/calling-lua-functions/</a>
I read that I had to embed lua directly in the program, so instead of statically linking to a lua5.1.lib, I downloaded the lua 5.1.4 source and threw it into my program. I set my project settings to the following:
<b>Command: C:\Documents and Settings\marekm\My Documents\Visual Studio 2005\Projects\luadd\Debug\luaadd.exe
Command Arguments: [none]
Working Directory: C:\Documents and Settings\marekm\My Documents\Visual Studio 2005\Projects\luadd\Debug\</b>
When I run with debugging, I get the following error pop up.
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->An exception has been caught: - attempt to call a nil value<!--colorc--></span><!--/colorc-->
If I use the release instead of the debug version, I get no pop up, but errors in the output:
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--coloro:#F4A460--><span style="color:#F4A460"><!--/coloro-->Warning 1004: Couldn't hook Lua function 'lua_newthread'
Warning 1000: Lua functions were not found during debugging session<!--colorc--></span><!--/colorc--><!--colorc--></span><!--/colorc-->
I'm using the latest Decoda with Lua 5.1.4. Sample program compiled with Visual Studio 2005 SP1 on Windows XP SP3.
Can anyone help me with this?
Comments
We threw in some extra dummy calls to the needed functions and the debugger could attach again.
HOpe this helps