[B809] Certain Lua script freezes Command (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support



Message


Gizzmoe -> [B809] Certain Lua script freezes Command (4/2/2016 11:41:23 AM)

This loop freezes and crashes Command (no error message) when I run it from the script console:

::loop::
print (string.sub(ScenEdit_CurrentTime(), 1, 10))
goto loop

Edit: It freezes Command after two seconds, after about 10-15 seconds it crashes.




michaelm75au -> RE: [B809] Certain Lua script freezes Command (4/2/2016 11:51:52 AM)

Doesn't ScenEdit_CurrentTime() return a number??
ScenEdit_CurrentTime ()
Gets the current time.
Returns:
number The UTC Unix timestamp of the current time in-game.






Gizzmoe -> RE: [B809] Certain Lua script freezes Command (4/2/2016 11:53:50 AM)

Yes, it returns a number.




michaelm75au -> RE: [B809] Certain Lua script freezes Command (4/2/2016 11:58:09 AM)

I just tried it and it works. You have given it an infinite loop so it just keeps running. It probably exhausts resoruces




Gizzmoe -> RE: [B809] Certain Lua script freezes Command (4/2/2016 12:01:31 PM)

quote:

ORIGINAL: michaelm
It probably exhausts resoruces


Yes, probably. It freezes Command after two seconds, after about 10-15 seconds it crashes. I guess it shouldn't be that way ;)




michaelm75au -> RE: [B809] Certain Lua script freezes Command (4/2/2016 12:05:22 PM)

I can't see what use you would have for the code snippet in an action/event in the game. It would basically stop the game.




Gizzmoe -> RE: [B809] Certain Lua script freezes Command (4/2/2016 12:12:40 PM)

That script is just part of my Lua learning-process and as a Lua/Script-noob I need to experiment a lot. Sure that script isn't useful as-is, but that is not the point of this thread.




mikmykWS -> RE: [B809] Certain Lua script freezes Command (4/2/2016 12:58:12 PM)

quote:

ORIGINAL: Gizzmoe

That script is just part of my Lua learning-process and as a Lua/Script-noob I need to experiment a lot. Sure that script isn't useful as-is, but that is not the point of this thread.


So what did you learn about running an infinite loop and then reporting it as a bug?

Mike






Gizzmoe -> RE: [B809] Certain Lua script freezes Command (4/2/2016 1:03:51 PM)

quote:

ORIGINAL: mikmyk
So what did you learn about running infinite loops and then reporting it as a bug?


I just wanted to report it in case you devs consider it a bug. As you know an infinite loop doesn't automatically crash every piece of software per se, it all depends on how the software was designed.




mikmykWS -> RE: [B809] Certain Lua script freezes Command (4/2/2016 1:09:00 PM)

Uh huh.

Can you stop trying to annoy people. We have lives to live and these antics are not really moving the game ahead.

Thanks

Mike




thewood1 -> RE: [B809] Certain Lua script freezes Command (4/2/2016 1:20:38 PM)

Several of us thank you for finally saying that.




Gizzmoe -> RE: [B809] Certain Lua script freezes Command (4/2/2016 1:26:44 PM)

It is not my plan to annoy people. I just found it weird that it makes Command actually crash and wanted to report it. In that case it apparently wasn't a valid bug report for you and I have no problems with your decision.




mikmykWS -> RE: [B809] Certain Lua script freezes Command (4/2/2016 1:35:19 PM)

Ok.

Mike




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.242188