"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

SurfaceTexture fails to "updateTexImage"(on Samsung Galaxy S2)

Hi,

I run into a very weird problem that SurfaceTexture fails to update the video data to opengl texture(GL_TEXTURE_EXTERNAL_OES).

I actually took the code from VideoPlayback sample, and make it be able to dynamically load different number of videos(played on targets)

This problem happens in this case.

1. First time I open up the camera and load let's say 1 target/video(which uses one texture, assuming the texture ID is 6), then leave camera, which destroys the Activity(I think the opengl surface should also be destroyed.)

2. Open up the camera again, and this time we load 2 targets/videos(which uses two textures, assuming the texture ID 1 for video A, 2 for video B)

3. Video A plays nicely, but when we start to play video B, it crashes due to the failure of updateTexImage. The exception stack is below.

 

---------

11-21 00:52:21.177: E/SurfaceTexture(8122): error binding external texture image 0x567fb0 (slot 0): 0x502

11-21 00:52:21.177: W/System.err(8122): java.lang.RuntimeException: Error during updateTexImage (see logs)

11-21 00:52:21.177: W/System.err(8122): at android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:164)

11-21 00:52:21.177: W/System.err(8122): at xxxxxxx.VideoPlayerHelper.updateVideoData(VideoPlayerHelper.java:602)

11-21 00:52:21.177: W/System.err(8122): at xxxxxxx.ARViewRenderer.onDrawFrame(ARViewRenderer.java:464)

11-21 00:52:21.177: W/System.err(8122): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)

11-21 00:52:21.177: W/System.err(8122): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)

-------- This problem only happens on Samsung Galaxy S2, it runs nicely on HTC J, HTC One S, Sharp SH530U...Could someone tell me why? I have no clue for this issue.....Thanks.

 

masonhsiung

Thu, 12/13/2012 - 08:55

Hi, I found a similar problem and it's on other devices(HTC One S/Sharp SH530U), black texture appears(if previous QCAR camera device initialized 6 textures, and the black texture ID is 8, ), and once I remove drawVideoBackground() from _renderFrame(), the texture will showup normally.

AlessandroB

Sun, 12/16/2012 - 21:56

OK, so, can you summarize the list of devices where this occurs (black texture and/or crashing)

and for each device, the exact model and Android version ?

I will then check internally with the engineering team to see what could be the issue.

 

AlessandroB

Mon, 12/17/2012 - 10:26

You're welcome!

I'm really glad to hear that 2.0 has fixed it.

Actually I just checked with our engineering team and they confirmed me that there was a little/subtle issue with background texture binding, which is now indeed completely solved in Vuforia 2.0.