{"action":"created","issue":{"url":"https://api.github.com/repos/oorb/oorb/issues/12","labels_url":"https://api.github.com/repos/oorb/oorb/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/oorb/oorb/issues/12/comments","events_url":"https://api.github.com/repos/oorb/oorb/issues/12/events","html_url":"https://github.com/oorb/oorb/issues/12","id":112225217,"number":12,"title":"oorb does not run if compiled with gfortran 5.x","user":{"login":"rhiannonlynne","id":1855711,"avatar_url":"https://avatars.githubusercontent.com/u/1855711?v=3","gravatar_id":"","url":"https://api.github.com/users/rhiannonlynne","html_url":"https://github.com/rhiannonlynne","followers_url":"https://api.github.com/users/rhiannonlynne/followers","following_url":"https://api.github.com/users/rhiannonlynne/following{/other_user}","gists_url":"https://api.github.com/users/rhiannonlynne/gists{/gist_id}","starred_url":"https://api.github.com/users/rhiannonlynne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhiannonlynne/subscriptions","organizations_url":"https://api.github.com/users/rhiannonlynne/orgs","repos_url":"https://api.github.com/users/rhiannonlynne/repos","events_url":"https://api.github.com/users/rhiannonlynne/events{/privacy}","received_events_url":"https://api.github.com/users/rhiannonlynne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-19T20:23:51Z","updated_at":"2015-10-20T19:50:48Z","closed_at":null,"body":"OOrb compiles and runs as expected with gfortran 4.9. \r\nHowever, newer compilers (gfortran 5 or newer) produce the following error at runtime: \r\n\r\n[D-108-179-173-36:~/lsstRepos/oorb/python] lynnej% ../main/oorb --code=807 --task=ephemeris --orb-in=test_orbits.des --timespan=1 --step=1 --conf=../main/oorb.conf\r\noorb(13219,0x7fff7653b300) malloc: *** error for object 0x2: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\n\r\nProgram received signal SIGABRT: Process abort signal.\r\n\r\nBacktrace for this error:\r\n#0  0x1006621d2\r\n#1  0x1006614f0\r\n#2  0x7fff8e581f19\r\n\r\n\r\n(note that oorb will appear to compile as expected, but will not generate ephemerides). "},"comment":{"url":"https://api.github.com/repos/oorb/oorb/issues/comments/149681814","html_url":"https://github.com/oorb/oorb/issues/12#issuecomment-149681814","issue_url":"https://api.github.com/repos/oorb/oorb/issues/12","id":149681814,"user":{"login":"Siltala","id":2873449,"avatar_url":"https://avatars.githubusercontent.com/u/2873449?v=3","gravatar_id":"","url":"https://api.github.com/users/Siltala","html_url":"https://github.com/Siltala","followers_url":"https://api.github.com/users/Siltala/followers","following_url":"https://api.github.com/users/Siltala/following{/other_user}","gists_url":"https://api.github.com/users/Siltala/gists{/gist_id}","starred_url":"https://api.github.com/users/Siltala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Siltala/subscriptions","organizations_url":"https://api.github.com/users/Siltala/orgs","repos_url":"https://api.github.com/users/Siltala/repos","events_url":"https://api.github.com/users/Siltala/events{/privacy}","received_events_url":"https://api.github.com/users/Siltala/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T19:50:48Z","updated_at":"2015-10-20T19:50:48Z","body":"Hello,\r\n\r\nI tested this and can reproduce the bug. Though my error message isn't exactly the same, --task=ephemeris also fails for me when compiled with gfortran 5.1. On that note, ranging and lsl both fail also while they all work on an earlier gfortran version.\r\n\r\nI think I also figured out the problem, and managed to fix ephemeris, ranging and lsl on my end. Can you please test my fork ( https://github.com/Siltala/oorb ) to see if it works for you as well? Note that at this point, my fixes are just quick hacks and at this point it might not be a good idea to use my fork for any serious work beyond testing if it works, though I can't personally see any major problems arising from my fix. I'll discuss the problem and how to fix it with Mikael later this week. (I am a student of his, if you are curious.)\r\n\r\nWhat seems to be happening here is that the behavior of ASSOCIATED() appears to have changed in gfortran 5. In several parts of the code, oorb appears to use ASSOCIATED() to check if some variable exists, and if it does, oorb next deallocates it. Now, this works fine in older gfortran versions, but as far as I can tell, in gfortran 5 ASSOCIATED() returns true even if the variable doesn't exist. So, the code then tries to deallocate it anyway which leads to the crash.\r\n\r\nLauri\r\n\r\n"}}