I am running under Fedora 15, Linux version 18.104.22.168-0.fc15.i686.PAE (email@example.com) (gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) ) #1 SMP Tue Oct 4 00:44:38 UTC 2011.
I built the phidgets21 library from source, installed libusb and libusb-devel so that I had access to libusb-0.1.
I then compiled and ran the example Encoder-simple.c without any device attached. The program core-dumped with sigsegv. The problem was in cusblinux.c at line 421. To summarize, a call is made udev = usb_open(...). Then udev is checked for null (which it will be if no device is present). If udev is null, then the code calls usb_close(udev). If the argument to usb_close is null, the result is a segmentation fault.
I fixed this on my install by removing the call to usb_close, since if the usb_open failed there should be no reason to call usb_close.
Does this sound sane to you guys?