Author Topic: Lua scripting updated to Lua 5.1.4 - bugfixes  (Read 4013 times)

0 Members and 1 Guest are viewing this topic.

Offline Echelon9

  • Moderator
  • 210
Lua scripting updated to Lua 5.1.4 - bugfixes
Here is an attached patch that brings the version of Lua in FS2Open SCP up to 5.1.4 (latest) from 5.1.3.

The bug fixes included in Lua 5.1.4 can be seen here. They primarily relate to reliability and integrity fixes for some boundary cases in the internal stack, and the precompiled code parser.

It is envisioned there should be no problems with any pre-existing scripts written for the embedded Lua engine within the SCP, but would those devs and mod authors who use Lua please test thoroughly with your own Lua scripts.

OSX build - r5322 plus attached diff
Release
Debug

[attachment deleted by ninja]

 

Offline Echelon9

  • Moderator
  • 210
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
So one week later and no feedback?

I can see it's been downloaded at least 10 times, and if any of those people compiled a build & tested it I'd appreciate any feedback - even if just to say, 'yup it worked fine for me'.

This update for embedded Lua to the 5.1.4 bugfix point release can also be tracked in Mantis 1935.

 
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
I've had a look through the diff.
Mostly looks like minor changes.
I haven't had time to put this into a build, but it doesn't look like there's anything in there that could cause major problems.

On a side note, is there anything using LUA? I've got no idea how to use it!
STRONGTEA. Why can't the x86 be sane?

 

Offline Echelon9

  • Moderator
  • 210
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
On a side note, is there anything using LUA? I've got no idea how to use it!
As (nearly) always, the wiki has an explanation of Lua scripting... plus some examples.
« Last Edit: June 07, 2009, 05:38:39 am by Echelon9 »

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
thats nice, i was always wondering if anyone was keeping lua up to the most recent version.  unfortunately my current script project is using a custom build with some new internal functions i wrote. maybe i can diff it in or something.

I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
As I am looking at hopefully adding some scripts to the MediaVPs (Flashy Deaths and Flak), I will be testing right now.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Echelon9

  • Moderator
  • 210
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
That's all right, I was happy to prepare the Lua 5.1.4 patch, it really didn't take too much time on my behalf. I just don't want to see this change break things, hence the caution, testing and feedback.

Nuke, you should be able to apply the diff above to your custom codebase without problems.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Just off  the top of your head, will this play well with lua.cpp changes by Aardwolf?
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Just off  the top of your head, will this play well with lua.cpp changes by Aardwolf?

Well, I haven't looked at exactly what was changed, but that said, I don't see how updating the version of Lua would affect those functions, unless there were significant other changes made in order to stay compatible.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Tried the script with mouse script... couldn't see any issues.. You could just as well commit the diff.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
I think I can concur. Nothing is showing any difference with the existing scripts that I have been using as problematic.

Well, aside from a potential placebo effect of just being over all smoother than all get out, but I have noticed since RC3 at the very least that the performance is a bit better than it used to be.

This could also be attributed to shifting to windows 7 as well though, but in either cas, it's nice still having that fresh feeling every game.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Echelon9

  • Moderator
  • 210
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Tried the script with mouse script... couldn't see any issues.. You could just as well commit the diff.
Absence of SVN write privileges for me is going to stop that happening right now....

I've got a SVN username and password, but it's just read privilege at the moment.

 

Offline Echelon9

  • Moderator
  • 210
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Resolved in revision 5331.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Linux compile error

I tried building the nightly build on Linux today, and it failed, so I went back into the source dir, hit make, and that's what I saw.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Echelon9

  • Moderator
  • 210
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
Ok, that's caused by an additional define for readline in luaconf.h that is only used on the Linux platform (and should only affect Linux).

You can see its inclusion in this section of the diff:
Code: [Select]
Index: lua/luaconf.h
===================================================================
--- lua/luaconf.h (revision 5322)
+++ lua/luaconf.h (working copy)
...
@@ -36,6 +36,7 @@
 #if defined(LUA_USE_LINUX)
 #define LUA_USE_POSIX
 #define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+#define LUA_USE_READLINE /* needs some extra libraries */
 #endif
 
 #if defined(LUA_USE_MACOSX)

Options available would include:
  • Install the readline-devel package for your Linux distro, and add "-lreadline" to the make script where relevant
  • Remove the added line "+#define LUA_USE_READLINE   /* needs some extra libraries */"
  • Other suggestions from more Linux cluey people...

The first few Google results here seem relevant and helpful, in particular this posting on the lua-l mailing list.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Lua scripting updated to Lua 5.1.4 - bugfixes
I did in fact install libreadline5-dev on Ubuntu and that seems to have cleared it up.  But now that's just another dependency that is unchecked in autoconf.  OpenAL is the other one I'm aware of.  Any autotools hackers out there know how to fix these issues?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays