Log in or register to post comments

Crash in sample with custom images

November 21, 2013 - 2:15pm #1
AttachmentSize
Package icon assets.zip20.75 KB

Crash in sample with custom images

December 17, 2013 - 2:30pm #27

You may also need to copy the libVuforia.so, as shown in the new samples (check the new ImageTargetsNative sample).

 

Crash in sample with custom images

December 17, 2013 - 1:15pm #26

I made all the changes, switch from libQCAR.jar to libVuforia.jar etc...

 

My ImageTargets now crashes on boot due to a crash when System.loadLibrary("Vuforia") is invoked;

W/dalvikvm(26417): JNI WARNING: JNI method called with exception pending
W/dalvikvm(26417):              in Ljava/lang/Runtime;.nativeLoad:(Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/String; (FindClass)
W/dalvikvm(26417): Pending exception is:
I/dalvikvm(26417): java.lang.NoSuchMethodError: no static method with name='getDeviceOrientation' signature='(Landroid/app/Activity;)I' in class Lcom/qualcomm/ar/pl/SystemTools;
I/dalvikvm(26417):      at java.lang.Runtime.nativeLoad(Native Method)
I/dalvikvm(26417):      at java.lang.Runtime.doLoad(Runtime.java:418)
I/dalvikvm(26417):      at java.lang.Runtime.loadLibrary(Runtime.java:359)
I/dalvikvm(26417):      at java.lang.System.loadLibrary(System.java:525)
...
 
is the SystemTools class working properly?

Crash in sample with custom images

December 17, 2013 - 8:52am #25

Excellent, I will give it a try. Thanks for letting me know, I'll let you know how it goes.

Crash in sample with custom images

December 17, 2013 - 1:27am #24

Update:

Vuforia 2.8 is now available. This release should include the fix below.

Please be sure to consult the migration guide before upgrading your project:

 https://developer.vuforia.com/resources/dev-guide/migrating-your-unity-project

Crash in sample with custom images

November 27, 2013 - 2:40am #23

Hi, 

I was able to reproduce the issue on the Samsung Galaxy Nexus, using the "red bag" image.

The issue has been already fixed and the fix should be available in the next release of Vuforia SDK.

Thanks.

 

Crash in sample with custom images

November 26, 2013 - 10:44am #22

This 5 star image crashes on a consistent basis on the gnexus: http://www.buddsonline.com/usercontent/images/Red_Bag%20%28Medium%29.jpg

Crash in sample with custom images

November 26, 2013 - 8:30am #21

OK. 

Can you then indicate a combination of image targets that we can use as a reference for testing this issue ?

(i.e. one for which you are sure you can sistematically reproduce the issue)

So, then I will be able to recreate the same dataset and test on that device.

Crash in sample with custom images

November 26, 2013 - 7:37am #20

Factory reset my phone today, it's still happening.

Galaxy Nexus 4.3 GSM - JWR66Y

Crash in sample with custom images

November 25, 2013 - 9:45am #19

Ok, keep us posted in case problem persist on that specific device even after clearing it.

 

Crash in sample with custom images

November 25, 2013 - 8:33am #18

I very recently received my nexus 5 in the mail, and have tried the sample with it. I have also tried it with other devices around the office. So far so good, no crashes.

I am still worried however, because my galaxy nexus continues to crash even with a restart. This isn't something that has been widely reported, has it? I will probably try to wipe it sometime soon and I will let you know if the problem persists.

Crash in sample with custom images

November 24, 2013 - 11:35am #17

I tried creating 4 datasets using varoious combinations of the following selection from your images:

http://scholarshipland.org/wp-content/uploads/2013/07/Coca-Cola-logo.jpg (5 stars)

http://www.buddsonline.com/usercontent/images/Red_Bag%20(Medium).jpg (5 stars)

http://butlertwp.org/Images/Road.jpg (2 stars)

http://www.themobileindian.com/images/nnews/2012/10/8999/Apple-logo.jpg (0 stars)

but in none of the cases I was able to make the app crash, even after killing and resintalling it fresh.

Note: I have been using the Image Targets sample without any code change except the dataset name change in the ImageTargets.cpp loading function (dataSet->load ( ... ))

The Vuforia version is SDK 2.6.10.

Not sure how to help further... have you tried rebooting the device, just to exclude any misconfiguration ?

 

 

 

Crash in sample with custom images

November 23, 2013 - 2:03pm #16

Ok, let me create a few datasets with your images and try to reproduce it.

 

 

Crash in sample with custom images

November 23, 2013 - 10:14am #15

Yes, I have used multiple datasets, including one with a single 5 star image.

Crash in sample with custom images

November 23, 2013 - 7:24am #14

Ok. I see that among the failing images, yu have a couple of them with a zero stars rating.

Zero-star targets should not be used (i.e. you should not include them in your dataset);

have you tried to only use datasets which do not contain any zero-star targets ? (e.g. using some of your failing images but making sure that the dataset does not contain any of the zero-star images ) ?

I suspect that may be the culprit of the issue you are seeing.

 

Crash in sample with custom images

November 22, 2013 - 3:20pm #13

I have tried loading datasets with 1-2-3 targets, just finished one up with more than 5 targets, all randomly from google.

Here is a list of images I tried:

 

works:

http://www.desktopas.com/files/2013/06/Waterfall-Scenery-Wallpaper-1680x1050.jpg  (5 Stars)

all 3 built in images (5 stars)

 

doesn't work:

http://fc04.deviantart.net/fs70/f/2010/253/a/a/red_bag_icon_by_childmonster-d2yeq7i.jpg  (0 stars)

http://farm2.static.flickr.com/1108/1178788831_e28812ab1e_o.jpg (3 stars)

http://scholarshipland.org/wp-content/uploads/2013/07/Coca-Cola-logo.jpg (5 stars)

http://www.buddsonline.com/usercontent/images/Red_Bag%20(Medium).jpg (5 stars)

http://www.thinkstockphotos.com/CMS/StaticContent/WhyThinkstockImages/Best_Images.jpg (3 stars)

http://butlertwp.org/Images/Road.jpg (2 stars)

http://www.themobileindian.com/images/nnews/2012/10/8999/Apple-logo.jpg (0 stars)

 

The app only crashes on a very fresh boot, so you must kill the app each time (pressing home isn't enough), and only the first time it encounters one of these images.

If you have one of these broken images on your computer screen while pointing your phone to it, it will display the teapot on top. If you then switch tabs to another image, the app will display the teapot and not crash at all, until the app is restarted from a cold state. However if you do not switch the image and instead pan in any direction, slowly or quickly, to make the image not visible, the app will crash.

Crash in sample with custom images

November 22, 2013 - 2:55pm #12

Can you try creating a new dataset with 1 or 2 targets and try again ?

If all you have changed is this code (and literally only this code):

if (!dataSetStonesAndChips->load("MyImageTargets.xml",
                    QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }
then replacing the dataset should not be an issue, unless the dataset itself is corrupted for some reason.

Also, what is the star rating of the targets in your database ? do you have any target with a rating of zero stars ?

 

 

Crash in sample with custom images

November 22, 2013 - 2:23pm #11

I just installed eclipse (fresh), with a new sdk folder (fresh), and a new sample app project (fresh). Changed "StonesAndChips.xml" to "test.xml" and I still see the described behavior. There is definately something wrong with QCAR.

Device: Galaxy nexus stock, rooted, version 4.3
 

 

Is it possible to get your developpers to look into this? I have deadlines to meet and can't put in a workaround for this. Thanks.

edit: I want to give older SDKs a try, but can't seem to find them. Is there somewhere I can download previous versions of the SDK to try this out?

Crash in sample with custom images

November 22, 2013 - 10:43am #10

My SDK version is 2.6.10 (ImageTarget shows as 2.6.7 in samples, I assume it hasn't changed).

I have built different datasets throughout development, so it ranges from 2 weeks to yesterday.

Crash in sample with custom images

November 22, 2013 - 10:39am #9

Ok. weird.

What version of Vuforia are you using ? and when did you create your dataset ? (recently ?)

 

 

Crash in sample with custom images

November 22, 2013 - 10:20am #8

Right now I am just loading one dataset, who's db has 1 image file in it. I have it set up to load a dynamic number of images, however I only ever load the assets from the start, so this isn't a problem of loading during processing.

Crash in sample with custom images

November 22, 2013 - 10:03am #7

One thing to keep in mind is that you can only Destroy datasets if these contain User Defined Targets;

if you have datasets loaded from file, you may not destroy them; more precisely, the targets will not be cleared from memory.

So, depending on what exactly you are doing with load/destroy, there is something that may trigger the crash.

Also, how many datasets are you loading / destroying dynamically ? Based on the above, it looks like you may simply run out of memory (which eventually leads to the crash)

 

 

Crash in sample with custom images

November 22, 2013 - 8:23am #6

Even when following the instructions here https://developer.vuforia.com/forum/faq/android-how-do-i-replace-dataset-image-targets-sample I get the crash. Here's the diff:

209c209
<     if (!dataSetStonesAndChips->load("StonesAndChips.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
---
>     if (!dataSetStonesAndChips->load("test.xml", QCAR::DataSet::STORAGE_APPRESOURCE))

Crash in sample with custom images

November 22, 2013 - 7:47am #5

What about this simpler project though? I made very little changes to it and there is a reproducible crash. I only load/destroy the data in the same spot as the sample project, and I've cleared the update function's body since I have no switching.

I've attached a diff file (remove the .txt ending, added so I can upload) to show my differences. It makes no sense that this is crashing from my changes, and the stacktrace from the crash seems to agree it's coming from libQCAR.

AttachmentSize
Plain text icon ImageTargets.cpp_.diff_.txt3.48 KB

Crash in sample with custom images

November 22, 2013 - 6:32am #4

Ok, so, the segmentation fault error typically results from a threading issue (such as a race condition);

if you are loading datasets dynamically, this may explain the threading issue;

for example, you should load and activate / deactivate your Datasets in the QCAR_onUpdate() method, as shown in the ImageTargets sample code,

otherwise you may incur in a conflict with QCAR background process.

 

Crash in sample with custom images

November 21, 2013 - 4:14pm #3

Yes I have set it up that way.

 

In fact in my real project I have the datasets loading dynamically, I just set this new one up quickly to demonstrate the bug.

Crash in sample with custom images

November 21, 2013 - 4:09pm #2
Log in or register to post comments