×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    122

    Array Index out of bounds

    Hey all,

    What might be the problem?
    It runs well with emulator, but crash on my 6230....:-(

    Regards,

    Maoz

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Array Index out of bounds

    As in the API Docs say, ArrayIndexOutOfBoundsException is thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.

    Are you able to figure out at which point of time/operation you are
    getting this exception?

    Regards
    Gopal

  3. #3
    Regular Contributor
    Join Date
    Sep 2007
    Location
    Thirunelveli
    Posts
    115

    Re: Array Index out of bounds

    Hi maozet,
    To avoid this error always get the length of the array in a variable and check if the index used to access array exceeds this length-1.

    Regards
    Senthil

  4. #4
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    122

    Re: Array Index out of bounds

    Thanks for replying....

    How come it works well on Emulator and throw exception on my mobile?

  5. #5
    Regular Contributor
    Join Date
    Sep 2007
    Location
    Thirunelveli
    Posts
    115

    Re: Array Index out of bounds

    That may be due to the data your using in emulator and phone is different. Please impliment with the check and find whether this issue is happening again

    Regards
    Senthil

  6. #6
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    122

    Re: Array Index out of bounds

    Hey all,

    I have checked this for about 40 times... :-(
    It runs on the emulator just fine, throws on my mobile.

    Does any body has faced with a similar situation?

    Regards,

  7. #7
    Registered User
    Join Date
    Jun 2011
    Posts
    1

    Re: Array Index out of bounds

    hi,
    i also face same problem with my j2me app ;
    works fine on emulator but gives arrayindexoutofbound() exception when executed on mobile

  8. #8
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: Array Index out of bounds

    HI there,

    Please pvt message me with some code where you are trying this and I will try to attempt the same, ok?

    And also please let me know the phone model(s) you are using.

    Cheers,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

Similar Threads

  1. nokia 3650 array index outof bound exception
    By hemant_bakshi in forum Mobile Java General
    Replies: 4
    Last Post: 2006-08-03, 07:38
  2. Carbide ERROR: Index was outside the bounds of the array
    By sophiachang in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-07-06, 07:46
  3. Array Index Out Of Bound on Nokia 6810
    By amace in forum Mobile Java General
    Replies: 0
    Last Post: 2005-05-26, 16:26
  4. array out of bounds at Nokia 7210??
    By ffvanderlaan in forum Mobile Java General
    Replies: 1
    Last Post: 2003-10-31, 14:04
  5. Detecting array index out of bound?
    By herbertng in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2003-09-06, 13:13

Posting Permissions

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