{"action":"created","issue":{"url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/issues/226","repository_url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy","labels_url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/issues/226/comments","events_url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/issues/226/events","html_url":"https://github.com/AndrewAnnex/SpiceyPy/issues/226","id":268604860,"number":226,"title":"Test instability On Windows builds","user":{"login":"AndrewAnnex","id":2126916,"avatar_url":"https://avatars3.githubusercontent.com/u/2126916?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewAnnex","html_url":"https://github.com/AndrewAnnex","followers_url":"https://api.github.com/users/AndrewAnnex/followers","following_url":"https://api.github.com/users/AndrewAnnex/following{/other_user}","gists_url":"https://api.github.com/users/AndrewAnnex/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewAnnex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewAnnex/subscriptions","organizations_url":"https://api.github.com/users/AndrewAnnex/orgs","repos_url":"https://api.github.com/users/AndrewAnnex/repos","events_url":"https://api.github.com/users/AndrewAnnex/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewAnnex/received_events","type":"User","site_admin":false},"labels":[{"id":74802135,"url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/labels/bug","name":"bug","color":"fc2929","default":true},{"id":717147548,"url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/labels/help%20wanted","name":"help wanted","color":"aee283","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-26T01:57:14Z","updated_at":"2017-10-29T01:01:26Z","closed_at":"2017-10-27T03:35:15Z","author_association":"OWNER","body":"https://ci.appveyor.com/project/AndrewAnnex/spiceypy/build/1.1.707\r\n\r\nlooks like something strange is occurring with windows builds. \r\n\r\n```\r\n          epochs = stypes.toDoubleVector(epochs)\r\n>       libspice.spk14a_c(handle, ncsets, coeffs, epochs)\r\nE       WindowsError: exception: access violation reading 0x000000000367F000\r\nspiceypy\\spiceypy.py:11151: WindowsError\r\n_________________________________ test_spk14b _________________________________\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/issues/comments/340230131","html_url":"https://github.com/AndrewAnnex/SpiceyPy/issues/226#issuecomment-340230131","issue_url":"https://api.github.com/repos/AndrewAnnex/SpiceyPy/issues/226","id":340230131,"user":{"login":"drbitboy","id":1558679,"avatar_url":"https://avatars2.githubusercontent.com/u/1558679?v=4","gravatar_id":"","url":"https://api.github.com/users/drbitboy","html_url":"https://github.com/drbitboy","followers_url":"https://api.github.com/users/drbitboy/followers","following_url":"https://api.github.com/users/drbitboy/following{/other_user}","gists_url":"https://api.github.com/users/drbitboy/gists{/gist_id}","starred_url":"https://api.github.com/users/drbitboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drbitboy/subscriptions","organizations_url":"https://api.github.com/users/drbitboy/orgs","repos_url":"https://api.github.com/users/drbitboy/repos","events_url":"https://api.github.com/users/drbitboy/events{/privacy}","received_events_url":"https://api.github.com/users/drbitboy/received_events","type":"User","site_admin":false},"created_at":"2017-10-29T01:01:26Z","updated_at":"2017-10-29T01:01:26Z","author_association":"CONTRIBUTOR","body":"Not confusing if we think like a CPU (or a compiler).\r\n\r\n1) spice.spk14a_c starts reading from wherever it is told by the ctypes-generated coeffs pointer, but it reads past the end of the coeffs array we provide because ncsets and chbdeg tell spk14b_c that the array is bigger than the coeffs we gave to ctypes.  If the memory **_after the ctypes-allocated coeffs array_** is readable, no matter what non-coefficient garbage is there, then spk14b_c reads it and there is no memory error.  If that memory is not readable, then spk14b_c throws the memory exception.  What ends up that memory after the passed coeffs array is a function of whatever time, other memory allocations, garbage collection, operating system state, etc., are current at the time of the call, so it makes sense that the result is inconsistent between runs.\r\n\r\n2) The ctypes-generated coeffs pointer is the only memory address passed, whether the memory after that is set up as a 2d or 1d array in the compiler does not matter:  it's a block of memory and only the [ncsets] (spk14a_c) and [2+(chbdeg+1)*6] (spk14b_c) values determine how that memory is interpreted.  I can all but guarantee that, for the cases where we are passing the short array but it works anyway by reading past the coeffs memory, if we did not remove the test14.bsp file, the I could parse that file and find all of those values that we did pass, plus the garbage values, just at the wrong locations after the first record.\r\n\r\nThe C language:  all the power of assembler, with all the convenience of assembler."}}
{"actor":{"display_login":"drbitboy"}}