{"action":"created","issue":{"url":"https://api.github.com/repos/k3po/k3po/issues/142","labels_url":"https://api.github.com/repos/k3po/k3po/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/k3po/k3po/issues/142/comments","events_url":"https://api.github.com/repos/k3po/k3po/issues/142/events","html_url":"https://github.com/k3po/k3po/issues/142","id":60399106,"number":142,"title":"Read/Write parameters causing NPE when write is requesting value that has already been read.","user":{"login":"dpwspoon","id":2014623,"avatar_url":"https://avatars.githubusercontent.com/u/2014623?v=3","gravatar_id":"","url":"https://api.github.com/users/dpwspoon","html_url":"https://github.com/dpwspoon","followers_url":"https://api.github.com/users/dpwspoon/followers","following_url":"https://api.github.com/users/dpwspoon/following{/other_user}","gists_url":"https://api.github.com/users/dpwspoon/gists{/gist_id}","starred_url":"https://api.github.com/users/dpwspoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpwspoon/subscriptions","organizations_url":"https://api.github.com/users/dpwspoon/orgs","repos_url":"https://api.github.com/users/dpwspoon/repos","events_url":"https://api.github.com/users/dpwspoon/events{/privacy}","received_events_url":"https://api.github.com/users/dpwspoon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-09T19:48:28Z","updated_at":"2015-03-09T19:53:11Z","closed_at":null,"body":"This is probably a Threading race and is causing kaazing/gateway#41."},"comment":{"url":"https://api.github.com/repos/k3po/k3po/issues/comments/77928693","html_url":"https://github.com/k3po/k3po/issues/142#issuecomment-77928693","issue_url":"https://api.github.com/repos/k3po/k3po/issues/142","id":77928693,"user":{"login":"dpwspoon","id":2014623,"avatar_url":"https://avatars.githubusercontent.com/u/2014623?v=3","gravatar_id":"","url":"https://api.github.com/users/dpwspoon","html_url":"https://github.com/dpwspoon","followers_url":"https://api.github.com/users/dpwspoon/followers","following_url":"https://api.github.com/users/dpwspoon/following{/other_user}","gists_url":"https://api.github.com/users/dpwspoon/gists{/gist_id}","starred_url":"https://api.github.com/users/dpwspoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpwspoon/subscriptions","organizations_url":"https://api.github.com/users/dpwspoon/orgs","repos_url":"https://api.github.com/users/dpwspoon/repos","events_url":"https://api.github.com/users/dpwspoon/events{/privacy}","received_events_url":"https://api.github.com/users/dpwspoon/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T19:53:11Z","updated_at":"2015-03-09T19:53:11Z","body":"Stack trace of NPE is below.  There are write notify barriers and then read await barriers before the access that is causing the problem.\r\nex\r\n\r\n```\r\n# in accept #1\r\nread /(?<up>.*)/\r\nread notify GO\r\n# in accept stream #2\r\nwrite await GO\r\nwrite ${up}\r\n```\r\n\r\nSo we could sync everything on the barriers\r\n\r\nStack trace\r\n```\r\njava.lang.NullPointerException\r\n\tat org.kaazing.k3po.lang.el.ByteArrayTypeConverter.coerceToByteArray(ByteArrayTypeConverter.java:74)\r\n\tat org.kaazing.k3po.lang.el.ByteArrayTypeConverter.convert(ByteArrayTypeConverter.java:37)\r\n\tat de.odysseus.el.tree.Bindings.convert(Bindings.java:138)\r\n\tat de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:33)\r\n\tat de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122)\r\n\tat org.kaazing.k3po.driver.behavior.handler.codec.WriteExpressionEncoder.encode(WriteExpressionEncoder.java:45)\r\n\tat org.kaazing.k3po.driver.behavior.handler.command.WriteHandler.invokeCommand(WriteHandler.java:52)\r\n\tat org.kaazing.k3po.driver.behavior.handler.command.AbstractCommandHandler$1.operationComplete(AbstractCommandHandler.java:48)\r\n\tat org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)\r\n\tat org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:413)\r\n\tat org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:362)\r\n\tat org.kaazing.k3po.driver.netty.channel.CompositeChannelFuture$NotifyingListener.operationComplete(CompositeChannelFuture.java:204)\r\n\tat org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)\r\n\tat org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:418)\r\n\tat org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:362)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:220)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromTaskLoop(AbstractNioWorker.java:151)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioChannel$WriteTask.run(AbstractNioChannel.java:335)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)\r\n\tat org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n[DEBUG] [id: 0xd2df8113] close\r\n[DEBUG] channel disconnected\r\n```"}}