"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

VideoPlayback crash after adding 3 more targets

I have an issue with expanding on the Vuforia VideoPlayback sample for Android.

My application works perfectly with 5 Videos/Targets but adding the 6th causes the following error:

03-27 14:41:40.683: E/AndroidRuntime(9234): FATAL EXCEPTION: GLThread 1569
03-27 14:41:40.683: E/AndroidRuntime(9234): java.lang.NullPointerException
03-27 14:41:40.683: E/AndroidRuntime(9234): 	at com.qualcomm.vuforia.samples.VideoPlayback.app.VideoPlayback.VideoPlaybackRenderer.initRendering(VideoPlaybackRenderer.java:359)
03-27 14:41:40.683: E/AndroidRuntime(9234): 	at com.qualcomm.vuforia.samples.VideoPlayback.app.VideoPlayback.VideoPlaybackRenderer.onSurfaceCreated(VideoPlaybackRenderer.java:200)
03-27 14:41:40.683: E/AndroidRuntime(9234): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1494)
03-27 14:41:40.683: E/AndroidRuntime(9234): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

 

 

I understand that this is an issue brought up in the forums before but I can't find the Threads it was mentioned in, and I also understand the solution is so maybe have onle one VideoPlayerHelper object which when it encounters a new Trigger imageswap unload the old video and load in the new one. I have tried this but feel i'm going in circles trying to get it to work. 

A point in the right direction would be greatly appreciated.

fabricvuforia

Fri, 03/28/2014 - 15:38

I have found the topic where it was suggested to comment out the code with regards to loading the videos in OnSurfaceCreated and OnSurface changed and to then load the video in when it's trigger has been detected (whilst unloading the rest of the videos).