Getting a NullPointerException after update to latest version (2021-04-08_04-19-29.d3a4c39))

55 views
Skip to first unread message

Kim Lindberg

unread,
Apr 11, 2021, 12:28:42 PM4/11/21
to OpenPnP
Hope someone can help me. I updated to the latest OpenPnP version on a working setup, but now I get a NullPointerException when trying to pick a part from a feeder.
I cannot seem to find out why :(

nullpointer.png
Trace log.txt

tony...@att.net

unread,
Apr 11, 2021, 5:01:35 PM4/11/21
to OpenPnP
Can you post your machine.xml?

tony...@att.net

unread,
Apr 11, 2021, 5:23:47 PM4/11/21
to OpenPnP
By any chance do you have a part assigned to any feeder that doesn't exist in your parts.xml file? 

I suspect the highlighted code is returning a null pointer in that case:

            // add property listener for recycle button
            // enable recycle only if part on current head
            PropertyChangeListener recyclePropertyListener = (e) -> {
                    boolean canTakeBack = false;
                    Part part = machineControlsPanel.getSelectedNozzle().getPart();
                    if (part != null) {
                        for (Feeder feeder : Configuration.get().getMachine().getFeeders()) {
                            if (feeder.isEnabled() && feeder.getPart().equals(part) && feeder.canTakeBackPart()) {
                                canTakeBack = true;
                            }
                        }
                    }
                    recycleAction.setEnabled(canTakeBack);
                };

A quick workaround, if that is the case, is to disable any feeders that may be assigned non-existent parts.

Kim Lindberg

unread,
Apr 12, 2021, 12:43:30 AM4/12/21
to OpenPnP
Hi Tony,
Thanks for the input. It turns out that all the StripFeeders where enabled, but no parts where assigned. Thank a lot that did the trick.
I guess this is new, because I never used the strip feeders, hence I never enabled them!
I attached my Machine.xml (after I turned off the strip feeders)

machine.xml

ma...@makr.zone

unread,
Apr 12, 2021, 2:49:07 AM4/12/21
to ope...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/12a5dc5b-d9dc-4f97-a122-abd6d115b5acn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages