{"action":"created","issue":{"url":"https://api.github.com/repos/NREL/EnergyPlus/issues/5112","labels_url":"https://api.github.com/repos/NREL/EnergyPlus/issues/5112/labels{/name}","comments_url":"https://api.github.com/repos/NREL/EnergyPlus/issues/5112/comments","events_url":"https://api.github.com/repos/NREL/EnergyPlus/issues/5112/events","html_url":"https://github.com/NREL/EnergyPlus/issues/5112","id":101487768,"number":5112,"title":"Array bounds error with Controller:MechanicalVentilation and no DesignSpecification:OutdoorAir objects","user":{"login":"mjwitte","id":4991075,"avatar_url":"https://avatars.githubusercontent.com/u/4991075?v=3","gravatar_id":"","url":"https://api.github.com/users/mjwitte","html_url":"https://github.com/mjwitte","followers_url":"https://api.github.com/users/mjwitte/followers","following_url":"https://api.github.com/users/mjwitte/following{/other_user}","gists_url":"https://api.github.com/users/mjwitte/gists{/gist_id}","starred_url":"https://api.github.com/users/mjwitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjwitte/subscriptions","organizations_url":"https://api.github.com/users/mjwitte/orgs","repos_url":"https://api.github.com/users/mjwitte/repos","events_url":"https://api.github.com/users/mjwitte/events{/privacy}","received_events_url":"https://api.github.com/users/mjwitte/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NREL/EnergyPlus/labels/EnergyPlus","name":"EnergyPlus","color":"c7def8"},{"url":"https://api.github.com/repos/NREL/EnergyPlus/labels/Priority","name":"Priority","color":"e11d21"},{"url":"https://api.github.com/repos/NREL/EnergyPlus/labels/S1%20-%20High","name":"S1 - High","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NREL/EnergyPlus/milestones/1","html_url":"https://github.com/NREL/EnergyPlus/milestones/EnergyPlus%208.4.0","labels_url":"https://api.github.com/repos/NREL/EnergyPlus/milestones/1/labels","id":1229491,"number":1,"title":"EnergyPlus 8.4.0","description":"Public release of EnergyPlus 8.4.0","creator":{"login":"Myoldmopar","id":849824,"avatar_url":"https://avatars.githubusercontent.com/u/849824?v=3","gravatar_id":"","url":"https://api.github.com/users/Myoldmopar","html_url":"https://github.com/Myoldmopar","followers_url":"https://api.github.com/users/Myoldmopar/followers","following_url":"https://api.github.com/users/Myoldmopar/following{/other_user}","gists_url":"https://api.github.com/users/Myoldmopar/gists{/gist_id}","starred_url":"https://api.github.com/users/Myoldmopar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Myoldmopar/subscriptions","organizations_url":"https://api.github.com/users/Myoldmopar/orgs","repos_url":"https://api.github.com/users/Myoldmopar/repos","events_url":"https://api.github.com/users/Myoldmopar/events{/privacy}","received_events_url":"https://api.github.com/users/Myoldmopar/received_events","type":"User","site_admin":false},"open_issues":132,"closed_issues":24,"state":"open","created_at":"2015-07-28T14:11:03Z","updated_at":"2015-08-17T18:57:32Z","due_on":"2015-09-30T06:00:00Z","closed_at":null},"comments":1,"created_at":"2015-08-17T18:57:12Z","updated_at":"2015-08-17T19:40:27Z","closed_at":null,"body":"Helpdesk ticket 10710\r\nUser file crashes with empty error file.  Running in debug mode reveals array bounds error [here](https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/MixedAir.cc#L3239) in MixedAir.cc \r\n\r\nThis should be legal, but the code for Controller:Mechanical is written such that is assumes there will be some DesignSpecification:OutdoorAir objects present.  From the I/O Ref:\r\n\r\n*Field: Design Specification Outdoor Air Object Name <x>*\r\nThe name of the DesignSpecification:OutdoorAir object, defining the amount of outdoor air, that applies to the zone or zone list. If this field is blank, the corresponding DesignSpecification:OutdoorAir object for the zone will come from the DesignSpecification:OutdoorAir object referenced by the Sizing:Zone object for the same zone. If no such zone match is found, default values from the IDD will be used for the DesignSpecification:OutdoorAir object.\r\n\r\nBut the getinput code to search the Sizing:Zone objects is commented out [here](https://github.com/NREL/EnergyPlus/blame/develop/src/EnergyPlus/MixedAir.cc#L1675)\r\n\r\nBut the block above this only validate this field is it is nonblank.\r\n\r\nSimilar code is commented out for DesignSpecification:ZoneAirDistribution, and it has similar comments in the I/O Ref that imply it can be omitted.\r\n\r\n- [ ] Current code implies that Controller:MechanicalVentilation fields \"Design Specification Outdoor Air Object Name <x>\" and \"Design Specification Zone Air Distribution Object Name <x>\" are required inputs for every zone in the list.  Need to confirm if this is the intent - but the code has been this way since before v8.2 (did not check back past that).\r\n\r\n- [ ] I/O Ref needs to be updated to reflect this.\r\n\r\n- [ ] Once this is required, then [this code](https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/MixedAir.cc#L3239) should be OK, but may want to add a test anyway? \r\n\r\n- [ ] Or better yet, OAFlowMethod should be stored in the local data structure similar to the other data from DesignSpecificationOutdoorAir, see [here](https://github.com/NREL/EnergyPlus/blame/develop/src/EnergyPlus/MixedAir.cc#L1653-L1656).  \r\n\r\n- [ ] If that's done, then also update other places where OAFlowMethod is used."},"comment":{"url":"https://api.github.com/repos/NREL/EnergyPlus/issues/comments/131939358","html_url":"https://github.com/NREL/EnergyPlus/issues/5112#issuecomment-131939358","issue_url":"https://api.github.com/repos/NREL/EnergyPlus/issues/5112","id":131939358,"user":{"login":"mjwitte","id":4991075,"avatar_url":"https://avatars.githubusercontent.com/u/4991075?v=3","gravatar_id":"","url":"https://api.github.com/users/mjwitte","html_url":"https://github.com/mjwitte","followers_url":"https://api.github.com/users/mjwitte/followers","following_url":"https://api.github.com/users/mjwitte/following{/other_user}","gists_url":"https://api.github.com/users/mjwitte/gists{/gist_id}","starred_url":"https://api.github.com/users/mjwitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjwitte/subscriptions","organizations_url":"https://api.github.com/users/mjwitte/orgs","repos_url":"https://api.github.com/users/mjwitte/repos","events_url":"https://api.github.com/users/mjwitte/events{/privacy}","received_events_url":"https://api.github.com/users/mjwitte/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T19:40:27Z","updated_at":"2015-08-17T19:40:27Z","body":"@kbenne Note the user indicated that this defect file came from OpenStudio.  May need to add some checks in OpenStudio."}}