Log in or register to post comments

App Crash after loading more than 2 videos

April 29, 2013 - 11:09am #10

Hi ,

 

My app is successfully running with 2 videos. As soon it loads 3rd video it crashes.

Checked with sample app , the issue is coming there too

video size is 2 mb

 

App Crash after loading more than 2 videos

April 29, 2013 - 11:30am #9

Hi, what error message do you get ? (see the logs)

App Crash after loading more than 2 videos

April 29, 2013 - 11:42am #8

I m getting this error

 

04-30 00:11:03.992: A/libc(32055): Fatal signal 11 (SIGSEGV) at 0x00740075 (code=1), thread 2375 (Thread-1168)

App Crash after loading more than 2 videos

April 29, 2013 - 10:14pm #7

Hi, that error might come from a threading issue or from a resource issue;

have you added your third video using this tutorial ?

https://developer.vuforia.com/forum/faq/android-how-do-i-add-another-target-video-playback-sample

if you are sure that you did not introduce specific errors when adding video #3, then the error just indicates a resource problem (e.g. insufficient memory on the graphics chipset or similar) on that specific device.

Maybe worth trying on another device as well, to confirm the problem.

App Crash after loading more than 2 videos

April 30, 2013 - 7:09am #6

Hi Alessendro

 

I suspect this line is causing me issue in renderframe. I am now using original videodimensions code. i have commented keyquad textures code in initrendeing.

 

if (textures[currentTarget]->mSuccess)
ratio = keyframeQuadAspectRatio[currentTarget];
else
ratio = targetPositiveDimensions[currentTarget].data[1] / targetPositiveDimensions[currentTarget].data[0];

my second video crashes too 1out of 5 times

App Crash after loading more than 2 videos

April 30, 2013 - 8:49am #5

Hi, again, my recommendation is to make sure to read this and check every single code snippet and compare with what you do:

https://developer.vuforia.com/forum/faq/android-how-do-i-add-another-target-video-playback-sample

All the important code parts are reported there.

App Crash after loading more than 2 videos

April 30, 2013 - 12:34pm #4

Hi Alessendro,

 

Let me clear my use case. I don't want to show any textures which are binded with videos.

Therefore i commented out these lines

 

//    keyframeQuadAspectRatio[STONES] = (float)textures[0]->mHeight / (float)textures[0]->mWidth;
//    keyframeQuadAspectRatio[CHIPS]  = (float)textures[1]->mHeight / (float)textures[1]->mWidth;

 

My code fails at this line know always for 3rd video and sometimes for 2nd video(1\5) in renderFrame. Ia m using just one texture play button to show when user taps.

 

glBindTexture(GL_TEXTURE_2D, textures[currentTarget]->mTextureID);
glUniformMatrix4fv(keyframeMVPMatrixHandle, 1, GL_FALSE,
  (GLfloat*)&modelViewProjectionKeyframe.data[0] );
glUniform1i(keyframeTexSampler2DHandle, 0 /*GL_TEXTURE0*/);

 

I have alraedy gone though tutorial and set no. of targets as 3 and done necessary changes.

Regards

Vineet Aggarwal

App Crash after loading more than 2 videos

April 30, 2013 - 12:35pm #3

 

Hi , 

 

I am uploading dynamic video targets. filling video targets dynamically by code.  Can you please help me to how to load target at runtime. If there is memory issue then may be it can solve. i think vuforia sdk can't handle more than 2 videos

this is same for all targets. so  i am using the same the same for all targets.

 
Also , i am not using any Textures . i just commented these two lines
  // keyframeQuadAspectRatio[STONES] = (float)textures[0]->mHeight / (float)textures[0]->mWidth;
   // keyframeQuadAspectRatio[CHIPS]  = (float)textures[1]->mHeight / (float)textures[1]->mWidth;

 

App Crash after loading more than 2 videos

May 2, 2013 - 3:53am #2

Hi ,

My issue is resolved now. But i need to verify from you.

 

I removed all png files in vuforia sample except play button. After this, video1 was playing smooth , video2 was crashing 1 out of 10 times , video3 always crashed

 

Solution : I  placed two more png for textures array and my videos are playing. 

Ques : So does it mean we need to have pngs with textures like default sample.

App Crash after loading more than 2 videos

May 2, 2013 - 4:57am #1

Hi, gald to hear you solved the issue.

Indeed, you need to have those png textures, or otherwise you need to adjust some of the texture related code in CPP;

if you look again at the tutorial:

https://developer.vuforia.com/forum/faq/android-how-do-i-add-another-target-video-playback-sample

There is a part of the code in Java where you add the video-specific textures (see loadTextures() method as explained in the tutorial),

and also a part of the code in C++ which must reflect the textures that you have loaded in Java, see this snippet:

switch (currentStatus[currentTarget])
{
    case READY:
        glBindTexture(GL_TEXTURE_2D, textures[3]->mTextureID);
        break;
    case REACHED_END:
        glBindTexture(GL_TEXTURE_2D, textures[3]->mTextureID);
        break;
    case PAUSED:
        glBindTexture(GL_TEXTURE_2D, textures[3]->mTextureID);
        break;
    case NOT_READY:
        glBindTexture(GL_TEXTURE_2D, textures[4]->mTextureID);
        break;
    case ERROR:
        glBindTexture(GL_TEXTURE_2D, textures[5]->mTextureID);
        break;
    default:
        glBindTexture(GL_TEXTURE_2D, textures[4]->mTextureID);
        break;
}

 

Log in or register to post comments