wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps

Home Page:https://wurstlang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sometimes wurst built an unrunnable map.

cloudfox2 opened this issue · comments

Sometimes wurst built an unrunnable map (It crashes at loading), but sometimes it built successful with the same code. Reboot VSCode or computer won't change the situation.

Seem the jass part has some issues, if I replace the jass file to a runnable version, the map can run too. I can't find the specific issue, the jass can pass the syntax check.
It should not be any specific wurst code issue, since sometimes it can success.

I never met the issue before, it appeared these weeks. Seem success rate becomes lower and lower while my code becomes bigger, and it is down to zero now. If I checkout my code to some old version, it can success everytime. I really don't know what's the problem.

Seems related to #1072 can u check for that

My longest function in jass has 24 params:

function dispatch_LinkedList_LinkedList_LinkedList_add_23 takes integer this_1, integer elems_0, integer elems_1, integer elems_2, integer elems_3, integer elems_4, integer elems_5, integer elems_6, integer elems_7, integer elems_8, integer elems_9, integer elems_10, integer elems_11, integer elems_12, integer elems_13, integer elems_14, integer elems_15, integer elems_16, integer elems_17, integer elems_18, integer elems_19, integer elems_20, integer elems_21, integer elems_22 returns nothing

Seems it is due to a big recursive function. It has 6000+ lines in jass. I made some adjustment to cut it to 4000+ lines and it can run now.

sounds like oplimit then? Usually shouldn't crash unless it's executed at map start or so. Should probably avoid recursion in most cases.

I don't have such a big function in my code and I can't really understand that jass function, is wurst compiling override functions into one function? Its name is cyc_xxx.

To follow up: Yes, to resolve cyclic functions, wurst puts them in one big function. Consider resolving your cycles to avoid this.