MantisBT - Zandronum
View Issue Details
0001115Zandronum[All Projects] Suggestionpublic2012-10-10 16:092014-05-12 00:16
Watermelon 
 
normaltweakhave not tried
closedbackport later 
1.0 
 
0001115: Change ACS runaway script threshold from 500,000 to a variable or something higher
The limit of 500,000 is slowly becoming archaic from some of our mods that can push the engine quite far. ZDaemon has raised it to 2 million p-code instructions before runaway happens, and while I'm not trying to create [yet another] ZD thread, this showed me that it can be changed. It would be interesting to either up the limit for the mod developers in this community (since we're a mod driven port).

If this idea is feasible, maybe there should be a limit for the server (and clients have their own limit), like:
int sv_acsrunawaythreshold

Of course the only problem is someone could set it to 2 billion and go nuts, though they'd have to go out of their way to do such a thing; which means the server could possibly puke a log message if the threshold was changed?
Usually I get the message when running things like a square root formula on a lot of actors since there isn't a native square root function and does lots of stuff. When you have 4000 actors or such, there's enough calls to flood it to runaway.
No tags attached.
Issue History
2012-10-10 16:09WatermelonNew Issue
2012-10-10 21:16Blzut3Note Added: 0005076
2012-10-11 02:14WatermelonNote Added: 0005080
2012-10-11 02:15WatermelonNote Edited: 0005080bug_revision_view_page.php?bugnote_id=5080#r2769
2012-10-11 02:16WatermelonNote Edited: 0005080bug_revision_view_page.php?bugnote_id=5080#r2770
2012-10-11 02:27WatermelonNote Edited: 0005080bug_revision_view_page.php?bugnote_id=5080#r2771
2012-10-11 04:38WatermelonNote Edited: 0005080bug_revision_view_page.php?bugnote_id=5080#r2775
2012-10-12 15:39DuskNote Added: 0005086
2014-05-12 00:16WatermelonStatusnew => closed
2014-05-12 00:16WatermelonResolutionopen => backport later

Notes
(0005076)
Blzut3   
2012-10-10 21:16   
This should be suggested over at ZDoom first. That said, I have a hard time believing that you guys are legitimately hitting the limit all that often. :P
(0005080)
Watermelon   
2012-10-11 02:14   
(edited on: 2012-10-11 04:38)
The code in Zandronum be changed in:

p_acs.cpp
[line 3723] if (++runaway > 500000)
to
if (++runaway > 2000000)



Apparently zdoom has changed it. Figured this would be a simple thing to update and test.

'http://zdoom.org/Changelog/3697/files [^]'

(0005086)
Dusk   
2012-10-12 15:39   
I do agree with Graf's sentiments that if you hit the runaway limit it's time to rethink what you are doing..