{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/4080","repository_url":"https://api.github.com/repos/jruby/jruby","labels_url":"https://api.github.com/repos/jruby/jruby/issues/4080/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/4080/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/4080/events","html_url":"https://github.com/jruby/jruby/issues/4080","id":171446695,"number":4080,"title":"Null value getting into packed array","user":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jruby/jruby/labels/core","name":"core","color":"02e10c"},{"url":"https://api.github.com/repos/jruby/jruby/labels/JRuby%209000","name":"JRuby 9000","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jruby/jruby/milestones/54","html_url":"https://github.com/jruby/jruby/milestones/JRuby%209.1.3.0","labels_url":"https://api.github.com/repos/jruby/jruby/milestones/54/labels","id":1777472,"number":54,"title":"JRuby 9.1.3.0","description":"","creator":{"login":"enebo","id":19819,"avatar_url":"https://avatars.githubusercontent.com/u/19819?v=3","gravatar_id":"","url":"https://api.github.com/users/enebo","html_url":"https://github.com/enebo","followers_url":"https://api.github.com/users/enebo/followers","following_url":"https://api.github.com/users/enebo/following{/other_user}","gists_url":"https://api.github.com/users/enebo/gists{/gist_id}","starred_url":"https://api.github.com/users/enebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enebo/subscriptions","organizations_url":"https://api.github.com/users/enebo/orgs","repos_url":"https://api.github.com/users/enebo/repos","events_url":"https://api.github.com/users/enebo/events{/privacy}","received_events_url":"https://api.github.com/users/enebo/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":69,"state":"open","created_at":"2016-05-19T19:37:59Z","updated_at":"2016-08-17T15:23:42Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-08-16T15:36:28Z","updated_at":"2016-08-17T19:09:22Z","closed_at":null,"body":"As @donv reported on #4020, there's a null getting into activerecord-jdbc. Here's the reproduction steps with Rails 4.2:\r\n\r\n```\r\nrails new -d postgresql rails_pg_npe\r\ncd rails_pg_npe\r\nrake db:create db:migrate\r\n```\r\n\r\nThe final db:migrate blows up because of the null.\r\n\r\nHere's the trace on my system:\r\n\r\n```\r\n[] ~/projects/jruby/rails_pg_npe $ JRUBY_OPTS=-Xjit.threshold=0 rake db:migrate\r\n[[nil, \"schema_migrations\"]]\r\n[[nil, \"schema_migrations\"]]\r\n/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/rake-11.2.2/lib/rake/task.rb:197: warning: singleton on non-persistent Java type Java::JavaLang::NullPointerException (http://wiki.jruby.org/Persistence)\r\nrake aborted!\r\nJava::JavaLang::NullPointerException: \r\narjdbc.jdbc.RubyJdbcConnection.isAr42(RubyJdbcConnection.java:3167)\r\narjdbc.jdbc.RubyJdbcConnection.setStatementParameter(RubyJdbcConnection.java:2172)\r\narjdbc.jdbc.RubyJdbcConnection.setStatementParameters(RubyJdbcConnection.java:2162)\r\narjdbc.jdbc.RubyJdbcConnection$8.call(RubyJdbcConnection.java:855)\r\narjdbc.jdbc.RubyJdbcConnection$8.call(RubyJdbcConnection.java:840)\r\narjdbc.jdbc.RubyJdbcConnection.withConnection(RubyJdbcConnection.java:3486)\r\narjdbc.jdbc.RubyJdbcConnection.withConnection(RubyJdbcConnection.java:3467)\r\narjdbc.jdbc.RubyJdbcConnection.doExecuteQueryRaw(RubyJdbcConnection.java:840)\r\narjdbc.jdbc.RubyJdbcConnection.executePreparedQueryRaw(RubyJdbcConnection.java:835)\r\narjdbc.jdbc.RubyJdbcConnection.execute_query_raw(RubyJdbcConnection.java:815)\r\narjdbc.jdbc.RubyJdbcConnection$INVOKER$i$execute_query_raw.call(RubyJdbcConnection$INVOKER$i$execute_query_raw.gen)\r\norg.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:209)\r\norg.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:205)\r\norg.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:358)\r\norg.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:195)\r\nUsers.headius.projects.jruby.lib.ruby.gems.shared.gems.activerecord_minus_jdbc_minus_adapter_minus_1_dot_3_dot_20.lib.arjdbc.postgresql.adapter.invokeOther19:execute_query_raw(/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/postgresql/adapter.rb:1340)\r\n```\r\n\r\nAnd it turns out the reproduction is simple:\r\n\r\n```\r\ndef foo(str)\r\n  blah = [[nil, str]]\r\nend\r\nblah = foo(\"hello\")\r\n```\r\n\r\nThe inner array constructed in this case is a packed two-element array with the first element null. It should never be null, so something's not right here."},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/240515384","html_url":"https://github.com/jruby/jruby/issues/4080#issuecomment-240515384","issue_url":"https://api.github.com/repos/jruby/jruby/issues/4080","id":240515384,"user":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T19:09:22Z","updated_at":"2016-08-17T19:09:22Z","body":"Ok @kares is off the hook...I bisected the NPE to some of my packed array changes. Investigating now!\r\n\r\n@kares Thanks for taking a look!"}}
{"actor":{"display_login":"headius"}}