Finger info for marco@icculus.org...


Oh god, make it stop

or how I stopped loving QuakeC.

There's a big, big issue that has suddenly appeared. It has bewildered the minds of myself and everyone involved.
Usually I only update the FTE engine binaries when something big that will affect our projects has been fixed, but this time I was introduced to a new type of problem that we have yet to comprehend.

Prediction code, as we later found out, caused unexpected results on various builds. Builds generated by my home computer, by my server, by David's server... and so on. However, they worked fine on older builds.

But Marco, you might say, why not just revert to the same revision as the build that worked and work your way up?
Well, we did. With the same problems.

My only logical conclusion is, that there was undefined behaviour created (by either borked system, which I did reinstall recently which could be the cause) in the past, that created an .exe that would magically work with flawed code.

So, a bad engine compile made bad code work right? That's what I'm assuming here, based on every single thing we've tried. We can't get a good engine compile anymore. This means something had to go wrong in the past.

Problems like that can get amplified by the fact that we rely on so many components for the game-logic to work.

FTEQW handles QuakeC via a thing called qclib. A component that is older than FTEQW itself.
FTEQCC, the compiler we use, is using the same library.
If the game-logic was a native module, ala Quake II or Half-Life, the flaw would usually be found in either the game-logic or the engine. We could debug these components with the same debugger and have a clear overview over what works and what doesn't.
With QuakeC it's a lot more difficult, because compiling and executing of the components executes at completely different times.

1) fteqcc could be a flawed compile
2) qclib could have a flaw
3) fte could have a flaw, either inside or inherited through qclib
4) the game-logic could be flawed

or even worse

5) gcc or a borked system could be flawed, creating any or all of the above.

fte and qcc are not updated at the same time. I update fteqcc less frequently because that's a very sensitive component (never change a running system approach) but reverting that component did not change anything either.
If this sounds like a nightmare to understand... that's because it is.

So if you're working on a giant project and you consider using an engine relying on QuakeC, prepare yourself to enter a territory where only a few eyes glaze over what's being run on people their systems, where debugging is a nightmare and the points of failure are countless.
I have disabled the prediction code for now. I am not sure how something broke that worked before for many months - but that's the nature of doing business with niche languages such as QuakeC.

--Marco

When this .plan was written: 2018-02-11 13:50:05
.plan archives for this user are here (RSS here).
Powered by IcculusFinger v2.1.27
Stick it in the camel and go.