New as of friday's build (Picker Component throws null pointer exception on pressed event)

11 views
Skip to first unread message

Mark Bolduc

unread,
Jun 27, 2020, 5:40:40 PM6/27/20
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA Netbeans 11.3
Desktop OSWindows 10
Simulator Latest
Device PC,IOS,Android

here is the reproducible code. Click on date to get exception:
Below is the stack trace.

            TextModeLayout tl = new TextModeLayout(3, 2);
            Form f = new Form("Pixel Perfect", tl);

            TextComponent title = new TextComponent().label("Title").columns(5).rows(4).text("Text");
            TextComponent price = new TextComponent().label("Price");
            TextComponent location = new TextComponent().label("Location");
            PickerComponent date = PickerComponent.createDateTime(new Date()).label("Date");
            TextComponent description = new TextComponent().label("Description").multiline(true);

            Validator val = new Validator();
            val.addConstraint(title, new LengthConstraint(2));
            val.addConstraint(price, new NumericConstraint(true));

            f.add(tl.createConstraint().widthPercentage(60), title);
            f.add(tl.createConstraint().widthPercentage(40), date);
            f.add(location);
            f.add(price);
            f.add(tl.createConstraint().horizontalSpan(2), description);
            f.setEditOnShow(title.getField());

            f.show();

Stack Trace:
java.lang.NullPointerException
[EDT] 0:0:0,48 - Exception: java.lang.NullPointerException - null
    at com.codename1.components.InteractionDialog.padOrientation(InteractionDialog.java:857)
    at com.codename1.components.InteractionDialog.showPopupDialog(InteractionDialog.java:793)
    at com.codename1.components.InteractionDialog.showPopupDialog(InteractionDialog.java:654)
    at com.codename1.components.InteractionDialog.showPopupDialog(InteractionDialog.java:629)
    at com.codename1.ui.spinner.Picker$1$6.run(Picker.java:812)
    at com.codename1.ui.AnimationManager.flushAnimation(AnimationManager.java:220)
    at com.codename1.ui.spinner.Picker$1.showInteractionDialog(Picker.java:808)
    at com.codename1.ui.spinner.Picker$1.actionPerformed(Picker.java:303)
    at com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:349)
    at com.codename1.ui.Button.fireActionEvent(Button.java:679)
    at com.codename1.ui.Button.released(Button.java:720)
    at com.codename1.ui.Button.pointerReleased(Button.java:827)
    at com.codename1.ui.LeadUtil.pointerReleased(LeadUtil.java:153)
    at com.codename1.ui.Form.pointerReleased(Form.java:3685)
    at com.codename1.ui.Component.pointerReleased(Component.java:4731)
    at com.codename1.ui.Display.handleEvent(Display.java:2348)
    at com.codename1.ui.Display.edtLoopImpl(Display.java:1240)
    at com.codename1.ui.Display.mainEDTLoop(Display.java:1158)
    at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

Regards:

Shai Almog

unread,
Jun 27, 2020, 10:26:09 PM6/27/20
to CodenameOne Discussions
Damn, that's my fault.
I'll push a hotfix.

Mark Bolduc

unread,
Jun 28, 2020, 10:13:53 AM6/28/20
to CodenameOne Discussions
What!
You mean you are Human?
LOL

Regards
Reply all
Reply to author
Forward
0 new messages