The 'one' bug in evolutionRTS where the game interface disappeared

The 'one' bug in evolutionRTS where the game interface disappeared

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Locked
8611z
Posts: 169
Joined: 08 Jul 2015, 20:20

The 'one' bug in evolutionRTS where the game interface disappeared

Post by 8611z »

Maybe interessting* insight to spring modding or about confirmation bias and wrong conclusions, using exemplary bug of disappearing interface in evolutionRTS.
Forboding Angel wrote:The game itself is fine. Evo has always been relatively bug free. Although there was one persistent one that only showed up once or twice in a lifetime (As I'm sure Archivist Knorke will happily tell you about at great length, whether you want him to or not) for users coming from other spring games... turns out the handler I borrowed from zerok eons ago had virtually zero error handling. Alas.
For the last time I will explain the bug, why it happend, and why it could be so "persistent."
Per demand in greatest length possible.

1) The interface of spring games is largey implented via scripts written in a language called Lua.

2) The problem in evolutionRTS was that sometimes these scripts failed to run.
The results was that only basic functions provided by the spring-engine remained. Games rely on Lua scripts for many things such as: healthbars, tooltips, music, options-menus, resource/supply display, and other GUI elements.
So one can see that these scripts are very important to the game.

2.1) This was a known bug, other spring games had already adressed it.
(For example zero-K fixed it in 2013)
For evolutionRTS the bug had repeatedly been reported by players since at least two years before release on steam. On steam it was mentioned a few times too.

3) "...only showed up once or twice in a lifetime..."
Downplaying problems makes them worse.
For every user who reports a bug there is unknown number of unreported cases.
Once the bug had happend it would happen at every gamestart, meaning broken interface every time. It could in theory happen to anyone. See (5) and (6)
Opinion of FA on the severity of issue:
Forboding Angel wrote:It isn't game breaking, I.E. the game does not crash and burn. It is still playable, and it can even be fixed with luaui reload. It is game hindering, but not game breaking.
As described in (2) spring games are highly reliant on Lua scripts. Debatting if such issue is 'game breaking' or merely 'game hindering' is useless, it is severe problem in any case. Complete failure of all LuaUI is a bug that every spring modder would take seriously and try to adress ASAP because the impact on player is huge.
3.1) Note: "luaui reload" refers to a command that players can type into the game console, to try to restart the Lua scripts.
3.2) How would a player know that such a command exists? This is not helpful.
3.3) The command had no effect in this case!

4) "...for users coming from other spring games..."
Other spring games were not the reason.
It is frustrating how often this gets repeated, and used as arguement in discussions.

5) If "other spring games" were not the problem, so what was wrong?
In simple terms: spring players can customize their game interface. The user-settings of the interface/Lua scripts are saved in a config file.
On gamestart the settings are read from that file.
While reading from files things can go wrong, for example the user might have edited the file by hand and entered non-sense data. Or maybe the file is deleted, or otherwise corrupted.
The code dealt with all these (pretty standard) potential problems but there was one small oversight: The situation that the file exists but is empty.
(Possible there were other situations but that was one way to reproduce the bug.)
I do not know how to explain that without this turning into a programming-tutorial, but it is a small extra check.
5.1) Here is how the zero-K game had fixed that in 2013:
"cawidgets.lua: added extra nil check to prevent crashing of whole LuaUI because of malformed zk_data.lua"
https://github.com/ZeroK-RTS/Zero-K/com ... 890e938519
It is not nessecary to understand any of the code to see that the fix is only a few characters.
Here is the fix in evolutionRTS, as submitted by spring-person jK:
https://github.com/EvolutionRTS/Evoluti ... e7c29fd453
For evolutionRTS there is a few more changes, (The code was once copypasted in evolutionRTS from zero-K without changing "ZK" to "evo", so that was now corrected too.) but at bottom is the relevant same fix again.

6) What could cause the config-files to be empty in the first place?
I did not look at that, but one way to produce empty config files was by crashing spring.
6.1) Spring engine can be somewhat 'crashy.'
Also evolutionRTS was (is) using an old version of the engine: In the engine's bug tracker are some crash bugs which had been fixed in later versions. There is not enough manpower/interest to pay attention to problems with old engine versions.
6.3) Video games can also crash for 'random' reasons.

7) Was this a difficult bug?
In my opinion: Medium.
The type of Lua error message ("bla..nil value..blabla") is familiar to any spring person. It means code is trying to access a thing that does not exist. The fix is to check if the thing exists, before accessing it. (optionally: look why the thing does not exist)
So that is not unusual.
A difficulty was that the location of error. It was not one of the usual Lua scripts, which are edited routinely, but the "script handler" which for this purpose one might think of as the "mother of all scripts which handles all other scripts."
(That was why its failure caused ALL other scripts to fail.) It rarely nessecary to edit these "core"files, modders might shy from touching them. But still I think several people exist who were able to figure it out in minutes. In fact, a few looked at it and had told what to do.

8) What would FA have needed to do?
Simple edit that people were telling him. In the form of:
"In line 1234 of file XYZ change 'blablablabla' to 'wubwubwubwubwub'"
See (5.1)

9) Why did he not instantly do it?
In my opinion:
9.1) Not taking the bug serious. It was reported many times, but always removed from bugtracker or ignored.
9.2) In his view the problem was not with evolutionRTS. Instead of investigating the bug he had jumped to wrong conclusions.
9.3) For some reason instead of taking advice by people who already had the problem figured out, he prefered to trust the one spring modder who did NOT know how to fix it.
9.4) I assume at some point he tried but did it not work:
Forboding Angel wrote:One of which only occurs for users who play zk and other games using spring 91 then come and play evo on spring 96. It's not game breaking, but it does make chili go away. Knorke's fix for this only made the problem happen every single game and broke other things as well.
I had tested the fix, it worked. Months later I saw the commited fix by jK: It was the same. Other Lua developers had also explained the same fix. (There is basically only one obvious way, and it is a tiny edit.)
To me the most likely explaination is that FA did it wrong. I think that especially because of the claims that 'the fix made it worse', which seems like he put some typo into "mother script" which then completly failed to run, at all. I rate the Lua skills of the people who were at the time active developers (and arrogantly include myself) higher than FA's.
9.5) Had FA posted more details on his problems with the fix then others could have further helped. But with such vague reports that was of course impossible and the best they could do was tell the same thing again.

10) Instead of 'giving instructions' and longwinded blabla, why did nobody just do the fix himself?
10.1) See (8): It is very simple instruction that anyone can carry out. Without needing to understand it.
10.2) The complete code to copy&paste was given at least once.
10.3) It is too much hassle to log into foreign SVN/github blabla, when basically one chat line explains all there is to say.
10.4) For hobby devs learning is usually part of motivation/fun to do things. "Just do it for me!" is lame. People will give guidance but some work you must do yourself. At very least..
10.5) ..when others have invested time in helping with YOUR problem, which is clearly outside your expertise, and you need further help then spare your own wild speculations and advices, that is quick way to lose sympathy. It is too frustrating to deal with that on top of the original problem.


11) "The point is that Evo itself as a game was fine. A few imbas and the like, but absolutely playable. What caused it to collapse is everything around it."
We simply do not know how Evo as a game would have been recieved because the players did not get that far. The majority of feedback was on the download/install/lobby stage, simply because installing the game is the first task that players need to do.
That nobody got far enough to report bugs on other things does not mean that it was fine.

12) I am so sick of hearing "The game itself is fine. Evo has always been relatively bug free."
Maybe such judgement should be left to the people who are writing code or have experience in dealing with bugs.
EvolutionRTS is not bug free. I can prove it mathematically.
Spring games have daily been played, tested, improved by hundreds people.
And yet in all those games there are always new bugs being found, strategies that break the balance being found out, newbie-traps being discovered,.. there is constant nessecary improvements & changes being made in every game. However evolutionRTS is basically the result of trickle-down copypasted sawdust from other games:
12.1) People are friendly to help you copypaste things, and modify things for you, and make fixes for you, and wrote guides & tutorials, and sometimes code things just for you.
Problem is that when code is copied from somewhere, it only gets updated in the original project, but in evoRTS time stands still. When nobody feels responsible to provide long-time care, it becomes lower quality by principle.
12.2) I state my assumption:
The number of fixed bugs is proportional to the number of sucessfully reported bugs.
In bugtracker of other spring projects are up to hundreds reported issues, of varying severity. In the bugtrackers of evolutionRTS have never been more than a handful reports.
One reason for that is FA's behaviour in dealing with feedback and reports. (See 13.3)

13) "Unfortunately, there are a disturbingly large group of people here that have this knorkish idea that if you don't lua, then you have nothing useful to contribute."
I never encountered anyone with this idea, I certaintly do not share it. In spring there is certainly NOT a large group of programmers who disrepect everyone else; or whatever paranoid picture FA tries to paint. ("There are a significant portion of people around that wanted Evo to not do well.")
13.1) However for solving problems with Lua/code it is mandatory to have knowledge of Lua (or generally programming). See (10.5) If you have no scripting experience then you have nothing useful to contribute to scripting problems.
13.2) It also is absolutely helpful to have at least bit understanding how things work.
Calling yourself "developer" without understanding of code is asking for trouble.
Lots of problems FA encountered would never have been an issue after reading some tutorials about programming. Then at least he would have been able to understand what others were doing. This is not limited to Lua-scripts, but assumptions about engine, game balance, etc.
13.3) Maybe most importantly it would also help with 'social' problems.
In my view even a normal player contributes to community, by pure existence. A player who complains a bit about balance (or whatever) is even better. If from time to time a player manages to post some mangled error-message it is supervaluable. Sadly FA is bad at filtering useful informations out from the (sometimes incomplete/inaccurate) texts that players produce. So he does not see their value and belittles them or calls them trolls or concern-trolls or other names or brushes them of with some rants how they should be thankful and shut up. With some insight it is easier to recognize the useful parts of player feedback.

*(not actually interessting)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: The 'one' bug in evolutionRTS where the game interface disappeared

Post by Silentwings »

Your desire to cause animosity by dredging up past issues in public with intent to offend, is not wanted here, as you have been told repeatedly.

User was banned for one week.

Locked.
Locked

Return to “Lua Scripts”