Q: Why does my application exit at startup on IRIX?

I am developing a VR Juggler application on IRIX, but when I run it, it exits almost immediately with very little output and no error message. What is happening?

A: You are probably mixing POSIX threads and SPROC threads, and the two are incompatible.

VR Juggler supports the use of either POSIX threads (pthreads) or SPROC threads on IRIX. We distribute two versions of each VR Juggler release: one compiled to use pthreads and the other to use SPROC. The two versions are 100% incompatible, meaning that you cannot mix pthreads-based software with SPROC-based software. Simply having -lpthread on the link line with a SPROC-based application is sufficient to cause this exit behavior, even if no pthreads calls are made anywhere in your code or in the code on which you depend.

The choice of which to use depends on your needs and any software dependencies you may need for your application. For example, many software packages developed today use multi-threading, but very few support anything but pthreads. Some examples include omniORB, !OpenAL, and Open Scene Graph. Other packages only support SPROC threads. One example is AudioWorks.

More Details

The exit occurs when the first thread is spawned. This normally occurs from the application's main() function when calling vrj::Kernel::start(), the method that starts the VR Juggler kernel control loop. Since this is usually called immediately after getting a handle to the kernel, the application exits right away. The amount of output printed to the terminal window will vary based on the structure of the main() function.

Back to: LiveFaq