Log in or register to post comments

Vuforia.init() crash on Android

May 23, 2014 - 3:59am #1

Hi guys,

 

I'm using vuforia sdk v 2.8.8, and already successfuly running on Samples code

I just try to create new apps and replicating imagetarget src.

But when i run the apps. is tuck on SampleApplicationSession.java -> mProgressValue = Vuforia.init();

always Crashing on that line.

Any Idea how to solved it? I'm using Android Studio to develop.

This is the error from logcat:

 

05-23 17:59:03.577  28003-28003/com.example.freedom D/ImageTargets﹕ onCreate
05-23 17:59:03.607  28003-28003/com.example.freedom I/Vuforia_Sample_Applications﹕ Activity is in PORTRAIT
05-23 17:59:03.617  28003-28003/com.example.freedom D/ImageTargets﹕ onResume
05-23 17:59:03.617  28003-28003/com.example.freedom D/dalvikvm﹕ Trying to load lib /data/app-lib/com.example.freedom-2/libVuforia.so 0x418dacd0
05-23 17:59:03.627  28003-28003/com.example.freedom D/dalvikvm﹕ Added shared lib /data/app-lib/com.example.freedom-2/libVuforia.so 0x418dacd0
05-23 17:59:03.637  28003-28003/com.example.freedom I/System.out﹕ Native library libVuforia.so loaded
05-23 17:59:03.647  28003-28020/com.example.freedom I/AR﹕ QCAR has been initialized successfully
05-23 17:59:03.647  28003-28020/com.example.freedom I/AR﹕ QCAR SDK version 2.8.8
05-23 17:59:03.647  28003-28020/com.example.freedom A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 28020 (AsyncTask #1)
05-23 17:59:03.677  28003-28003/com.example.freedom D/libEGL﹕ loaded /vendor/lib/egl/libEGL_adreno.so
05-23 17:59:03.677  28003-28003/com.example.freedom D/libEGL﹕ loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
05-23 17:59:03.687  28003-28003/com.example.freedom D/libEGL﹕ loaded /vendor/lib/egl/libGLESv2_adreno.so
05-23 17:59:03.687  28003-28003/com.example.freedom I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:316>: EGL 1.4 QUALCOMM build:  (CL4169980)
    OpenGL ES Shader Compiler Version: 17.01.10.SPL
    Build Date: 12/01/13 Sun
    Local Branch:
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
05-23 17:59:03.727  28003-28003/com.example.freedom D/OpenGLRenderer﹕ Enabling debug mode 0
 

Thx Before

Vuforia.init() crash on Android

June 6, 2014 - 8:03am #10

Hello wynkoop,

Thank you for your reply for my problem. I'd upgraded the SDK to 2.8.8, the error keeps still.

I also red the talks between cobasajaxinpho  and AlessandroB,   I think I have the same question as that of cobasajaxinpho's.

I made a test like this:

1. I copy the VuforiaSample folder and import it into eclipse, and run it successfully.

2. I modify the src path of the VuforiaSample project : from com.qualcomm.Vuforia.samples.VuforiaSamples.app ,  to com.myARapps. Accordingly, I also modify the imported pacakge path name in java source code , and AndroidManifest.xml file related values. Besides these, I modify no other source codes.

3.  Then build the modified project succesfully.

4. Run it as android application, failed with the same error at "vuforia.init()" as  stated before, with following information in logcat :

    AR    QCAR has been initialized successfully
    AR    QCAR SDk version 2.8.8

    I also output the return of vuforia.init() to logcat,  the value is still -1.  

5.  I restore the src package path to its original name, and the SDK is initialized successfully again.

During all the above process, I did not modify any code in any one java method, just the package path name. 

So you can see, even I just modify the src package path other than vuforia's original name, the SDK can not initialized. As if QCAR SDK can only accept its own path name, is this packaging name be hard coded in QCAR SDK?

I can not explain why it can happen, and have no idea to solve it.  Please help to check it in your environment following my steps, to see if you get the same result.

 

Thanks

//ramon

Vuforia.init() crash on Android

June 4, 2014 - 12:57am #9

if there's sth happen with EGL Lib why i can run the sample devices?

I'm Not saying that the error is ultimately caused by the EGL library,   I'm just saying that the error is appearing from there; however the actual root cause of the error is not the EGL library itself, but it must be something else in your application code which triggers the erratic condition (since, as you say, the samples do work)

 

i think i just try to duplicate the sample code. -> not yet modify it. i think the step is already same.

Well, there must be something different in your code; for example, are you calling some of the init methods from different threads ?,   ... if your code was really the same as the samples, the result would also be the same....  there is nothing magic in the samples themselves that would make them "automagically" work,   it is just about the code.   

 

 

 

 

Vuforia.init() crash on Android

June 3, 2014 - 8:07pm #8

hi AlessandroB,

if there's sth happen with EGL Lib why i can run the sample devices?

and for your argument  try comparing the sequence of Vuforia-specific operations done in the Vuforia sample with the ones that you call in your code;

i think i just try to duplicate the sample code. -> not yet modify it. i think the step is already same.

and for Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 28020 (AsyncTask #1) -> it's because when running task InitVuforiaTask get sth crashing on vuforia.init() -> i can't trace it further because it's jar file

Thx .:)

Vuforia.init() crash on Android

June 3, 2014 - 4:10am #7

wynkoop is referring here to the graphics / OpenGL driver of your Android device, as the crash logs point to something happening in the EGL library.

Also, try comparing the sequence of Vuforia-specific operations done in the Vuforia sample with the ones that you call in your code;

for example, these are the initialization steps used by the sample code:

- init Vuforia 

- when Vuforia init is done, init the Trackers

- when the Trackers have been initialized, load any tracker data that may be applicable to your app (e.g.Load Datasets)

- create and setup the OpenGL view (and the related Renderer)

- configure the videobackground

- start the camera

- start the trackers

See also:

https://developer.vuforia.com/forum/faq/android-how-can-i-build-basic-vuforia-app

 

Also, the Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 28020 (AsyncTask #1) error indicates that there is some threading issue; for example, you might be performing some operations from the OpenGL thread that are not thread-safe... 

see also:

https://developer.vuforia.com/resources/dev-guide/threading

 

 

Vuforia.init() crash on Android

June 2, 2014 - 7:56pm #6

hi , wynkoop, what do you mean by graphic drivers? do you mean my PC graphic driver?

but why if i'm using sample code it's work?

can you explain further?

Vuforia.init() crash on Android

June 2, 2014 - 8:17am #5

cobasajaxinpho,

 

Since the sample work, and your crash seems to be in the graphics driver, I would focus on debugging your graphics code itself.

 

ramonlln,

 

There was a known issue with 2.8.7 which you should have received an email about, please upgrade to 2.8.8 and see if the problem is resolved.

 

Thanks

//mike

Vuforia.init() crash on Android

June 1, 2014 - 1:51am #4

Same to me, I met the same problem. Could someone give us the answer ?

My Vuforia.init() return -1, but in the logcat ,  I saw two records :

    AR    QCAR has been initialized successfully

    AR    QCAR SDk version 2.8.7

Does this mean the Vuforia have been initialized ?  So why it return -1 ?

 

Vuforia.init() crash on Android

May 29, 2014 - 11:20pm #3

hi wynkoop,

Thx for reply,

I'm using Xperia Z IOS version 4.3 with vuforia.jar 2.8.8,

If i'm using sample code t can run, why if i'm using my own project the apps keep crashing on initialized vuforia.init().

need some advices.:)

thx

Vuforia.init() crash on Android

May 29, 2014 - 5:41pm #2

Hi,  what device are you using?

Also, please post any relevent info such as OS version, build number, etc.

Thanks

Log in or register to post comments