I'm testing an application on Nokia 6310i Emulator (running from JBuilder) and get "Global root overflow". I'm reading data from http connection and writing it to RMS. This is not an exception, its a message. After that the application closes on the emulator.
How can I handle this?
What to do?
The same trouble ("Global root overflow". Appears inside a particular readUTF() of DataInputStream of HttpConnection. All other emulators (sun's J2ME toolkit integrated, all Siemens) work well.
Aloha, yes I have exactly the same problem, using the 6310i emulator running from Forte for Java. I'm reading data from a StreamConnection and after a couple of reads get Global Root Overflow, and then the emulator terminates. I have no problems with the Sun Wireless Toolkit, nor with this J2ME application running use MIDP for Palm OS.
This problem basically renders the application unusable; however I am searching for a workaround.
Aloha, I did find a solution. This solution is based on another reply from the Nokia_Archive, which said the DataInputStream.readFully() was the culprit. I removed the byte-array InputStream.read
and replaced it with a loop of single-byte InputStream.read().
That has solved the Global Root Overflow problem, at least for now...
I have the exact same problem. I use this code to read the inputstream from the http server:
int byteRead = 0;
int chunkSize = 1000;
byte data = new byte[len];
while (byteRead < len)
if ((len-byteRead) > 1000)
chunkSize = 1000;
chunkSize = (len-byteRead);
int actual = is.read(data,byteRead,chunkSize);
byteRead=byteRead + actual;
repaint(); //These two rows updates the canvas so my "download-indicator" is animated while reading the inputstream...
If I set chunkSize = 1, I always gets "Global Root overflow". The larger chunkSize is, the less chance of "Global Root overflow". The problem is that I want chunkSize to be as small as possible so my indicator is nicer animated (= higher frame rate)..
Some said that reading one bit at a time with .read() solved the problem but as far as I know read() tries to read as much as possible? And if I use read() - how can I animate the screen while reading?