If you can't figure out the issue you may want to take it in if it's still under warranty, feel like these guys have electrical issues often. saw this article where you could maybe even lemon it if the issue keeps happening idk. Just a thought. Better to not deal with the headache if it's repetitive.
http://lemonlawexperts.com/is-your-bmw-a-lemon/