Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualKhatharr

Posted 03 November 2012 - 05:22 AM

Good old "Access Violation Error": Trying to access something that's out of the page or do something that a page isn't authorized for. Sometimes it can be trying to free a pointer that's not allocated. Possibly Lua is being de-initialized and then trying to free an internal pointer or something. If you've got everything set up right then it may actually be a Lua code problem. I had a similar problem with IrrKlang a while back and they fixed it in the next release (after I spent 5 hours trying to find the problem).

Check the Lua site and see if there's a newer version or else maybe a ticket in the bug-tracker.

Apart from that I think we'd need to know more about what's going on at your end. Does the Lua embedding doc say anything about necessary compiler or linker settings? Do you really need to extern "C" an .hPP file? What is the returned value from dostring()?

Poking around a little on google, do you need to call "luaL_openlibs(L)" after creating the state?

#7Khatharr

Posted 03 November 2012 - 05:10 AM

Good old "Access Violation Error": Trying to access something that's out of the page or do something that a page isn't authorized for. Sometimes it can be trying to free a pointer that's not allocated. Possibly Lua is being de-initialized and then trying to free an internal pointer or something. If you've got everything set up right then it may actually be a Lua code problem. I had a similar problem with IrrKlang a while back and they fixed it in the next release (after I spent 5 hours trying to find the problem).

Check the Lua site and see if there's a newer version or else maybe a ticket in the bug-tracker.

Apart from that I think we'd need to know more about what's going on at your end. Does the Lua embedding doc say anything about necessary compiler or linker settings? Do you really need to extern "C" an .hPP file? What is the returned value from dostring()?

#6Khatharr

Posted 03 November 2012 - 05:06 AM

Good old "Access Violation Error": Trying to access something that's out of the page or do something that a page isn't authorized for. Sometimes it can be trying to free a pointer that's not allocated. Possibly Lua is being de-initialized and then trying to free an internal pointer or something. If you've got everything set up right then it may actually be a Lua code problem. I had a similar problem with IrrKlang a while back and they fixed it in the next release (after I spent 5 hours trying to find the problem).

Check the Lua site and see if there's a newer version or else maybe a ticket in the bug-tracker.

Apart from that I think we'd need to know more about what's going on at your end. Does the Lua embedding doc say anything about necessary compiler or linker settings? Do you really need to extern "C" an .hPP file? What is the returned value from dostring()?

Edit: Just occurred to me, should you actually call the close function in this case? I've never embedded Lua, so I don't know the API, but is the close function used to release the resources acquired by newstate or is it for closing a somehow 'activated' form of the interpreter? I believe when embedding Ruby you have to create a 'node' and then you can either use the API to make calls to it or you can call a 'run' function on it (or usually both, the interactions being adding classes and etc and then it 'runs' on a script that uses the added types.).

#5Khatharr

Posted 03 November 2012 - 05:05 AM

Good old "Access Violation Error": Trying to access something that's out of the page or do something that a page isn't authorized for. Or sometimes it can be trying to free a pointer that's not allocated. Possibly Lua is being de-initialized and then trying to free an internal pointer or something. If you've got everything set up right then it may actually be a Lua code problem. I had a similar problem with IrrKlang a while back and they fixed it in the next release (after I spent 5 hours trying to find the problem).

Check the Lua site and see if there's a newer version or else maybe a ticket in the bug-tracker.

Apart from that I think we'd need to know more about what's going on at your end. Does the Lua embedding doc say anything about necessary compiler or linker settings? Do you really need to extern "C" an .hPP file? What is the returned value from dostring()?

Edit: Just occurred to me, should you actually call the close function in this case? I've never embedded Lua, so I don't know the API, but is the close function used to release the resources acquired by newstate or is it for closing a somehow 'activated' form of the interpreter? I believe when embedding Ruby you have to create a 'node' and then you can either use the API to make calls to it or you can call a 'run' function on it (or usually both, the interactions being adding classes and etc and then it 'runs' on a script that uses the added types.).

#4Khatharr

Posted 03 November 2012 - 05:05 AM

Good old "Access Violation Error": Trying to access something that's out of the page or do something that a page isn't authorized for. Or sometimes it can be trying to free a pointer that's not allocated. Possibly Lua is being de-initialized and then trying to free an internal pointer or something. If you've got everything set up right then it may actually be a Lua code problem. I had a similar problem with IrrKlang a while back and they fixed it in the next release (after I spent 5 hours trying to find the problem).

Check the Lua site and see if there's a newer version or else maybe a ticket in the bug-tracker.

Apart from that I think we'd need to know more about what's going on at your end. Does the Lua embedding doc say anything about necessary compiler or linker settings? Do you really need to extern "C" an .hPP file? What is the returned value from dostring()?

Edit: Just occurred to me, should you actually call the close function in this case? I've never embedded Lua, so I don't know the API, but is the close function release the resources acquired by newstate or is it for closing a somehow 'activated' form of the interpreter? I believe when embedding Ruby you have to create a 'node' and then you can either use the API to make calls to it or you can call a 'run' function on it (or usually both, the interactions being adding classes and etc and then it 'runs' on a script that uses the added types.).

#3Khatharr

Posted 03 November 2012 - 04:39 AM

Good old "Access Violation Error": Trying to access something that's out of the page or do something that a page isn't authorized for. Or sometimes it can be trying to free a pointer that's not allocated. Possibly Lua is being de-initialized and then trying to free an internal pointer or something. If you've got everything set up right then it may actually be a Lua code problem. I had a similar problem with IrrKlang a while back and they fixed it in the next release (after I spent 5 hours trying to find the problem).

Check the Lua site and see if there's a newer version or else maybe a ticket in the bug-tracker.

Apart from that I think we'd need to know more about what's going on at your end. Does the Lua embedding doc say anything about necessary compiler or linker settings? Do you really need to extern "C" an .hPP file? What is the returned value from dostring()?

PARTNERS