{"action":"created","issue":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/297","repository_url":"https://api.github.com/repos/bytedeco/javacpp-presets","labels_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/297/comments","events_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/297/events","html_url":"https://github.com/bytedeco/javacpp-presets/pull/297","id":180336106,"number":297,"title":"Android support for TensorFlow presets","user":{"login":"andreas-eberle","id":9267365,"avatar_url":"https://avatars.githubusercontent.com/u/9267365?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-eberle","html_url":"https://github.com/andreas-eberle","followers_url":"https://api.github.com/users/andreas-eberle/followers","following_url":"https://api.github.com/users/andreas-eberle/following{/other_user}","gists_url":"https://api.github.com/users/andreas-eberle/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-eberle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-eberle/subscriptions","organizations_url":"https://api.github.com/users/andreas-eberle/orgs","repos_url":"https://api.github.com/users/andreas-eberle/repos","events_url":"https://api.github.com/users/andreas-eberle/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-eberle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":33,"created_at":"2016-09-30T15:41:29Z","updated_at":"2016-10-11T13:41:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/pulls/297","html_url":"https://github.com/bytedeco/javacpp-presets/pull/297","diff_url":"https://github.com/bytedeco/javacpp-presets/pull/297.diff","patch_url":"https://github.com/bytedeco/javacpp-presets/pull/297.patch"},"body":"This PR is not complete yet. However, as I need some support I open this for the discussion. My problems are the following:\r\n\r\n* The android patch file contains the hard coded android ndk path for my machine. How can I make this dynamic? I cannot patch in an environment variable because bazel does not understand that.\r\n* The cppbuild.sh works when I run it for android-arm. However, when I run the mvn build for android-arm, the generated tensorflow.java file is empty and the library is not packaged into the installed dependency. Nevertheless, the maven build is still shown as a success. \r\n\r\nHow can I fix these problems?"},"comment":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/comments/252919831","html_url":"https://github.com/bytedeco/javacpp-presets/pull/297#issuecomment-252919831","issue_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/297","id":252919831,"user":{"login":"andreas-eberle","id":9267365,"avatar_url":"https://avatars.githubusercontent.com/u/9267365?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-eberle","html_url":"https://github.com/andreas-eberle","followers_url":"https://api.github.com/users/andreas-eberle/followers","following_url":"https://api.github.com/users/andreas-eberle/following{/other_user}","gists_url":"https://api.github.com/users/andreas-eberle/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-eberle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-eberle/subscriptions","organizations_url":"https://api.github.com/users/andreas-eberle/orgs","repos_url":"https://api.github.com/users/andreas-eberle/repos","events_url":"https://api.github.com/users/andreas-eberle/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-eberle/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T13:41:55Z","updated_at":"2016-10-11T13:41:55Z","body":"Thanks. The debugging output helped me to find the pointer that was cleaned up to early. The solution is that you have to keep a reference to the SessionOptions object. This is because tensorflow's session internally keeps a reference to the SessionOptions. But if you do not keep a reference in Java, JavaCPP does deallocate the SessionOptions object which then leads to a SegFault when running the Session the next time.\r\n\r\nWould it be an option for you to keep the SessionOption object as a field in the AbstractSession class in the `helper/tensorflow.java` file?"}}
{"actor":{"display_login":"andreas-eberle"}}