Q: When I run one of the sample applications, it crashes immediately. What is wrong?
When I try to run one of the sample applications, I get an immediate crash similar to the following:
VPR_DEBUG_NFY_LEVEL: Not found.
VPR_DEBUG_NFY_LEVEL: Defaults to 1
VPR_DEBUG_ENABLE: Not found.
VPR_DEBUG_ENABLE: Defaults to 1
[ TID: N/A ] DBG:=================================================================
[ TID: N/A ] DBG:VR Juggler: v1.1.128-0 'Kenny' (POSIX) HEAD Sep 29, 2002 20:09:40
[ TID: N/A ] DBG:VPR: v0.18.1-7 (POSIX) HEAD Sep 29, 2002 19:32:10
[ TID: N/A ] DBG:Gadgeteer: v0.4.2-7 'Evil Cartman' (POSIX) HEAD Sep 29, 2002 19:49:24
[ TID: N/A ] DBG:=================================================================
[ TID: N/A ] ERR:ChunkDescDB: XMLError:/share/jccl/data/jccl-chunks.desc: line 1 at position 1: error: invalid file name
[ TID: N/A ] JCCL-CFG:Loaded ChunkDesc file: '${VJ_BASE_DIR}/share/vrjuggler/data/vrj-chunks.desc'.
[ TID: N/A ] vjKERN:Loading config file: sim.base.config
[ TID: N/A ] vjKERN:Loading config file: sim.displays.config
[ TID: N/A ] vjKERN:Loading config file: sim.wand.mixin.config
Segmentation fault
I have not modified the code at all. What is wrong?
A: You may need write access to the directory where the application is run.
Application crashes can be caused by any number of factors, but the sample applications should always work. If they crash with the error shown above, it is because you need write access to the directory where the application is run. For VR Juggler versions beyond 1.1 DR3, this has been fixed for some platforms (IRIX, Linux, and !FreeBSD).
Write access is required because of the UUID/GUID implementation used internally by VPR (the class is vpr::GUID). We use these unique identifiers quite a bit. All VR Juggler 1.1 versions up to and including 1.1 DR3 used the Leach UUID implementation with a freely available MD5 library. The use of these causes two files to be created in the current working directory (the directory where you run the application). They are called nodeid and state. Being able to create (and later modify) these files is required for this UUID implementation to work.
Versions of VR Juggler after 1.1 DR3 can make use of external UUID implementations such as the DCE 1.1 UUID standard or the Linux-specific e2fsprogs libuuid library. (More specifically, VPR version 0.19.7 and beyond make use of these UUID implementations.) Neither of these implementations cause files to be written to the local directory. If neither of these implementations is available for the target operating system, then we fall back on the Leach UUID implementation. Thus, the solution is not perfect—yet.
Back to: LiveFaq
