nasa / OpenVSP3Plugin

Apache License 2.0
21 stars 8 forks source link

java.io.Filenotfoundexception #4

Open ghost opened 6 years ago

ghost commented 6 years ago

when I get the option to open a vsp3 file, and I do i get the following error:

java.io.FileNotFoundException: .\OpenVSP3PluginCompGeom.csv (No such file or directory)

additional notes, I am running this on ubuntu 18.04.

jfenbert commented 6 years ago

This file should be generated when the plugin runs OpenVSP on you selected input file. What version of OpenVSP are you running? Do you have the OPENVSP_EXE environment variable set?

ghost commented 6 years ago

I am running 3.16.1 and I have the OPENVSP_EXE set.

ghost commented 6 years ago

I managed to get around that error by making that file by hand, however when I tried to apply any selections I made in the gui it crashed. Here is the terminal output while running the program:

Error ExecuteScript GetModule Error ExecuteScript GetModule JavaFX Application Thread INFO OpenVSP3Plugin - runOpenVSPScript() - [/home/sam/software/OpenVSP-3.16.1-Linux/vsp, /home/sam/Documents/isef/models/x3.vsp3, -script, OpenVSP3Plugin.vspscript] - Exit code 0 I/O warning : failed to load external entity ".\OpenVSP3Plugin.vsp3" could not parse XML document error : Unknown IO error error : Unknown IO error

jfenbert commented 6 years ago

The term Module makes me think you might be running JAVA 10 or 11. This jar was built with JAVA 8. I haven't migrated to JAVA 10 yet so if you need to use it you will have to modify the code.

ghost commented 6 years ago

ok, i uninstalled java 10, now this is the eror that I am getting:

Error ExecuteScript GetModule JavaFX Application Thread DEBUG JavaFXUI - restoreState() - 5 Design Variables Selected Aug 29, 2018 4:27:39 PM com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells INFO: index exceeds maxCellCount. Check size calculations for class javafx.scene.control.TableRow

ghost commented 6 years ago

when i tried using a different file this was the error that I got:

Error ExecuteScript GetModule JavaFX Application Thread DEBUG JavaFXUI - restoreState() - 12 Design Variables Selected JavaFX Application Thread DEBUG JavaFXUI - switchFile(/home/sam/Documents/isef/models/test.vsp3) Error ExecuteScript GetModule Thread-5 INFO OpenVSP3Plugin - runOpenVSPScript() - [/home/sam/software/OpenVSP-3.16.1-Linux/vsp, /home/sam/Documents/isef/models/test.vsp3, -script, OpenVSP3Plugin.vspscript] - Exit code 0 JavaFX Application Thread DEBUG JavaFXUI - restoreState() - 12 Design Variables Selected Aug 29, 2018 4:31:04 PM com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells INFO: index exceeds maxCellCount. Check size calculations for class javafx.scene.control.TableRow

Another issue showed up when i tried opening openvsp through the program:

Error ExecuteScript GetModule JavaFX Application Thread DEBUG JavaFXUI - restoreState() - 5 Design Variables Selected Error ExecuteScript GetModule JavaFX Application Thread INFO OpenVSP3Plugin - runOpenVSPScript() - [/home/sam/software/OpenVSP-3.16.1-Linux/vsp, /home/sam/Documents/isef/models/test.vsp3, -script, OpenVSP3Plugin.vspscript] - Exit code 0 I/O warning : failed to load external entity ".\OpenVSP3Plugin.vsp3" could not parse XML document

I think some of these errors have to do with it looking for something with .\ rather than ./ as linux would use.

jfenbert commented 6 years ago

I think you may be correct about the path separator. I don't have access to ubuntu, and our CentOS has been updated since the last time I tested. It did work a year ago on CentOS, possibly using Oracle JAVA not OpenJDK. I'm not going to have a chance to look at this for a couple of weeks, but you could try changing the path separation characters in the code and building it with the build.sh

ghost commented 6 years ago

I have managed to fix the issue so that it uses the proper format for finding files on linux, however that was not the solution, as it seems when it runs the vspscript it doesn't actually generate the files, here is the contents of the vspscript file that it generates

void main() { SetComputationFileName(COMP_GEOM_TXT_TYPE, "./OpenVSP3PluginCompGeom.txt"); SetComputationFileName(COMP_GEOM_CSV_TYPE, "./OpenVSP3PluginCompGeom.csv"); ComputeCompGeom(0, false, COMP_GEOM_CSV_TYPE); while ( GetNumTotalErrors() > 0 ) { ErrorObj err = PopLastError(); Print( err.GetErrorString() ); } }