{"action":"closed","issue":{"url":"https://api.github.com/repos/EsotericSoftware/kryo/issues/613","repository_url":"https://api.github.com/repos/EsotericSoftware/kryo","labels_url":"https://api.github.com/repos/EsotericSoftware/kryo/issues/613/labels{/name}","comments_url":"https://api.github.com/repos/EsotericSoftware/kryo/issues/613/comments","events_url":"https://api.github.com/repos/EsotericSoftware/kryo/issues/613/events","html_url":"https://github.com/EsotericSoftware/kryo/issues/613","id":344954166,"node_id":"MDU6SXNzdWUzNDQ5NTQxNjY=","number":613,"title":"ArrayIndexOutOfBoundsException during serialization","user":{"login":"marianadangelo","id":3846758,"node_id":"MDQ6VXNlcjM4NDY3NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3846758?v=4","gravatar_id":"","url":"https://api.github.com/users/marianadangelo","html_url":"https://github.com/marianadangelo","followers_url":"https://api.github.com/users/marianadangelo/followers","following_url":"https://api.github.com/users/marianadangelo/following{/other_user}","gists_url":"https://api.github.com/users/marianadangelo/gists{/gist_id}","starred_url":"https://api.github.com/users/marianadangelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marianadangelo/subscriptions","organizations_url":"https://api.github.com/users/marianadangelo/orgs","repos_url":"https://api.github.com/users/marianadangelo/repos","events_url":"https://api.github.com/users/marianadangelo/events{/privacy}","received_events_url":"https://api.github.com/users/marianadangelo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-26T18:22:55Z","updated_at":"2018-07-30T22:45:23Z","closed_at":"2018-07-30T22:45:23Z","author_association":"NONE","body":"I'm trying to serialize an object from the Soot program analysis framework, but I'm getting an array index out of bounds exception during serialization. I've added a link to the relevant documentation and GitHub repository, plus the error output and the small sample code triggering the error. Didn't spot any duplicate issues, apologies if there is one. \r\n\r\ndocumentation: https://www.sable.mcgill.ca/soot/doc/soot/Unit.html \r\nsource code: https://github.com/Sable/soot/blob/develop/src/main/java/soot/Unit.java\r\n\r\nerror: \r\n[errortrace.txt](https://github.com/EsotericSoftware/kryo/files/2233108/errortrace.txt)\r\n\r\ncode snippet:\r\n\r\n```import soot.Unit;\r\nimport com.esotericsoftware.kryo.Kryo;\r\nimport com.esotericsoftware.kryo.io.ByteBufferOutput;\r\nimport com.esotericsoftware.kryo.io.Input;\r\nimport com.esotericsoftware.kryo.io.Output;\r\n\r\n  private byte[] serialize(Unit unit) {\r\n        Kryo kryo = new Kryo();\r\n        kryo.setRegistrationRequired(false);`\r\n\r\n        Output output = new ByteBufferOutput(100, -1);\r\n        kryo.writeObject(output, unit);\r\n        output.close();\r\n        return output.toBytes();\r\n    }\r\n\r\n    private Unit deserialize(byte[] bytes) {\r\n        Kryo kryo = new Kryo();\r\n        kryo.setRegistrationRequired(false);\r\n\r\n        Input input = new Input(bytes);\r\n        Unit unit = kryo.readObject(input, Unit.class);\r\n        input.close();   \r\n        return unit;\r\n    }\r\n\r\n    private void serializationTest(Unit srcUnit) {\r\n        System.out.println(\"Original stmt: \" + srcUnit.toString());\r\n        byte[] serializedStmt = serialize(srcUnit); // fails during this\r\n        Unit deserializedStmt = deserialize(serializedStmt);\r\n        System.out.println(\"Deserialized stmt: \" + deserializedStmt.toString());\r\n    }\r\n```"}}
{"actor":{"display_login":"NathanSweet"}}