Compilation fatal error 102: table overflow: "literal table"
#1

Hey folks,

i just tried to compile JunkBuster 11 for my server, but it does not work.
The compiler does it's thing for a couple of seconds, then completely fills up my RAM,
and then simply stops compiling.

Full output of the compiler:
Код:
Pawn compiler 3.2.3664                  Copyright © 1997-2006, ITB CompuPhase

/home/samp/pawn/include/Double-O-Files_2.inc(1150) : fatal error 102: table overflow: "literal table"

Compilation aborted.
The code where the error occurs:
PHP код:
1144 stock DOF2::udb_encode (nickname [])
1145 {
1146     new
1147         buf [256],
1148         result [256];
1149 
1150     
new symbols [][2][] =
1151     {
1152         {"_""_00"},
1153         {";""_01"},
1154         {"!""_02"},
1155         {"/""_03"},
1156         {"\\""_04"},
1157         {"[""_05"},
1158         {"]""_06"},
1159         {"?""_07"},
1160         {".""_08"},
1161         {"*""_09"},
1162         {"<""_10"},
1163         {">""_11"},
1164         {"{""_12"},
1165         {"}""_13"},
1166         {" ""_14"},
1167         {"\"""_15"},
1168         {":""_16"},
1169         {"|""_17"},
1170         {"=""_18"}
1171     };
1172 
1173     strcat 
(bufnickname);
1174     for (new 0sizeof (symbols); ++i)
1175     {
1176         str_replace (symbols [i][1], symbols [i][0], bufresult);
1177         buf [0] = '\0';
1178         strcat (bufresult);
1179     }
1180     return result;
1181 
I hope someone can help me with this.

Thanks in advance,
Blowfish
Reply
#2

Quote:
table overflow: table name
An internal table in the pawn parser is too small to hold the required data. Some tables are dynamically growable, which means that there was insufficient memory to resize the table. The “table name” is one of the following:
(...)
“literal table”: this table keeps the literal constants (numbers, strings) that are used in expressions and as initiallers for arrays. The literal table grows dynamically, so an overflow of the literal table basically is an “out of memory” error.

No idea what it means, but I guess you just don't have enough RAM.
Reply
#3

I have at least 2 GB of RAM on my server, about 1 GB free.
You don't need like a gigabyte of RAM to compile a couple thousand
lines of code, therefore that should be totally sufficient.

I assume so because I can easily compile stuff like the Linux Kernel
on that machine, which has millions of lines of code. In my opinion
it's rather a bug of the PAWN compiler, of simply a misconfiguration.

I'm running Linux, so I do not use the PAWN compiler coming with
SAMP, but as you can see I use exactly the same version, but
compiled by myself. I run it like this:

Код:
pawncc -i/home/samp/pawn/include
In the .ini file, that comes with Pawno there additionally are the
parameters "-r -w 203", which however do not change the
results, and are pretty useless in my opinion.

Maybe there are some people watching this thread, who know whether
the SAMP team applied any changes to the PAWN compiler, that
they ship with the Windows server release.
Reply
#4

I'm definitely not a fan of this. Nevertheless:

Bump.
Reply
#5

A bit of ****** work has brought me this:
"102 table overflow: table name
An internal table in the pawn parser is too small to hold the
required data. Some tables are dynamically growable, which
means that there was insufficient memory to resize the table. The
“table name” is one of the following:
“literal table”: this table keeps the literal constants (numbers,
strings) that are used in expressions and as initiallers for arrays.
The literal table grows dynamically, so an overflow of the literal
table basically is an “out of memory” error."

See: https://sampforum.blast.hk/showthread.php?tid=281276
Reply
#6

Yep, I also read that in the Pawn Language Guide, but I never
actually saw the Pawn compiler eating up more than a couple
megs of RAM. And in this case it's suddenly consuming more
than a gigabyte. This can't it's usual behavior, can it?
Reply
#7

You can try to add the "samp compatible" patches by ZeeX that are located here: "https://github.com/Zeex/pawn-3.2.3664_patches/tree/master/samp_compatible"
Reply
#8

@******:
No, i didn't try that yet.
Maybe I should have done that before I claimed your attention,
but I work with my setup for about two years now and rarely had
any problems.
Also compiling my stuff with the compiler, that comes with the Windows
server package would be quite an effort to me.

Since I now have the pleasure of speaking with you I would like
to ask you whether it is possible, that you also ship a version of your
modified compiler with the next release of the Linux server package
or maybe just release your changes. That would be great for all the
Linux guys.

@JoBullet:
Awesome! Thanks, I'm gonna try that right away.
Reply
#9

I applied the patches and the errors I had before are gone,
but unfortunately the patches kinda broke something else in the compiler.
It can't handle arrays of strings anymore.

Let me show you an example:

PHP код:
 26 new afkCardColorName[][] = {
 
27     "Herz",
 
28     "Karo",
 
29     "Kreuz",
 
30     "Pik"
 
31 
The above code produces the following error now:
Код:
include/afk/afk_main.inc(30) : error 037: invalid string (possibly non-terminated string)
I get tons of these errors, the compiler is always complaining about
the last element of a array of string.
Reply
#10

pawn Код:
new afkCardColorName[][] = {
{"Herz"},
 {"Karo"},
{"Kreuz"},
{"Pik"}
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)