Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvocationTargetException when saving in a file with an extension other than .csv #15

Open
bNobo opened this issue May 11, 2020 · 0 comments

Comments

@bNobo
Copy link

bNobo commented May 11, 2020

Operating System

Windows 10

Steps to reproduce

  1. Start SnakeAI
  2. Click on Save Button
  3. Enter a filename with an extension other than .csv, "model.dat" for e.g.
  4. Click on Save

A file is created but its size is 0 Kb and the error bellow appears in console

Error

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at processing.core.PApplet.selectCallback(PApplet.java:6719)
at processing.core.PApplet.access$1(PApplet.java:6712)
at processing.core.PApplet$4.run(PApplet.java:6623)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.IllegalArgumentException: No extension specified for saving this Table
at processing.data.Table.save(Table.java:1184)
at processing.data.Table.save(Table.java:1175)
at processing.core.PApplet.saveTable(PApplet.java:6299)
at processing.core.PApplet.saveTable(PApplet.java:6276)
at SnakeAI.fileSelectedOut(SnakeAI.java:226)
... 21 more

Suggestion

The "save as" dialog should automatically add the .csv extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant