×

Discussion Board

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

    Conflicting Stack Sizes - in emulator

    Sometimes, while running in emulator, the emulator crashes with the message "Conflicting stack sizes". We have experienced this with several of the Nokia emulators (7210, 3510i and some).

    This is really annoying, since we don't know what is causing this, and we don't know if the same will happen on the actual phone. We are NOT using any Nokia-specific libraries, nor any sound.

    So, you guys at Nokia, is this only a buggy emulator, or have we actually done something wrong??? Please help!


    Regards,
    Bell

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere / Finland
    Posts
    201
    Hello,

    I haven't experienced this before and could you give more detailed information such as which version the emulator you are using because the latest 7210 emulator is v1.0 and lots of bugs have already been fixed on it. Is it possible for you to post the source code (or the fraction of codes you suspect may cause the crash) on this forum, I would like to take a look, thanks.

    Regards,
    Kui

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    10
    We are running on 7210 v1.0. We don't know what part of the source is causing this error, since the error occurs on different times all the time, and we are running a threaded application so it's kind of hard to know exactly what went wrong. But here is some other information:

    * The jar-file (when obfuscated with retroguard) is approximately 33kb.
    * We use only std libraries.
    * We are doing http requests, initiated both by a TimerTask and by the user (We are moving these out in a separate thread now, since there appears to be issues with http-requests from the main thread when using GPRS)

    We have created some other applications which did not do any http-requests, and where we never have experienced the same error. Could this have something to do with http-requests? Noticed some other posts on this forum where people have experienced the same error, but they were playing aroundwith soud and stuff. We are not.


    Best regards,
    Bell

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere / Finland
    Posts
    201
    It's hard to say what cause the error, put HttpConnection in a seperate thread can avoid the problem happening in Httpconnection blocking the whole application.

    Sometimes the obfuscator isn't compatible with the Nokia specific API but you only use the standard libraries.

    I will try to keep a eye on this topic and if you can solve the problem, please let me know the reason. Thanks.

    Regards,
    Kui

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

    same problem

    I can verify this problem. We have a pretty big application and I think this problem is somehow related to slow memory clean-up.

    An example. I need to move from view A to view C via view B. I get "conflicting stack .." if I do this quickly. If I do it slowly by doing something first in the view B (like moving cursor a bit), nothing happens. I can follow this by looking the debug window and I can see how it releases the stack memory rather slow.

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I have this error quite often on the 3510i emulator. I'm also doing constant HTTP polling.
    I can at least say that I have never got any "conflicting stack sizes" on the real device, only on the emulator, so I am just ignoring it.

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

    Conflicting Stack Sizes - in emulator (Fixed)

    I have the same problem too, when I do HTTP pooling.

    But I can fix it. I close all Stream and Connection after i use it. I assign all useless variables to null and add System.gc() at the end of pooling loop.

    I think it relate memory issus / garbage collection.

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    35
    Yes that works not, just closing all the streams and calling System.gc() works for me.

    Otherwise it would get the conflicting stack size error on the 5th HttpConnection send.

    Tommy

  9. #9
    Registered User
    Join Date
    Mar 2003
    Posts
    10
    We had sort of learned to live with this problem, but the System.gc() have now made our lives much happier. We have also added try{} finally{} to all our stream reading and moved the close() to the finally-clause.

    Thank you very much for the help! We have experienced a lot of strange things regarding this, but now it all works fine

Posting Permissions

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