NullPointerException in the app after generating the iOS certification

22 views
Skip to first unread message

luispa...@outlook.com

unread,
Oct 22, 2018, 3:18:08 PM10/22/18
to CodenameOne Discussions
I'm having a problem with the NullPointerException after generating the iOS certification for the app I'm developing.

The problem occurs when I click the hamburger menu or in another area in the simulator. The problem occurs in the simulator and on iOS (haven't tested on Android).

The function which gives the exception is the addMaterialCommandToRightSideMenu(String name, char icon, final ActionListener ev). Here is the stack trace:
```java.lang.NullPointerException
    at com.codename1.ui.Toolbar$5.actionPerformed(Toolbar.java:1345)
    at com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:349)
    at com.codename1.ui.Form.pointerReleased(Form.java:3313)
    at com.codename1.ui.Component.pointerReleased(Component.java:4419)
    at com.codename1.ui.Display.handleEvent(Display.java:2071)
    at com.codename1.ui.Display.edtLoopImpl(Display.java:1043)
    at com.codename1.ui.Display.mainEDTLoop(Display.java:961)
    at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
```

Shai Almog

unread,
Oct 23, 2018, 12:19:10 AM10/23/18
to CodenameOne Discussions
Hi,
I have a guess as to what is triggering this and made a minor fix. However, it seems your libraries are slightly out of date. Please go to Codename One Settings -> Basic -> Update Project Libs. After running that produce that exception again and provide the new stack trace. It should have different line numbers which will help me verify that my fix targeted the right lines in the code.

luispa...@outlook.com

unread,
Oct 23, 2018, 8:48:16 AM10/23/18
to CodenameOne Discussions
I updated the project libs on Netbeans and IntelliJ and it still gives the same stack trace.

Shai Almog

unread,
Oct 24, 2018, 12:08:25 AM10/24/18
to CodenameOne Discussions
OK, we'll push an update out this Friday. If it's still happening after that update (make sure to run update client libs at that point) then please file an issue with a test case so we can reproduce this.
Reply all
Reply to author
Forward
0 new messages