EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

feature request - warn/error on large lua instruction counts

Open StarryWisdom opened this issue 3 years ago • 5 comments
trafficstars

It would be nice if lua infinite loops didnt hang the game.

In serious proton there is already logic to stop lua functions past a certian instruction count.

It would be very useful to get a traceback on an error.

I have no clue what a sensible default for instruction count would be (or if it should be settable in script).

StarryWisdom avatar Feb 04 '22 12:02 StarryWisdom

I've made it an options.ini setting, so you can set it during debugging. Maybe once we know some sensible values we can also set a different default.

daid avatar Feb 06 '22 14:02 daid

How would one use this? I'm guessing something like adding the following line to options.ini: script_cycle_limit=20

Xansta avatar Mar 07 '22 16:03 Xansta

20 is really low, few 1000 is more what you most likely want

daid avatar Mar 07 '22 17:03 daid

So, more like a line like this: script_cycle_limit=5000 Can this be done as a command line parameter like other options?

Xansta avatar Mar 11 '22 20:03 Xansta

Yes

daid avatar Mar 12 '22 07:03 daid