- Sort Posts
- 26 replies
- Last post
Crash in sample with custom images
Crash in sample with custom images
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;
Crash in sample with custom images
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
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
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
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
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
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
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;
}
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
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.
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
Crash in sample with custom images
Crash in sample with custom images
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
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
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.
Attachment | Size |
---|---|
![]() | 3.48 KB |
Crash in sample with custom images
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
Crash in sample with custom images
Have you checked the suggested implementation ere:
https://developer.vuforia.com/forum/faq/android-how-do-i-replace-dataset-image-targets-sample
You may also need to copy the libVuforia.so, as shown in the new samples (check the new ImageTargetsNative sample).