Log in or register to post comments

DataSet load using absolute path

April 23, 2012 - 10:41am #1

I have a problem about absolute path of dataset. App runs perfectly when the dataset is loaded from asset folder ( QCAR:: DataSet::STORAGE_APPRESOURCE ) . But the app fails while dataset is being loaded from external storage using absolute parth. ( QCAR:: DataSet::STORAGE_ABSOLUTE ) . The path is correct. DDMS logs "stack trace corruption" when I used absolute path. The part of DDMS;

04-23 20:29:01.253: D/QCAR(18919): InitQCARTask::onPostExecute: QCAR initialization successful
04-23 20:29:01.253: I/IMAGE_TARGETS(18919): Java_us_mron_AndroidApp_ImageTargets_initTracker
04-23 20:29:01.264: I/IMAGE_TARGETS(18919): Successfully initialized ImageTracker.
04-23 20:29:01.264: I/IMAGE_TARGETS(18919): Java_us_mron_AndroidApp_ImageTargets_initApplicationNative
04-23 20:29:01.264: I/IMAGE_TARGETS(18919): Java_us_mron_AndroidApp_ImageTargets_initApplicationNative finished
04-23 20:29:01.264: I/QCAR(18919): Using OpenGL ES 2.0
04-23 20:29:01.264: I/QCAR(18919): Using opaque GLView, depth buffer size: 16, stencil size: 0
04-23 20:29:01.268: D/QCAR(18919): /mnt/sdcard/external_sd/Android/data/us.mron.AndroidApp/files/dataset/20120407_csit.xml is being loaded.
04-23 20:29:01.268: I/IMAGE_TARGETS(18919): Java_us_mron_AndroidApp_ImageTargets_loadTrackerData
04-23 20:29:01.268: I/AR(18919): ImageTracker: Successfully created dataset
04-23 20:29:01.432: D/dalvikvm(18919): GC_FOR_MALLOC freed 6494 objects / 363096 bytes in 32ms
04-23 20:29:01.440: I/dalvikvm-heap(18919): Grow heap (frag case) to 11.083MB for 3151286-byte allocation
04-23 20:29:01.483: D/dalvikvm(18919): GC_FOR_MALLOC freed 376 objects / 20376 bytes in 40ms
04-23 20:29:04.331: I/IMAGE_TARGETS(18919): Successfully loaded and activated data set, path: /mnt/sdcard/external_sd/Android/data/us.mron.AndroidApp/files/dataset/20120407_csit.xml
04-23 20:29:04.331: A//system/bin/app_process(18919): stack corruption detected: aborted
04-23 20:29:04.635: D/QCAR(19044): Dataset folder's path: /mnt/sdcard/external_sd/Android/data/us.mron.AndroidApp/files/dataset
04-23 20:29:04.639: D/QCAR(19044): Last dataset's name: /mnt/sdcard/external_sd/Android/data/us.mron.AndroidApp/files/dataset/20120407_csit

Re: DataSet load using absolute path

April 23, 2012 - 10:59pm #3

Solved. It is not related with the absolute path. Because I am sending absolute path as a parameter of a function and it is taken from a File object. It is ok. The problem occured due to size of a char array that contains the path. It was smaller then string length and I used sprintf to format this char array. Thank you for quick response.

Re: DataSet load using absolute path

April 23, 2012 - 3:20pm #2

That's strange, what is the path you are using? It looks like "mnt/sdcard/..." from the log. I think typically you would just start with "/sdcard/...". Does that work?

Also, note that some devices use "emmc" instead of "sdcard".

- Kim

Log in or register to post comments