{"action":"closed","issue":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/573","repository_url":"https://api.github.com/repos/mlpack/mlpack","labels_url":"https://api.github.com/repos/mlpack/mlpack/issues/573/labels{/name}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/573/comments","events_url":"https://api.github.com/repos/mlpack/mlpack/issues/573/events","html_url":"https://github.com/mlpack/mlpack/issues/573","id":140752048,"number":573,"title":"AllkNNTest failing in 3 test cases","user":{"login":"uzipaz","id":8648282,"avatar_url":"https://avatars.githubusercontent.com/u/8648282?v=3","gravatar_id":"","url":"https://api.github.com/users/uzipaz","html_url":"https://github.com/uzipaz","followers_url":"https://api.github.com/users/uzipaz/followers","following_url":"https://api.github.com/users/uzipaz/following{/other_user}","gists_url":"https://api.github.com/users/uzipaz/gists{/gist_id}","starred_url":"https://api.github.com/users/uzipaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uzipaz/subscriptions","organizations_url":"https://api.github.com/users/uzipaz/orgs","repos_url":"https://api.github.com/users/uzipaz/repos","events_url":"https://api.github.com/users/uzipaz/events{/privacy}","received_events_url":"https://api.github.com/users/uzipaz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-14T18:03:42Z","updated_at":"2016-03-14T18:49:20Z","closed_at":"2016-03-14T18:49:20Z","body":"I recently installed mlpack and tried running some test programs from source such as allknn_test.cpp by running mlpack_test -t AllkNNTest and this the output I got:\r\nRunning 21 test cases...\r\nmlpack_test: /home/ozair/programming/mlpack/src/mlpack/../mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp:882: bool mlpack::tree::RectangleTree<MetricType, StatisticType, MatType, SplitType, DescentType>::ShrinkBoundForPoint(const vec&) [with MetricType = mlpack::metric::LMetric<2, true>; StatisticType = mlpack::neighbor::NeighborSearchStat<mlpack::neighbor::NearestNeighborSort>; MatType = arma::Mat<double>; SplitType = mlpack::tree::RStarTreeSplit; DescentType = mlpack::tree::RStarTreeDescentHeuristic; arma::vec = arma::Col<double>]: Assertion `false' failed.\r\nunknown location(0): fatal error in \"KNNModelTest\": signal: SIGABRT (application abort requested)\r\n/home/ozair/programming/mlpack/src/mlpack/tests/allknn_test.cpp(1027): last checkpoint\r\nunknown location(0): fatal error in \"KNNModelMonochromaticTest\": std::runtime_error: Timer::Start(): timer 'tree_building' has already been started\r\n/home/ozair/programming/mlpack/src/mlpack/tests/allknn_test.cpp(1027): last checkpoint\r\nunknown location(0): fatal error in \"NeighborPtrDeleteTest\": std::runtime_error: Timer::Start(): timer 'tree_building' has already been started\r\n/home/ozair/programming/mlpack/src/mlpack/tests/allknn_test.cpp(1115): last checkpoint\r\n\r\n*** 3 failures detected in test suite \"mlpackTest\"\r\n\r\nIt seems that the test is failing on three test cases:\r\nKNNModelTest\r\nKNNModelMonochromaticTest\r\nNeighborPtrDeleteTest\r\n\r\nIt seems like there is assertion failure at line 882 when allocating a RectangleTree object. Also, in source file allknn_test.cpp, in BOOST_AUTO_TEST_CASE(KNNModelMonochromaticTest), we are declaring an array of type KNNModel, at line 1052, while assigning a new kNNModel object at the highest index of the array, the code at the line references to models[0] instead of models[9], Hence, at the inner loop where the program is accessing the models array at i = 9, I think this will cause a memory exception because the object at this location was not assigned. But, I've yet to rebuild the program and test it out for myself yet.\r\n\r\nRegards.\r\n"}}