Note that there are some explanatory texts on larger screens.

plurals
  1. POCould someone help me debug my app (not very big)?
    text
    copied!<p>Not sure if this kind of help is accepted to ask for here, tell me if it isn't.</p> <p>It has to get done before tomorrow, it's not entirerly finished but it should work somewhat ok by now. I'm trying to use the Eclipse debugger (not very used to it).</p> <p>OK, I had an old class called "Debugging" in another project folder, which was a debugging-test. I didn't give it that name, it was an assignment. It seemed to cause some problems, removed it and now my stacktrace is much smaller.</p> <p>I tried debugging the Board constructor, added the original code from the constructor into a method and tried running that method in the constructor. Which doesn't make any difference, but still.</p> <p>Now the stacktrace looks like this:</p> <pre><code>Thread [main] (Suspended) Board(Object).&lt;init&gt;() line: 20 Board.&lt;init&gt;() line: 9 Game.&lt;init&gt;() line: 15 Game.main(String[]) line: 11 </code></pre> <p>The board constructor:</p> <p>public class Board {</p> <pre><code>private int COLUMNS = 8; private int ROWS = 8; private Square[][] grid; public Board(){ addGrid(); } public void addGrid(){ grid = new Square[COLUMNS][ROWS]; for(int row = 0; row &lt; 8; row++){ for(int col = 0; col &lt; 8; col++){ grid[col][row] = new Square(this); } } } </code></pre> <p>The square constructor:</p> <pre><code>public class Square { private Piece piece; private Board board; public Square(Board b){ board = b; } </code></pre> <p>Among my breakpoints I noticed this:</p> <pre><code>ArrayIndexOutOfBoundsException: caught and uncaught </code></pre> <p>Tried again and got something similar as before:</p> <pre><code>Thread [main] (Suspended) ClassNotFoundException(Throwable).&lt;init&gt;(String, Throwable) line: 217 ClassNotFoundException(Exception).&lt;init&gt;(String, Throwable) line: not available ClassNotFoundException.&lt;init&gt;(String) line: not available URLClassLoader$1.run() line: not available AccessController.doPrivileged(PrivilegedExceptionAction&lt;T&gt;, AccessControlContext) line: not available [native method] Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: not available Launcher$ExtClassLoader.findClass(String) line: not available Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available Launcher$AppClassLoader.loadClass(String, boolean) line: not available Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available Board.addGrid() line: 14 Board.&lt;init&gt;() line: 10 Game.&lt;init&gt;() line: 15 Game.main(String[]) line: 11 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload