Sull'errore -4518 (more on TSS hog functions)
Posted in 1995
An application I wrote had a nasty "TSS full" problem. Particularly nasty to solve because 1) the code had worked fine for 2 years 2) it was written with all the usual precautions to avoid error -4518 3) not much string manipulation or function calls with string parameters anyway After three days of hard thinking (that's not much if you consider that in sicily, due to the hot weather, brains usually fail to work properly -if at all- before 4 pm :-) I decided I'd better go on vacation and left the problem unsolved. Ten days later, with a fresh mind, I discovered that the faulty code (which, you'll see, was not faulty at all!), a function declared with no argument (for those of you who have heard of it, a 4glWorks viewer), was in fact erroneously invoked with a smallint parm. Surprisingly, such call caused no run time error: unlike all others, 4gl functions that take no arguments *do not* check the number of parameters received (At least, in 4gl-compiled: I've peeked at the resulting c code), so if you mistakenly call one such function with one or more parms, it will run just fine, leaving all the unwanted parameters on the stack... What's more one such function is a TSS hog too! Even more interesting, since the parameters are never removed from the stack, it is possible that the TSS is brought to its knees (funny idea, a TSS with knees) after the function has returned, which is exactly what has happened to me. Now, it would be nice to know if this happens with RDS or 4gl-c 4.12 and following. marco. Oh, yes, I use 4gl-compiled 4.10UC1 on NCR towers 650 & 700, w SVR3.2 -- ........................................................................ tear along dotted line! marco greco mar.greco@agora.stm.it Work Achea Srl tel 39 95 503117 / 447828 Pbx Catania, Italy fax 446558