{"action":"created","issue":{"url":"https://api.github.com/repos/jgrapht/jgrapht/issues/518","repository_url":"https://api.github.com/repos/jgrapht/jgrapht","labels_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/518/comments","events_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/518/events","html_url":"https://github.com/jgrapht/jgrapht/issues/518","id":305688150,"number":518,"title":"IndexOutOfBoundsException in FibonacciHeap","user":{"login":"shevek","id":391350,"avatar_url":"https://avatars3.githubusercontent.com/u/391350?v=4","gravatar_id":"","url":"https://api.github.com/users/shevek","html_url":"https://github.com/shevek","followers_url":"https://api.github.com/users/shevek/followers","following_url":"https://api.github.com/users/shevek/following{/other_user}","gists_url":"https://api.github.com/users/shevek/gists{/gist_id}","starred_url":"https://api.github.com/users/shevek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shevek/subscriptions","organizations_url":"https://api.github.com/users/shevek/orgs","repos_url":"https://api.github.com/users/shevek/repos","events_url":"https://api.github.com/users/shevek/events{/privacy}","received_events_url":"https://api.github.com/users/shevek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-03-15T19:24:41Z","updated_at":"2018-03-20T21:55:43Z","closed_at":null,"author_association":"NONE","body":"```\r\nCaused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 2\r\n\tat java.util.ArrayList.rangeCheck(ArrayList.java:657)\r\n\tat java.util.ArrayList.get(ArrayList.java:433)\r\n\tat org.jgrapht.util.FibonacciHeap.consolidate(FibonacciHeap.java:461)\r\n\tat org.jgrapht.util.FibonacciHeap.removeMin(FibonacciHeap.java:263)\r\n\tat org.jgrapht.traverse.ClosestFirstIterator.provideNextVertex(ClosestFirstIterator.java:252)\r\n\tat org.jgrapht.traverse.CrossComponentIterator.next(CrossComponentIterator.java:194)\r\n\tat CustomerCode.toGraphViz(CustomerCode.java:339)\r\n\tat org.anarres.graphviz.builder.GraphVizUtils.toGraphVizGraph(GraphVizUtils.java:57)\r\n\tat org.anarres.graphviz.builder.GraphVizUtils.toGraphVizFile(GraphVizUtils.java:69)\r\n```\r\n\r\nI don't even know where to start on this, and today isn't a good day for me to debug it. As far as I can tell, CustomerCode contains a correct usage of ClosestFirstIterator. The line is:\r\n```\r\nClosestFirstIterator<> it = new ClosestFirstIterator<>(graph, initset, 3);\r\nwhile (it.hasNext()) {\r\n    N node = it.next(); // This threw.\r\n    // ...\r\n}\r\n```\r\n\r\nThe graph isn't abnormally large or anything.\r\n\r\njgrapht 1.1.0 from Maven Central."},"comment":{"url":"https://api.github.com/repos/jgrapht/jgrapht/issues/comments/374770733","html_url":"https://github.com/jgrapht/jgrapht/issues/518#issuecomment-374770733","issue_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/518","id":374770733,"user":{"login":"shevek","id":391350,"avatar_url":"https://avatars3.githubusercontent.com/u/391350?v=4","gravatar_id":"","url":"https://api.github.com/users/shevek","html_url":"https://github.com/shevek","followers_url":"https://api.github.com/users/shevek/followers","following_url":"https://api.github.com/users/shevek/following{/other_user}","gists_url":"https://api.github.com/users/shevek/gists{/gist_id}","starred_url":"https://api.github.com/users/shevek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shevek/subscriptions","organizations_url":"https://api.github.com/users/shevek/orgs","repos_url":"https://api.github.com/users/shevek/repos","events_url":"https://api.github.com/users/shevek/events{/privacy}","received_events_url":"https://api.github.com/users/shevek/received_events","type":"User","site_admin":false},"created_at":"2018-03-20T21:55:43Z","updated_at":"2018-03-20T21:55:43Z","author_association":"NONE","body":"Yes, we're looking to go outwards from a point, in a manner equivalent to iterating using BFS from a putative root. What happens is:\r\n\r\n* Start from a root node.\r\n* Manually iterate from the root node at a high level of detail.\r\n* When you hit a threshold N, hand the current boundary-set to ClosestFirstIterator and keep iterating at low detail.\r\n\r\nLooking at BFS now, that's less than useful for our purposes. I'll re-cast our algorithm again.\r\n\r\nI'm sorry the test was so huge, that was after significant reduction!"}}
{"actor":{"display_login":"shevek"}}