{"action":"created","issue":{"url":"https://api.github.com/repos/leanovate/gopter/issues/2","repository_url":"https://api.github.com/repos/leanovate/gopter","labels_url":"https://api.github.com/repos/leanovate/gopter/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/leanovate/gopter/issues/2/comments","events_url":"https://api.github.com/repos/leanovate/gopter/issues/2/events","html_url":"https://github.com/leanovate/gopter/issues/2","id":147866750,"number":2,"title":"gen.PtrOf sometimes causes a panic","user":{"login":"exarkun","id":254565,"avatar_url":"https://avatars.githubusercontent.com/u/254565?v=3","gravatar_id":"","url":"https://api.github.com/users/exarkun","html_url":"https://github.com/exarkun","followers_url":"https://api.github.com/users/exarkun/followers","following_url":"https://api.github.com/users/exarkun/following{/other_user}","gists_url":"https://api.github.com/users/exarkun/gists{/gist_id}","starred_url":"https://api.github.com/users/exarkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exarkun/subscriptions","organizations_url":"https://api.github.com/users/exarkun/orgs","repos_url":"https://api.github.com/users/exarkun/repos","events_url":"https://api.github.com/users/exarkun/events{/privacy}","received_events_url":"https://api.github.com/users/exarkun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-12T20:39:53Z","updated_at":"2016-04-20T17:37:50Z","closed_at":"2016-04-15T06:37:39Z","body":"A test I wrote using PtrOf sometimes results in a panic like this:\r\n```\r\nParent ids not equal\r\n! fields round-trip: Error on property evaluation after 0 passed tests:\r\n   Check paniced: reflect: Call using zero Value argument goroutine 14\r\n   [running]:\r\nruntime/debug.Stack(0x0, 0x0, 0x0)\r\n        /usr/lib/go/src/runtime/debug/stack.go:24 +0x80\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.SaveProp.\r\n  func1.1(0xc8202a9ba8)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop.go:19 +0x53\r\npanic(0x79ffc0, 0xc8203daaf0)\r\n        /usr/lib/go/src/runtime/panic.go:426 +0x4e9\r\nreflect.Value.call(0x8311a0, 0xc8203da2d0, 0x13, 0x8e40c8, 0x4,\r\n   0xc820395f90, 0x3, 0x3, 0x0, 0x0, ...)\r\n        /usr/lib/go/src/reflect/value.go:367 +0x48b\r\nreflect.Value.Call(0x8311a0, 0xc8203da2d0, 0x13, 0xc820395f90, 0x3, 0x3,\r\n   0x0, 0x0, 0x0)\r\n        /usr/lib/go/src/reflect/value.go:303 +0xb1\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter/prop.chec\r\n  kConditionFunc.func2(0xc8203b2900, 0x3, 0x3, 0x3)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop/check_condition_func.go:45 +0x1db\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter/prop.ForA\r\n  ll.func1.1(0x0, 0x0, 0x86a401)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop/forall.go:51 +0x112\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter/prop.firs\r\n  tFailure(0xc8203cea80, 0xc8202a9b40, 0xc8203cea80, 0x0, 0x0)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop/forall.go:104 +0x5f\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter/prop.shri\r\n  nkValue(0x3e8, 0xc820395e00, 0x778480, 0xc8203da7e0, 0xc820395f40,\r\n   0xc8202a9b40, 0xc820395f40, 0x0, 0x0)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop/forall.go:88 +0xb5\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter/prop.ForA\r\n  ll.func1(0xc8203edc00, 0x9b53c8)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop/forall.go:52 +0x53d\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.SaveProp.\r\n  func1(0xc8203edc00, 0x0)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop.go:24 +0x68\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.Prop.Chec\r\n  k.func1(0x0, 0xc8203da360, 0xd44b20)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop.go:51 +0x19e\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.(*runner)\r\n  .runWorkers(0xc8203b25a0, 0x0)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/runner.go:45 +0x102\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.Prop.Chec\r\n  k(0xc8203da340, 0xc8201f4140, 0x938f20)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/prop.go:106 +0x1c2\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.(*Propert\r\n  ies).Run(0xc8203b2480, 0x7ff522cf6968, 0xc8203ed860, 0x45085e)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/properties.go:35 +0xe7\r\ngithub.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gopter.(*Propert\r\n  ies).TestingRun(0xc8203b2480, 0xc8200845a0)\r\n        /golang/src/github.com/ClusterHQ/dataplane/vendor/github.com/leanovate/gop\r\n  ter/properties.go:46 +0x119\r\ngithub.com/ClusterHQ/dataplane/dataset.TestAddSnapshot(0xc8200845a0)\r\n        /golang/src/github.com/ClusterHQ/dataplane/dataset/dataset_test.go:409\r\n   +0x295\r\ntesting.tRunner(0xc8200845a0, 0xd2da98)\r\n```\r\n\r\nI think I minimized the test case that provokes this behavior.  You can see it at https://github.com/leanovate/gopter/compare/master...ClusterHQ:call-using-zero-value-argument\r\n\r\nI wasn't quite sure where to put this test or even if it's a real problem I've found or just a mis-use of PtrOf.  Finishing up for today, will probably look more tomorrow, thought I'd see if you had any thoughts on the issue.\r\n"},"comment":{"url":"https://api.github.com/repos/leanovate/gopter/issues/comments/212529348","html_url":"https://github.com/leanovate/gopter/issues/2#issuecomment-212529348","issue_url":"https://api.github.com/repos/leanovate/gopter/issues/2","id":212529348,"user":{"login":"exarkun","id":254565,"avatar_url":"https://avatars.githubusercontent.com/u/254565?v=3","gravatar_id":"","url":"https://api.github.com/users/exarkun","html_url":"https://github.com/exarkun","followers_url":"https://api.github.com/users/exarkun/followers","following_url":"https://api.github.com/users/exarkun/following{/other_user}","gists_url":"https://api.github.com/users/exarkun/gists{/gist_id}","starred_url":"https://api.github.com/users/exarkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exarkun/subscriptions","organizations_url":"https://api.github.com/users/exarkun/orgs","repos_url":"https://api.github.com/users/exarkun/repos","events_url":"https://api.github.com/users/exarkun/events{/privacy}","received_events_url":"https://api.github.com/users/exarkun/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T17:37:50Z","updated_at":"2016-04-20T17:37:50Z","body":"Thanks!  This  working for me now."}}