{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/315","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/315/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/315/events","html_url":"https://github.com/chrsmith/bwapi/issues/315","id":58674812,"number":315,"title":"Problem with iterating over Broodwar->getEvents()","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Component-Logic","name":"Component-Logic","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-High","name":"Priority-High","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Defect","name":"Type-Defect","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Usability","name":"Usability","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-24T00:34:05Z","updated_at":"2015-02-24T00:34:06Z","closed_at":"2015-02-24T00:34:05Z","body":"```\nstd::list<Event> events = Broodwar->getEvents();\n\nfor(std::list<Event>::iterator e = events.begin(); e != events.end(); ++e)\n{\n\tEventType::Enum et = e->type;\n\nWhat steps will reproduce the problem?\n1. Use official BWAPI 3.3 (debug)\n2. Compile a ClientAI (e.g. AIModuleLoader) in Debug and debug it\n\nWhat is the expected output? What do you see instead?\nAn assertion error from vc++ sayint the list iterator is not incrementable.\n\nPlease provide any additional information below.\nThe problem is fixed by first copying the list returned by getEvents() and \niterating over it. \n\nIs this a BWAPI problem or is VC++ wrong here?\n\n\n\n```\n\n-----\nOriginal issue reported on code.google.com by `tren...@gmail.com` on 25 Nov 2010 at 3:36"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75673846","html_url":"https://github.com/chrsmith/bwapi/issues/315#issuecomment-75673846","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/315","id":75673846,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T00:34:06Z","updated_at":"2015-02-24T00:34:06Z","body":"```\nOk, I don't know if this is a problem in BWAPI or what but my attached project \nreproduces the problem for me every time. A VC++ assert pops up at the for loop \n(look at main.cpp where the working and non working parts are between \npreprocessor directives)\n\nI also tried the ExampleAIClient and that works without problems so I have no \nclue where the problem really comes from.\n```\n\n-----\nOriginal comment by `tren...@gmail.com` on 25 Nov 2010 at 6:55\n\nAttachments:\n* [Test.zip](https://storage.googleapis.com/google-code-attachments/bwapi/issue-315/comment-5/Test.zip)\n"}}