{"action":"closed","issue":{"url":"https://api.github.com/repos/cjlin1/libsvm/issues/18","labels_url":"https://api.github.com/repos/cjlin1/libsvm/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/cjlin1/libsvm/issues/18/comments","events_url":"https://api.github.com/repos/cjlin1/libsvm/issues/18/events","html_url":"https://github.com/cjlin1/libsvm/issues/18","id":50650559,"number":18,"title":"ArrayOutOfBoundException in java v3.2","user":{"login":"TKlerx","id":1579185,"avatar_url":"https://avatars.githubusercontent.com/u/1579185?v=3","gravatar_id":"","url":"https://api.github.com/users/TKlerx","html_url":"https://github.com/TKlerx","followers_url":"https://api.github.com/users/TKlerx/followers","following_url":"https://api.github.com/users/TKlerx/following{/other_user}","gists_url":"https://api.github.com/users/TKlerx/gists{/gist_id}","starred_url":"https://api.github.com/users/TKlerx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TKlerx/subscriptions","organizations_url":"https://api.github.com/users/TKlerx/orgs","repos_url":"https://api.github.com/users/TKlerx/repos","events_url":"https://api.github.com/users/TKlerx/events{/privacy}","received_events_url":"https://api.github.com/users/TKlerx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-02T13:30:00Z","updated_at":"2015-07-10T06:45:45Z","closed_at":"2015-07-10T06:45:45Z","body":"I have encountered an ArrayOutOfBoundException in version 3.2, that does not exist in v2.8.\r\nHere is the stacktrace:\r\nException in thread \"main\" java.lang.ArrayIndexOutOfBoundsException: -1\r\n\tat libsvm.Cache.get_data(svm.java:63)\r\n\tat libsvm.ONE_CLASS_Q.get_Q(svm.java:1208)\r\n\tat libsvm.Solver.Solve(svm.java:496)\r\n\tat libsvm.svm.solve_one_class(svm.java:1422)\r\n\tat libsvm.svm.svm_train_one(svm.java:1516)\r\n\tat libsvm.svm.svm_train(svm.java:1959)\r\n\tat LibSvmBug.svmTrain(LibSvmBug.java:95)\r\n\tat LibSvmBug.train(LibSvmBug.java:59)\r\n\tat LibSvmBug.main(LibSvmBug.java:38)\r\n\r\nIn v2.8 the output is the following:\r\n*\r\noptimization finished, #iter = 0\r\nobj = NaN, rho = Infinity\r\nnSV = 246, nBSV = 245\r\n\r\nI made a sample class. Run bug.sh and working.sh which can be found here:\r\nhttps://www.dropbox.com/s/gnx9a9n1293spz4/LibSvmBug.tar.gz?dl=0\r\n\r\nWith version 2.8 you will get no exception, but with version 3.2 you will get an ArrayOutOfBoundException\r\n(Please do not care about the strange parameter choices)\r\n\r\nI also tested some other versions. The bug also occurs in v. 2.81, 2.88, 2.91, 3.00, \r\n\r\nEdit: Running java version \"1.7.0_65\"\r\nOpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)\r\nOpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)\r\n(Same exception on Oracle VM on Ubuntu)\r\n\r\nJust verified this on Windows 8 using jre7 and starting from eclipse.\r\n"}}