Giter VIP home page Giter VIP logo

merccc's People

Contributors

wheerdam avatar

Watchers

 avatar  avatar

merccc's Issues

Duplicate team IDs in the configuration does not trigger an error

If multiple teams have the same numeric ID, no error would be thrown by the program. It only results in duplicate entries in the Team Selection and Classification controls, and assorted misbehaviors due to shared ID.

The team that is defined later in the configuration file will override earlier team definitions.

Unable to download resources from server running in headless mode

If the server is running in headless mode via the --headless option, the client won't be able to download the server-side resources even if the --copyresources option is used on both ends.

The server-side SocketInterface uses the getResourcePath method of ControlCenter to get the path to the resources directory. This method returns null in headless mode because the resourcePath field is initialized in the GUI initialization code path in ControlCenter.java which is not run in headless mode.

Null pointer exception on commit+render when a team only has Double.NaN score entries

A score that results in the value Double.NaN can be committed to the score list on an instance of Team. However, since the NaN value can not be compared (always returns false since it doesn't make any sense to compare numbers with... well, not a number), the Team.getBestScore() method will return null if the team only has NaN scores, while Team.hasScore() will still return true.

The score update callback on DisplayFrame checks whether the team has any score with the hasScore() method before calling getBestScore() to render the current best score for the active team. This results in a NullPointerException if the team only has NaN score entries since hasScore() will return true if all the scores are NaN values yet it gets a null with getBestScore().

Possible solutions:

  • Do a check for divide-by-zero on score commit/add/CSV-load and ignore/trigger an error if a divide-by-zero is encountered
  • Allow NaN, but fix the DisplayFrame callback to avoid the exception

The first solution seems to be the best way since a NaN score does not make any sense at all unless the software is scoring some funky scoring system that does not adhere to common arithmetic.

Note that a divide-by-zero with Double values can return Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY, which are comparable and handled fine by the program (AFAIK). Not sure if this behavior should stay if the first solution is implemented.

Windows runscript has hardcoded JRE java path

The batch file generated by the installer refers to an absolute path for the JRE's 'java' program. This necessitates reinstallation of merccc every time the JRE is updated on the host computer.

SocketInterface doesn't fetch team annotations info on initialization

The only times the client syncs with the server's team annotations are when each team is set an annotation and when it is cleared.

If a display client connects to a merccc server with teams that have annotations, the teams may not show up in the classification list because the client's state doesn't have those annotations.

Uncaught NumberFormatException on "Add Score" dialog's +1/Undo Buttons

If the user has a score with +1/Undo score type and typed in an invalid number in the "Add Score" dialog, clicking on either the +1 or Undo button will cause an uncaught NumberFormatException:

Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "2.0z"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at org.osumercury.controlcenter.gui.ControlFrame$ScoringUpUndoActionListener.actionPerformed(ControlFrame.java:1420)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
...

The "Add Score" dialog is the only place where this is possible since the score text field would not be user-editable otherwise.

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.