×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    8

    Global root overflow

    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?

    Regards
    Rok

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    RE: Global root overflow

    The same trouble ("Global root overflow&quot. Appears inside a particular readUTF() of DataInputStream of HttpConnection. All other emulators (sun's J2ME toolkit integrated, all Siemens) work well.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    RE: Global root overflow

    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.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    RE: Global root overflow

    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...

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    39

    RE: Global root overflow

    I have the exact same problem. I use this code to read the inputstream from the http server:

    -----CODE---------
    int byteRead = 0;
    int chunkSize = 1000;
    byte[] data = new byte[len];

    while (byteRead < len)
    {
    if ((len-byteRead) > 1000)
    chunkSize = 1000;
    else
    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...
    serviceRepaints();
    }
    processData(data,byteRead);
    -------------------

    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?

    /Bjarne

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    71

    RE: Global root overflow

    hmm, strange co-incidence, readFully() and read(byte [],...) are both broken in the Siemens API as well! :/

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    46

    RE: Global root overflow

    Hi all,

    readFully() bug is a known issue in Nokia 6310i MIDP SDK beta 0.1 and it is fixed in a new Nokia 6310i MIDP SDK. The new SDK will be available very soon in Forum Nokia.

    regards,
    Petri/Forum Nokia

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    39

    RE: Global root overflow

    It seems like the problem only occurs on the emulator.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×