{"action":"opened","issue":{"url":"https://api.github.com/repos/erdc-cm/proteus/issues/214","labels_url":"https://api.github.com/repos/erdc-cm/proteus/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/erdc-cm/proteus/issues/214/comments","events_url":"https://api.github.com/repos/erdc-cm/proteus/issues/214/events","html_url":"https://github.com/erdc-cm/proteus/issues/214","id":57165264,"number":214,"title":"Proc=None causes profiling to go into infinite loop","user":{"login":"robertsawko","id":773606,"avatar_url":"https://avatars.githubusercontent.com/u/773606?v=3","gravatar_id":"","url":"https://api.github.com/users/robertsawko","html_url":"https://github.com/robertsawko","followers_url":"https://api.github.com/users/robertsawko/followers","following_url":"https://api.github.com/users/robertsawko/following{/other_user}","gists_url":"https://api.github.com/users/robertsawko/gists{/gist_id}","starred_url":"https://api.github.com/users/robertsawko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertsawko/subscriptions","organizations_url":"https://api.github.com/users/robertsawko/orgs","repos_url":"https://api.github.com/users/robertsawko/repos","events_url":"https://api.github.com/users/robertsawko/events{/privacy}","received_events_url":"https://api.github.com/users/robertsawko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-10T11:56:45Z","updated_at":"2015-02-10T11:56:45Z","closed_at":null,"body":"I am not sure at what point that happened but suddenly my proteus run that use `import proteus.iproteus *` freeze. It turns out that they go into an infinite loop whilst handling `preInitBuffer`. After closer inspection I realized that this is the problem is in `Profiling.py`:\r\n\r\n```python\r\ndef openLog(filename,level,logLocation=None):\r\n    ....\r\n    for string,level,data in preInitBuffer:\r\n        logEvent(string,level,data)\r\n\r\n...\r\ndef logEvent(stringIn, level=1, data=None):\r\n...\r\n    elif procID==None:\r\n        preInitBuffer.append((stringIn,level,data))\r\n```\r\nSo assuming `preInitBuffer` was not empty it gets bigger and bigger. In my case it starts with `NO PROTEUS_PRELOAD_LIBS LOADED; CHECK config.py`. Also before my `procID` was equal to 0 and now it's 'None' which causes the other if to activate. I was looking around for a while, but couldn't understand the difference so I temporarily commented out the append line. I am afraid of side effects though. Could you please look at it, too?\r\n"}}