Compilation size problem (OpenInsight 32-Bit)
At 24 NOV 2004 12:26:12AM Paul Rule wrote:
I'm on OI 4.1.3, Windows 2000.
I have a program that along with the inserts has around 2250 lines of source code. The size of the source code plus inserts is around 82K
The object code is around 14K.
The problem is that when the source gets over a certain number of lines, OI crashes with "OINSIGHT.EXE has generated errors and will be closed by Windows"
I've tried copying to other OI's and recompiling all with the same error. Same on different computers.
If I remove about 5 lines or so from the end, compiles OK. Add any 5 lines of code and kaboom.
Any ideas.
(Don't say upgrade to OI 7)
At 24 NOV 2004 01:43AM Pat McNerthney wrote:
Okay, upgrade to 7.1!
At 24 NOV 2004 01:57AM [email protected] wrote:
Well try adding a few K of "Null" to the end and see if that works by forcing it beyond a break boundary condition. If it doesn't and converting to a version where the known problem is fixed is out of the question then shorten variable names, minimise $Inserts and failing all else split your program into external subroutines.
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
At 24 NOV 2004 03:10AM Colin Rule wrote:
I have had the same problem on many occasions.
Best cure, is to evaulate your code, and split code into subroutines (not inserts).
A good place to start is anything which allocates variables with text, eg allocating common variables for messages, file equates etc.
These tend to take up a lot of space in the object code.
Its not an easy choice but you have to with OI4 unfortunately.
Colin
At 24 NOV 2004 03:41AM dsig_at_sigafoos.org wrote:
man you're cold
dsig_at_sigafoos.org
Phone: 971-570-2005
At 24 NOV 2004 04:52PM Paul Rule wrote:
We'll be upgrading to OI 7 in the near future but would have liked to have gotten this thing working they way I want.
The inserts are actually dictionary equates. One of the dictionaries is a parameter file that has over 500 entries.
Yesterday I removed some routines and made them into external subroutines which has been normal during the evolution of this project anyway. I try to make everything as modular as possible but sometimes the programs get fairly big due to other dependencies in the single routine. I was just surprised as I thought there was no 64K limit type issues any more.
Program compiles and works fine now that its been shortened. Hopefully I'll be on OI 7 by the time it grows again.
Cheers
Paul
At 25 NOV 2004 04:23AM Oystein Reigem wrote:
Paul,
] The inserts are actually dictionary equates. One of the dictionaries is a parameter file that has over 500 entries.
Say you have equates
equate Alfa$ to 101
equate Beta$ to 202
etc
and in your procedure do stuff like
Value=Alfa$
Can't you somehow move the data of the insert out of your procedure?
E.g, access it from a function:
Value=Get_Stuff( "Alfa" )
Or from a table:
Value=Xlate( TableName, "Alfa", "F1", "X" )
I realise it might be more complicated than I make it but I don't know the details of what you do.
- Oystein -
At 25 NOV 2004 04:40PM Paul Rule wrote:
Oystein, thanks for the suggestion. As the parameters and equates are used extensively throughout this system I fear that using external functions or xlates will make the code harder to read than it already is as well as slow it down. Speed is an issue as most of our clients connect to our ASP model via Citrix which is way slower than running on a stand alone PC. I like your approach though. Shows a bit of lateral thinking.
At 25 NOV 2004 10:31PM Donald Bakke wrote:
Paul,
I was just surprised as I thought there was no 64K limit type issues any more.
Does this recent response help you?
At 26 NOV 2004 04:08AM Oystein Reigem wrote:
Paul,
OK.
You might be able to save a few bytes by using a common
common /Stuff/ Alfa$, Beta$, …
instead of equates
equ Alfa$ to 101
equ Beta$ to 202
…
At least speed shouldn't be an issue with this approach. I think.
But like you I look forward to 7.1… …uh… I'll have to wait for 7.2. Damn.
- Oystein -
At 28 NOV 2004 05:11PM Paul Rule wrote:
Don,
It does, thanks. Sounds just like the problem I'm having.
Hopefully I can get on to OI 7 soon and put those issues in the past.