android - Calling Google Play Services GoogleApiClient.connect() from Activity onStart() causes intermittent OpenGL crash (NvRmChannelSubmit errors etc.) -
i updated our app google play services rev 17, required changing our app's 3d activity activity fragmentactivity. call googleapiclient.connect() earlier used because google recommends calling googleapiclient.connect() activity's onstart().
this has caused serious regression: fresh install crashes 30% of time on nexus 7 on launch. crash logs nvrmchannelsubmit: nverror_ioctlfailed followed endless other nvrmchannelsubmit errors believe indicates messed opengl driver state.
this new bug, nothing changed in our app other than:
- activity changed activity android.support.v4.app.fragmentactivity
- gps init ui triggers earlier because call connect() onstart()
- updated gps rev 17 (which had lot of changes, nothing touching opengl!)
one theory have gps connect ui and/or underlying change fragmentactivity affecting window while app launching , interfering opengl driver init. have no proof cause, , if cause have no idea how fix it.
has else seen opengl driver issues related either gps connect ui flow or fragmentactivity?
problem fixed.
i confirmed opengl crash caused calling googleapiclient.connect() our activity's onstart() method while opengl initializating: if defer call connect() until after first opengl frame rendered bug fixed.
conclusions:
- google's recommends calling connect() activity onstart(), not safe opengl app. crashes opengl driver on nexus 7 running 4.3 if connect() calls triggers other gps ui flow e.g. user account selection
- deferring connect() call straight forward work-around us, careful because if still use activity onstop() call googleapiclient.disconnect() do, there no longer guarantee connect() have been called before disconnect(). have not seen problems gps internal state if occurs, google's sample code maintains fair bit of state related error handling, code may require changes work.
i never did determine exact root cause of opengl crash. older gps connect method have caused same crash if had called onstart (our prior implementation called later). possible crash not directly related gps @ all, general opengl driver vs. window manager problem when using fragmentactivity overlay ui during opengl initialization.
Comments
Post a Comment