Surfaceview ANativeWindow not valid #14250
Labels
p/Android
s/needs-info ❓
A question has been asked that requires an answer before work can continue on this issue.
s/unverified
New report that has yet to be verified
t/bug 🐛
Projects
On android sdk V28, 4.x xamarin.
We need to get to the native window. Thus, in our SurfaceView, we have the holder call back into
public void SurfaceCreated(ISurfaceHolder holder).
In this SurfaceCreated callback:
aNativeWindow = NativeMethods.ANativeWindow_fromSurface(JNIEnv.Handle, holder.Surface.Handle)
If you have Use Fast Deployment (debug mode only) in visual studios enabled, this below works just fine.
and
ANativeWindow_setBuffersGeometry( native_window, 0, 0, format ); does not crash the app
However, if you have Use Fast Deployment (debug mode only) in visual studios disabled (or making a release build),
returns crazy values, and you cannot create an opengl surface
and
ANativeWindow_setBuffersGeometry( native_window, 0, 0, format ); DOES crash the app
I've spend days trying to narrow down a work around. We want to create the opengl context in our c++ sdk as we don't want to use the GLSurfaceView. NOTE that we validated aNativeWindow is wonky in the c# side.. so one cannot blame going into c++.
I don't see any errors indicating anything is wrong....as is simply acts like Xamarin didn;t really setup and android window yet, and we are getting a bad ANativeWindow
The text was updated successfully, but these errors were encountered: