Symbolic formulas truncated with garbage - was Dale Walker right the first time? (OpenInsight Specific)
At 14 AUG 2001 08:47:15AM Oystein Reigem wrote:
Dale Walker had a problem with symbolic formulas that initially looked fine and test compiled OK, but later contained garbage - . First he suspected some size limit, but after working on the problem some more he blamed garbage characters being there already from the start (same thread).
Presumably he never saw those characters he assumed were the seeds of trouble. I suspect they never were there in the first place. I have a similar case where I definitely think the size of the formula matters. In a dictionary with some large formulas those formulas tend to get truncated at one end or the other. At the truncated end there's a string of unknown characters (showing as rectangles).
I make this dictionary with a program, but I have seen the problem in Table Builder with manually created tables too. Just now I made a tiny dictionary with one symbolic and not much more. When I increased the size of the formula from 400 bytes to 800 bytes the formula crashed. This time I saw it after I saved the definition and inspected the formula again. Earlier I've had to reopen the definition before I saw it.
But the results are not predictable. E.g in my programmatically made dictionary I have three large formulas, and they take turns in showing the problem. E.g in another try with Table Builder I had to increase from 1600 to 3200 before there was a problem. So Dale Walker's final success migh be accidental.
Comments, please!
- Oystein -
At 14 AUG 2001 08:58AM Don Miller - C3 Inc. wrote:
Oystein ..
For years, I've avoided any large symbolic formulas in dictionaries. They're hard to debug and can sometimes lead to other problems as well. Typically, I'll write the formula as either a function or subroutine and call it from the dictionary. You can pass the variables for @RECORD, @ID and @DICT or you can open the file yourself. @RECORD and @ID are usually set at the time of the dict call. To be on the safe side, I usually save these vars and then reset them on return.
Typically the Dict Symbolic is:
DECLARE FUNCTION MYFUNC
orDECLARE SUBROUTINE MYSUBR
xx=MYFUNC(@DICT,@RECORD,@ID) ;* called as a function
if LEN(xx) and xx1,3 NE 'ERR' THEN
@ANS=xxEND ELSE @ANS='
* similar for subroutine call
That's been my method for some time and I've never had problems
Don Miller
C3 Inc.
At 14 AUG 2001 09:05AM Oystein Reigem wrote:
Don,
That's what I normally do as well. And that's what I just did with my three large formulas - to get around the problem.
But I'm certain there's somebody out there who knows what goes on. And I want to know!!!
![]()
- Oystein -
At 15 AUG 2001 09:33AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
Well, the system editor's text control blows up at a certain size. Perhaps the text editor for entering symbolics does a similar thing.
World Leaders in all things RevSoft
At 15 AUG 2001 12:37PM Oystein Reigem wrote:
Blows up at half a K?
- Oystein -
At 15 AUG 2001 12:57PM Don Miller - C3 Inc. wrote:
Sprezz ..
It may be even worse since it looks like a standard editbox control to me in table-builder. I suspect that there are definite size limitations there (+-900 characters, if I recall right).
Don Miller
C3 Inc.
At 15 AUG 2001 02:57PM Oystein Reigem wrote:
I think the problem must have something to do with Win 2000. Just tried on Win 98 with a formula of 9K. No sign of degradation.
I'm certain I must have had formulas earlier of the same size, with no problem. The reason I've not seen it before can be I just recently switched to 2000.
- Oystein -
At 15 AUG 2001 08:14PM Scott, LMS wrote:
Hi Oystein
When you say this problem might be associated with Windows 2000, does it make a difference if the client is win2000 but the application itself is on something else (ie novell or NT or win98 or something)?
I prefer calling functions for long and convoluted symbolics, because it is easier to write with system editor than table builder, but I think now I am going to have to write something to analyse all my symbolics for size, in case I need to do more than get a new NLM when my client converts to win2000 workstations.
Scott, LMS
At 16 AUG 2001 05:32AM Oystein Reigem wrote:
Scott,
I think the problem lies strictly where Don and Sprezz say, i.e, it's the Formula edit box of the Calculated Attributes dialog of Table Builder that sometimes messes up the formula, when the latter is run from Windows 2000. I first thought the problem was elsewhere, or several other places, but now I believe the single culprit is the Formula edit box.
So bad things can only happen when you do development under Windows 2000. And for the formula of a particular symbolic to be messed up you must run Table Builder (under Windows 2000) and bring up the Calculated Attributes dialog for that symbolic. But note that the Calculated Attributes dialog being closed again can be enough for the edit box to mess up the formula. But if you close the table definition without saving you're OK. If you're suspicious you check the symbolic's dictionary row with System Editor afterwards to see if the formula is OK. (It might not look very nice when you inspect it in System Editor, though. It's one long -delimited (@VM) string. If it's long enough System Editor will show it broken into several lines.)
Further conditions for bad things to happen vary. Sometimes you can get away with fairly long formulas. It's not a specific limit, even though I haven't seen problems below 0.5K. Also the same formula can go unharmed through several trivial changes or saves before it suddenly gets hit.
- Oystein -
At 16 AUG 2001 08:51AM Don Miller - C3 Inc. wrote:
Oystein ..
I think you're right. Since most controls wind up calling various Windows API functions, different implementations of Windows seem to produce different results. System Editor is a good example. It behaves a little differently on Win95, 98, ME, and Win2K. I've also seen the Windows Page event cause a loss of focus and a minimize event get fired to put the window on the Task Bar. This was a combination of Win98 - Citrix Metaframe and a Wheel mouse. Go figger.
Don Miller
See-Thru-Ink
At 16 AUG 2001 07:43PM Scott,LMS wrote:
Hi All
Hmm that almost sounded like if I keep the development on win95, that the runtime on win2K will be unaffected. But I think that might be overly optimistic.
The problem sounds like it is hooked up to available RAM a bit like system editor with long stdprocs. Ie on a fresh boot you are less likely to get the symbolic calculated field eating itself, perhaps. And it would co-incide with Win2000 hogging more resources or just not allowing enough for the 16 bit OI.
Scott
At 17 AUG 2001 05:35AM Oystein Reigem wrote:
Scott - I think you might be right.
Could we get a comment from Revelation on this matter?
- Oystein -
At 17 AUG 2001 06:35AM Mike Ruane wrote:
Guys-
I've seen this problem myself, although not just on W2K. It's popped up occaisionaly on 98 and NT also.
We don't have a solid answer, other that it appears to be resource related- prolly some of the old memory leakage issues.
Mike