Coder Social home page Coder Social logo

Comments (9)

tapickell avatar tapickell commented on June 27, 2024

Is there a separate testing suite for this?

from mafscaling.

vimsh avatar vimsh commented on June 27, 2024

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.

from mafscaling.

tapickell avatar tapickell commented on June 27, 2024

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

from mafscaling.

vimsh avatar vimsh commented on June 27, 2024

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.

from mafscaling.

tapickell avatar tapickell commented on June 27, 2024

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)

from mafscaling.

vimsh avatar vimsh commented on June 27, 2024

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 &

from mafscaling.

vimsh avatar vimsh commented on June 27, 2024

Any update on my suggestion? Did it still throw?

from mafscaling.

tapickell avatar tapickell commented on June 27, 2024

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.

from mafscaling.

vimsh avatar vimsh commented on June 27, 2024

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.

from mafscaling.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.