Universal Robots Forum

Possible problem with createWaypointNode on languages other than English

I was using WaypointNode waypointNode = programNodeFactory.createWaypointNode() to let the user add a waypoint on button press.
I found that waypoints were added with the default name “waypoint_0, waypoint_1,…” anyway if I change language the default name changes, for example in Italian the default name is “Punto_Percorso” which leads to this exception:

ERROR [AWT-EventQueue-0] 01:02:16 19/11/18: Waypoint name Punto percorso is illegal
com.ur.urcap.api.domain.program.nodes.builtin.IllegalWaypointNameException: Waypoint name Punto percorso is illegal
at com.ur.urcap.domain.program.WaypointNodeImpl.(WaypointNodeImpl.java:87)
at com.ur.urcap.domain.program.ProgramNodeFactoryImpl.createWaypointNode_aroundBody10(ProgramNodeFactoryImpl.java:118)
at com.ur.urcap.domain.program.ProgramNodeFactoryImpl.createWaypointNode_aroundBody11$advice(ProgramNodeFactoryImpl.java:24)
at com.ur.urcap.domain.program.ProgramNodeFactoryImpl.createWaypointNode(ProgramNodeFactoryImpl.java:1)
at com.ur.urcap.domain.program.ProgramNodeFactoryImpl.createWaypointNode_aroundBody8(ProgramNodeFactoryImpl.java:113)
at com.ur.urcap.domain.program.ProgramNodeFactoryImpl.createWaypointNode_aroundBody9$advice(ProgramNodeFactoryImpl.java:24)
at com.ur.urcap.domain.program.ProgramNodeFactoryImpl.createWaypointNode(ProgramNodeFactoryImpl.java:1)
at com.ur.urcap.uring.impl.YouTeachNodeContributionSwing.addWaypoint(YouTeachNodeContributionSwing.java:177)

I solved the problem passing a default name to the creatWaypointNode function but I’m afraid that the described behavior could hide some bug in API

We are investigating this issue.

This issue is resolved in PolyScope 3.9/5.3.

1 Like