vimsh / mafscaling

Car ECU logs processing: MAF scaling/rescaling, Table rescaling, Throttle Maps, Load / Injector Pulse Width / IAT compensation, Speed Density, WOT VVT, ECU log statistics, WOT compare, ECU log view, Map tracing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't find config.xml file

tapickell opened this issue · comments

2015-11-04 17:48:05.525 [ERROR] Config.java:729 - java.io.FileNotFoundException: config.xml (No such file or directory)
java.lang.ArrayIndexOutOfBoundsException
2015-11-04 17:48:11.028 [ERROR] MafScaling.java:79 - java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException

Tried running this and it looks for a config.xml file, I don't see that in the repo or in the latest release.
Is this something that can be added to the repo or is something I need to create to run this?

Is there a separate testing suite for this?

commented

I'll change logging from ERROR to WARNING which it is, the conf file will be created when you close the app with any changes you make or otherwise with defaults.

Now, the arr index out of bounds - that's something new, do you remember what you were doing as stack trace doesn't say much?

Nope, there are no automated tests. Perhaps some day if I have time I'll setup a SonarQube server and write Junit tests.

That was just trying to start it with the run.sh script.

commented

I don't get those array index out of bounds errors on Win or Lin
What do you use, Unix or Linux? which OS and which java? I just started on CentOS 4.4 with java 1.6.20. I also remember testing on my laptop (albeit a while ago) on Mageia 5 with Java 1.7 with no issues either. Perhaps try some other swing plafs (see run.sh) and switch to NimbusLookAndFeel or MotifLookAndFeel or some custom java swing native.

OSX 10.11.1

~/code/mafscaling (master ✘)✹✭ ᐅ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
commented

Let me see if can get access to apple somewhere.
Meanwhile, could you pls try commenting out start line in run.sh (I think it's GTKLookAndFeel by default) and uncomment the one below, see if you'll get those out of bounds errors:
java -Dswing.defaultlaf=com.jtattoo.plaf.aero.AeroLookAndFeel -Xms64M -Xmx512M -jar MafScaling.jar &

commented

Any update on my suggestion? Did it still throw?

I tried all the different GTK... lines and nothing is working. If I get some time I may try to test this in a Linux VM.

commented

I have just tested on apple box:

Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Using java 1.7 and 1.8:

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

If you use run.sh on apple box it could spit this error:

$ Exception in thread "main" java.lang.Error: Cannot load com.sun.java.swing.plaf.gtk.GTKLookAndFeel
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1347)
at javax.swing.UIManager.initialize(UIManager.java:1455)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1422)
at javax.swing.UIManager.getLookAndFeel(UIManager.java:489)
at com.vgi.mafscaling.MafScaling.main(MafScaling.java:60)

This is because by default I have set the run.sh for Linux with Gnome so unless you there is a gtk library installed this error would be thrown.

To fix this, run.sh needs to be modified to use a different plaf. Open it up and comment out an dthe uncomment these line so the result looks like this:

#java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Xms64M -Xmx512M -jar MafScaling.jar &
...
java -Dswing.defaultlaf=com.jtattoo.plaf.aero.AeroLookAndFeel -Xms64M -Xmx512M -jar MafScaling.jar &

Besides the error above there were no other errors. I'm not sure how you got those 'Array index out of bounds' erros form just starting the app with the run.sh script.

As far as the issue - I have just checked in an empty config file and left the logging at ERROR level.