jagtech / replicatorg

Automatically exported from code.google.com/p/replicatorg
GNU General Public License v2.0
0 stars 0 forks source link

Application barfs when the NullDriver is selected and the Control Panel is opened #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start application with no additional configuration
2. Note that check mark appears in "Machine>Driver" menu
3. Select "Machine>Control Panel"

What is the expected output? What do you see instead?

Expect to see Control Panel.

See error message in console (see below). And "Machine>Control Panel" remains 
highlighted in 
menu.

What version of the product are you using? On what operating system?

Using rc-2 with edits from Issue #4 .

Please provide any additional information below.

Suggest using Simulator Driver rather than NullDriver?

Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]: Exception in thread 
"AWT-EventQueue-
0" 
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]: 
java.lang.IllegalArgumentException: 
invalid range properties
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.DefaultBoundedRangeModel.<init>(DefaultBoundedRangeModel.java:85)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.JSlider.<init>(JSlider.java:192)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
replicatorg.app.ControlPanelWindow.createJogPanel(ControlPanelWindow.java:362)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
replicatorg.app.ControlPanelWindow.<init>(ControlPanelWindow.java:161)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
replicatorg.app.Editor.handleControlPanel(Editor.java:1182)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
replicatorg.app.Editor$18.actionPerformed(Editor.java:794)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.AbstractButton.doClick(AbstractButton.java:334)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1051)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.jav
a:1092)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Component.processMouseEvent(Component.java:5602)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Component.processEvent(Component.java:5367)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Container.processEvent(Container.java:2010)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Component.dispatchEventImpl(Component.java:4068)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Container.dispatchEventImpl(Container.java:2068)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Component.dispatchEvent(Component.java:3903)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Container.dispatchEventImpl(Container.java:2054)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Window.dispatchEventImpl(Window.java:1791)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.Component.dispatchEvent(Component.java:3903)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
69)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190
)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
Jun 30 02:12:27 ... [0x0-0x14f14f].ReplicatorG[2852]:   at 
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
...

Original issue reported on code.google.com by follower@gmail.com on 29 Jun 2009 at 2:19

GoogleCodeExporter commented 8 years ago
Fixed in the SVN trunk.  (Fix may be obsolete in the 0005 refactor.)

Original comment by pho...@gmail.com on 29 Jun 2009 at 2:39

GoogleCodeExporter commented 8 years ago
AFAICT this fix breaks the simulator as it uses the Null Driver. The original 
issue is due to the combination of 
an "Unknown"/"Null" machine and the NullDriver. The NullDriver is valid if the 
machine is the simulator.

So, my original suggestion had a terminology issue. The default *Machine* 
should probably be the simulator 
rather than Unknown/Null.

This also suggests the menu item shouldn't actually be "Driver" as you're not 
actually selecting the driver, 
you're actually selecting the machine?

The error occurs when this sequence of events is logged:

------------
Loading machine: Unknown
No driver config found.
Loading driver: NullDriver

Machine set to replicatorg.app.MachineController@e90097
------------

Which is what happens when there is no preferences file *or* no machine/driver 
has been selected since the 
preferences file was created.

So, it seems the issue isn't the NullDriver in this case--it's the 
"Unknown/null" machine?

I think this change can be reverted and a different approach used.

Original comment by follower@gmail.com on 29 Jun 2009 at 3:28

GoogleCodeExporter commented 8 years ago
The only thing this particular change should alter is the ability to launch the
machine control panel when the simulator is selected.  That makes sense to me, 
since
the control panel exists to directly control a machine.

I'm not sure what the actual error you're getting now is-- can you be more 
specific?

The vocabulary used internally in replicatorg is kind of terrible. I'm in the 
middle
of a big refactor right now and one of the first questions I had to address was
whether I was going to restructure the machinecontroller/machinemodel/driver 
mess for
0005.  I'm probably going to push most of that off for 0006 in the interest of
getting 0005 out this week; it's probably more important in the short term to do
things like get the build threads out of the editor window code.  :/

Original comment by pho...@gmail.com on 29 Jun 2009 at 3:42