Vuforia works fine when datasets are loaded from application bundle (readonly). The relevant call in QCARUtils.mm looks like this:
dataSet->load("MyDataSet.xml", QCAR::DataSet::STORAGE_APPRESOURCE);
When I try to load the same dataset from within Documents directory (writable), using the following call:
dataSet->load("/var/mobile/Applications/{APPID}/Documents/vuforia/MyDataSet.xml", QCAR::DataSet::STORAGE_ABSOLUTE);
I get some logs ending with "ImageTracker: Successfully created dataset" and then application crashes without any meaningful stacktrace. Here is console output:
2012-09-20 15:31:40.978 MyApp[7489:6407] INFO/AR(7489) 2012-09-20 15:31:40: ImageTracker: Successfully created dataset
[Switching to process 9731 thread 0x2603]
[Switching to process 9731 thread 0x2603]
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
Dwarf Error: Cannot find type of die [in module /Users/user/Library/Developer/Xcode/DerivedData/MyApp-eufzcreuyiqvfvgurkichzoloupf/Build/Products/Debug-iphoneos/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp] DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
(gdb) bt
#0 0x37a4af7e in objc_msgSend ()
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
Die: DW_TAG_<unknown> (abbrev = 100, offset = 1016726)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 1016731 (adjusted)
Dwarf Error: Cannot find type of die [in module /Users/user/Library/Developer/Xcode/DerivedData/MyApp-eufzcreuyiqvfvgurkichzoloupf/Build/Products/Debug-iphoneos/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp]
I've get this with iPhone 4 (iOS 5.0.1, without modifications) and 4S (5.1.1, jailbroken). Both devices are GSM, if it's relevant.
XCode 4.4.1, OSX 10.7.4
Native app, not Unity.
I see that Android guys are able to load datasets from writable directories. Has anyone tried the same on iOS?
Crash when loading a dataset from Documents
Hi Serban,
Yes this should work, and it should be relatively straightforward.