I have come across what appears to be an intermittent NodeBox bug that becomes more likely the larger your network gets.
I managed to isolate the problem to a single innocent-looking subnetwork I made, Pick_Color, that simply chooses one of three colors based on a list of values. It does this by computing an index of 0 to 2 and rendering a switch node with the 3 color values as inputs.
The more this node appears in my network, the higher the probability of a crash.
By “crash” I mean a “Multiple entries with the same key” error which references one of my three color hex values. Although the error is not fatal, my NodeBox app stops working as soon as it appears and I have to quit and relaunch NodeBox. The error will appear the first time I run an animation or edit the network. But if it doesn’t appear the first time, it never will, and I can edit and run my network for the rest of my session without difficulty.
To demonstrate the remarkably steady probability with which this occurs, I made a very simple network (attached) which replicates the problem. It consists of a single Import CSV node which leads to 7 identical Pick_Color nodes. These in turn are joined to a single rendered Combine node.
The more Pick_Color nodes you connect to the Combine node, the higher the chance of an error the first time you attempt to “Edit the Children” of any one of the connected Pick_Color nodes. I verified this by launching this doc 100 times: 20 times with only 3 nodes connected, 20 times with 4 nodes connected, etc.
Here are my results:
3 Nodes: 15% Fail Rate
4 Nodes: 45% Fail Rate
5 Nodes: 60% Fail Rate
6 Nodes: 65% Fail Rate
7 Nodes: 70% Fail Rate
My current project needs to pick colors for a bunch of different value lists, so this bug is becoming an increasing problem for me.
Do you guys have any idea what’s going on here? Any suggested workarounds?
Thanks,
John
I am running NodeBox 3.0.43 with Java 1.8.0_25-b17 on a Yosemite MacBook Air. “Crash Test” network and CSV file attached.
Full typical error message copied below:
java.lang.IllegalArgumentException: Multiple entries with same key: <Node Red:color/color>=[#ff9966ff] and <Node Red:color/color>=[#ff9966ff]
at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150)
at com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104)
at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:97)
at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:294)
at nodebox.node.NodeContext.<init>(Unknown Source)
at nodebox.client.NodeBoxDocument.render(Unknown Source)
at nodebox.client.NodeBoxDocument.requestRender(Unknown Source)
at nodebox.client.NodeBoxDocument.setActiveNetwork(Unknown Source)
at nodebox.client.NetworkView$GoInAction.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:943)
at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:586)
at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:483)
at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:429)
at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:329)
at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatched(BasicPopupMenuUI.java:870)
at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2425)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2317)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2275)
at java.awt.Component.dispatchEventImpl(Component.java:4777)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)