Data segment overflowed

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Data segment overflowed

Post by Lagoon »

I have a script with a lot of functions and counting about 4300 lines of code. It compiles with no problem. Then I have a second script with about 4500 lines of code and a lot of functions, and it compiles too. I copied the second script in the first one (of course I converted the program in the second script to a function, calling it in the original code of the first script) and compiling gives me the following error

Data segment overflowed
Flog the programmer for using 2-byte offsets in datafiles.
Error compiling statement ...
File ...
Execution aborted due to: Error compiling file

Fact is the listed errors seem to be senseless... maybe I reached some limit in the number of functions or in the call depth?
Shinigami
Former Developer
Posts: 308
Joined: Mon Jan 30, 2006 9:28 am

Re: Data segment overflowed

Post by Shinigami »

which parameter (and maybe ecompile.cfg entries) do u use while calling ecompile?

Shinigami
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Post by Lagoon »

no parameter passed to ecompile
my ecompile.cfg options are

GenerateListing 1
GenerateDebugInfo 1
GenerateDebugTextInfo 0
DisplayWarnings 1
CompileAspPages 1
AutoCompileByDefault 1
UpdateOnlyOnAutoCompile 1
OnlyCompileUpdatedScripts 1
DisplaySummary 1
GenerateDependencyInfo 1
DisplayUpToDateScripts 0
Zacharias
New User
Posts: 16
Joined: Wed Mar 08, 2006 7:30 am

Post by Zacharias »

Flog the programmer for using 2-byte offsets in datafiles.



Looks like this fault is created by a too small offset-reservation:
Your Script-File is to hughe for ecompile/POL.
The program can't count through 8800 (4300 + 4500) lines for some reason.

For example, offsets are used in gump.mul and gump.idx to know where a new gump-picture starts. So if you want to read gump 0x525, offset determines at which byte of gump.mul this gump is stored.
Perhaps ecompile/POL needs such offsets for "control structures" (if, foreach, case) and you have to many of them in your file?
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Post by Lagoon »

Yes, probably you're right, the resulting script is huge... is has indeed too many structures... while, case, if and a lot of gumps... the problem is indeed in some ecompile limit about those structures... I'm curious if this is wanted, unavoidable or fixable by devs (and I'd be happy to help if needed)
Shinigami
Former Developer
Posts: 308
Joined: Mon Jan 30, 2006 9:28 am

Post by Shinigami »

Lagoon wrote:GenerateListing 1
just set it to 0

Shinigami
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Post by Lagoon »

Nothing changed :?
Post Reply