'data overflow' during script compilation...
Posted: Fri Mar 27, 2015 2:24 pm
Hello,
I ran into this problem not for the first time. We have 3 very big scripts, which are important and not easy to change. They also work now for years. So please do not tell me to change the script - but I have a question to core insiders:
What exactly triggers this problem?
What happened: I did a very small update to th huge script - and it bombed with 'data overflow Flog the programmer for using 2 byte offsets in data files'. I managed to correct the problem, btw.
But it was painful: Reducing the length of strings sometimes helped, sometimes not. There were cases, where I shortened messages, etc. but it did not help, or even get worse. In the end I managed to change only the necessary minimum, and it worked.
But one day I will run into the problem and not manage to fix it - so my question is:
Can anybody of the core devs explain to me what exactly triggers this problem? Too many strings? To many variables? To many general data?
I looked into the source - the message is generated in pol-core/bscript/symcont.cpp in a class constructor function named 'void StoredToken::StoredToken( unsigned lengthToAdd )'.
But I do not know enough to tell, what triggers the problem, except that it has to do with huge scripts, and that obviously a data storage overflows.
If somebody could enlighten me, I would be really grateful - and the I can work on our problem scripts step for step. What can be done to a script (except dividing it or rewrite it or other brute force methods) to fix the problem?
The script is quite important and I do not have the time to rewrite it (it also was not written by me), but I could try to reduce this and that. The scripts itself are in service for years now and besides their size they compile without errors or warnings and are well tested.
Thank you.
OWHorus
I ran into this problem not for the first time. We have 3 very big scripts, which are important and not easy to change. They also work now for years. So please do not tell me to change the script - but I have a question to core insiders:
What exactly triggers this problem?
What happened: I did a very small update to th huge script - and it bombed with 'data overflow Flog the programmer for using 2 byte offsets in data files'. I managed to correct the problem, btw.
But it was painful: Reducing the length of strings sometimes helped, sometimes not. There were cases, where I shortened messages, etc. but it did not help, or even get worse. In the end I managed to change only the necessary minimum, and it worked.
But one day I will run into the problem and not manage to fix it - so my question is:
Can anybody of the core devs explain to me what exactly triggers this problem? Too many strings? To many variables? To many general data?
I looked into the source - the message is generated in pol-core/bscript/symcont.cpp in a class constructor function named 'void StoredToken::StoredToken( unsigned lengthToAdd )'.
But I do not know enough to tell, what triggers the problem, except that it has to do with huge scripts, and that obviously a data storage overflows.
If somebody could enlighten me, I would be really grateful - and the I can work on our problem scripts step for step. What can be done to a script (except dividing it or rewrite it or other brute force methods) to fix the problem?
The script is quite important and I do not have the time to rewrite it (it also was not written by me), but I could try to reduce this and that. The scripts itself are in service for years now and besides their size they compile without errors or warnings and are well tested.
Thank you.
OWHorus