Page 1 of 1

Exception trying to open file

Posted: Tue Nov 15, 2016 9:14 pm
by RafPe
Hi!

First of all - great program and really happy for having chance using it. I was using till now the newest version without any problems on my windows VM. Strangely enough suddenly it refused to open new files ( the browse for file window would not pop up ). So I installed on my mac Os hoping it would work - but I get exactly the same behaviour

Code: Select all

C:\Windows\system32>java -jar "C:\Users\RafPe\Downloads\AutolevellerAE-0.7.8 (1).jar"
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774)
        at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Node.fireEvent(Node.java:8413)
        at javafx.scene.control.Button.fire(Button.java:185)
        at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
        at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
        at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:380)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:294)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:416)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:415)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.Trampoline.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1771)
        ... 56 more
Caused by: java.lang.IllegalArgumentException: Folder parameter must be a valid folder
        at com.sun.glass.ui.CommonDialogs.convertFolder(CommonDialogs.java:238)
        at com.sun.glass.ui.CommonDialogs.showFileChooser(CommonDialogs.java:190)
        at com.sun.javafx.tk.quantum.QuantumToolkit.showFileChooser(QuantumToolkit.java:1496)
        at javafx.stage.FileChooser.showDialog(FileChooser.java:416)
        at javafx.stage.FileChooser.showOpenDialog(FileChooser.java:350)
        at com.cncsoftwaretools.autoleveller.ui.controllers.BasicsTabController.findOGF(BasicsTabController.java:104)
        ... 66 more
Altough coding is not something abstract for me - seems like I cannot do much here :O . I have tried running it with admin permissions on Windows and then on MacOs. Neither worked.

I have tried update of Java - did not help.

I have tried reinstalling Java - no help :/


Would appreciate some input how we could tackle this one here!

Thanks
Raf

Re: Exception trying to open file

Posted: Wed Nov 16, 2016 5:28 pm
by daedelus
OK so what is happening is at the point you try to open a file, it searches the registry to see if theres a default directory saved previously (which if you have ever opened a gcode file before, there should be such a registry entry), if not, it just defaults to your user home folder. It seems it not working correctly in your case. I shall look into it.

Re: Exception trying to open file

Posted: Fri Nov 18, 2016 9:59 pm
by RafPe
Would you be able to provide more info where exactly it looks in registry for such entries ?

Re: Exception trying to open file

Posted: Sat Nov 19, 2016 11:07 am
by daedelus
Sure, In my Windows 10 PC there is a registry entry in:
HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\com\cncsoftwaretools\autoleveller\ui\controllers

The entry has the name "default/Dir" and my current value is "/D:///Google /Drive///Autoleveller//autoleveller debug file//john"

Re: Exception trying to open file

Posted: Tue Nov 22, 2016 8:15 am
by smega
Hi!
I have the same problem like RafPe :"suddenly it refused to open new files ( the browse for file window would not pop up )" on PC with win XP sp3 32bit and a same thing happened on PC with win 7 32bit,no matter if I started AutolevellerAE-0.7.6 or 0.7.8.
For now AutolevellerAE-0.7.8 working on a machine with win 8.1 64bit ,but on that PC not working paralell port for MACH3. :(

Re: Exception trying to open file

Posted: Tue Nov 22, 2016 9:48 am
by RafPe
Ok - So I have resolved the problem on MacOs - what I did was delete file ~/Library/Preferences/com.cncsoftwaretools.autoleveller.plist

I'm guessing that on Windows deleting registry key HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\com\cncsoftwaretools will recreate it on next start and app will continue to work.

Would be interest to find out what happened here ;)

Hope this helps!

Regards
Raf

Re: Exception trying to open file

Posted: Sun Dec 04, 2016 1:24 pm
by joeaverage
Hi,
did deleting the registry entry fix the problem, my Windows 8 machine has developed the same problem.

Craig

Re: Exception trying to open file

Posted: Mon Dec 05, 2016 7:54 pm
by RafPe
Yes it did ;)

Re: Exception trying to open file

Posted: Mon Jan 20, 2020 1:47 pm
by ghubell
Would you be able to
provide more info where exactly it looks in registry for such entries ?

Re: Exception trying to open file

Posted: Sat Feb 01, 2020 12:31 pm
by bznewz
OK so what is happening is at the point you try to open a file, it searches the registry to see if theres a default directory saved previously (which if you have ever opened a gcode file before, there should be such a registry entry), if not, it just defaults to your user home folder. It seems it not working correctly in your case. I shall look into it.