Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBounds error on back button - happens occationally #382

Closed
codenameone opened this issue Mar 27, 2015 · 1 comment
Closed

Comments

@codenameone
Copy link
Collaborator

Original issue 382 created by codenameone on 2012-11-04T11:05:25.000Z:

Please clearly state whether the issue relates to a device/the simulator or
the tools.
Tested in the Simulator.

If related to a device be sure to specify exactly which device with as much
details as possible.

What steps will reproduce the problem?

  1. When pressing the back command to go back from a form, sometimes it causes the null pointer exception.

What is the expected output? What do you see instead?

The previous form should be shown, instead null pointer exception is thrown.

The stack trace for it is given below:

java.lang.ArrayIndexOutOfBoundsException: 1 > 0
at java.util.Vector.insertElementAt(Vector.java:594)
at com.codename1.ui.Container.insertComponentAt(Container.java:407)
at com.codename1.ui.Container.addComponent(Container.java:426)
at com.codename1.ui.MenuBar.addCommand(MenuBar.java:992)
at com.codename1.ui.Form.addCommand(Form.java:2051)
at com.codename1.ui.util.UIBuilder.initBackForm(UIBuilder.java:1861)
at com.codename1.ui.util.UIBuilder.back(UIBuilder.java:1819)
at com.codename1.ui.util.UIBuilder.back(UIBuilder.java:1794)
at com.codename1.ui.util.UIBuilder$FormListener.actionPerformed(UIBuilder.java:2367)
at com.codename1.ui.util.EventDispatcher.fireActionSync(EventDispatcher.java:366)
at com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:311)
at com.codename1.ui.Form.actionCommandImpl(Form.java:1156)
at com.codename1.ui.Button.fireActionEvent(Button.java:360)
at com.codename1.ui.Button.released(Button.java:395)
at com.codename1.ui.Button.pointerReleased(Button.java:483)
at com.codename1.ui.Form.pointerReleased(Form.java:1991)
at com.codename1.ui.Component.pointerReleased(Component.java:2163)
at com.codename1.ui.Display.handleEvent(Display.java:1663)
at com.codename1.ui.Display.edtLoopImpl(Display.java:908)
at com.codename1.ui.Display.mainEDTLoop(Display.java:855)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:119)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:171)

What version of the product are you using? On what operating system?
On simulator, Netbeans plugin version 1.0.23

Please provide any additional information below.

Unfortunately, I don't have more exact steps for reproducing it every time, this happens during the first time when the app is started. After that the back command works as expected. Probably from the stack trace, you can see if there is a bug.

@codenameone
Copy link
Collaborator Author

Comment #1 originally posted by codenameone on 2012-11-04T19:54:03.000Z:

Thanks. Fixed in SVN.

@codenameone codenameone removed their assignment Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants