×

Discussion Board

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

    ArrayIndexOutOfBoundsException

    Hi

    I hava a simple MIDlet with FullCanvas. Each time than KEY_SOFTKEY1 or KEY_SOFTKEY2 is pressed I get message
    Event handler threw: java.lang.ArrayIndexOutOfBoundsException: 2017 >= 1

    After a couple of times the error accures:

    kmidp_debug.exe has generated errors and will be closed by Windows. You will need to restart the program.

    public void keyPressed function does nothing

    What will help????

    Hz

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

    There isn't any this kind of bug as you discribed, keyPressed () methord works properly. Maybe some others got problem, would you specify which Emulator or Device you are using or is it possible for you to post your source code in this forum and I would like to take a look.

    Regards,
    Kui

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

    I was able to get rid of the problem, but I still dont understand it.
    Im using Sun One studio 4 update 1 and series 60 sdk 1.0


    I removed from my midlets start up the following lines, and the error messages was history
    Alert splashScreen =new Alert(null,"MyFirst\nGame",logo,AlertType.INFO);
    splashScreen.setTimeout(4000);

    Why's this and how can I create this kind of splashScreen in FullCanvas

    btw the splashScreen didnt work...

    Cheers,
    Hz

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere / Finland
    Posts
    201
    Hi,

    I don't think the splash screen interacts with SoftKey press. Here is the code fraction form the Fruitmachine example for displaying a splash screen:

    public void startApp()
    {
    Displayable current = Display.getDisplay(this).getCurrent();
    if (current == null)
    {
    // first time we've been called
    Alert splashScreen = new Alert(null, // no title
    "Fruit Machine\nForum Nokia",
    logoImage,
    AlertType.INFO);
    splashScreen.setTimeout(20000); // 2 seconds
    LoginScreen loginScreen = new LoginScreen(this, httpPoster);
    // display splash screen, then login screen
    Display.getDisplay(this).setCurrent(splashScreen, loginScreen);
    }
    else
    {
    Display.getDisplay(this).setCurrent(current);
    }
    }


    Would you try your application also on the Series 60 Concept SDK, in my personal opinion, it's faster and better then the Series 60 SDK. Or on 7210 SDK 1.0.

    Regards,
    Kui

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    3
    I am also getting the same error:

    Event handler threw: java.lang.ArrayIndexOutOfBoundsException: 2017 >= 1

    It happens when I press either softkey on the Series 60 emulator beta 0.1, not on the series 40 concept. Unfortunately, though the software works on my 7650, we have reports of if crashing on other 7650 and 3650 models when those keys are pressed. We've seen this error on two applications so far, written from different codebases.

    Is there any reason for this to be happening?

Posting Permissions

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