flightgear-0.9.8 works without the joystick but upon plugging in the joystick it segfaults. js_demo had the same problem. I debugged js_demo and found the fault in the new JsJoystick. I debugged this and found that on return from JsJoystick::open() the program attempted to execute at 0x0. I can get js_demo to work by commenting out // ioctl ( os->fd, JSIOCGCORR, corr ); in src/js/jsLinux.cxx. This allows js_demo to work but not fgfs. Note: the joystick is on the USB port. Note: This may be a kernel bug. It have exceded my debugging ability. Reproducible: Always Steps to Reproduce: 1.ACCEPT_KEYWORDS="~amd64" emerge flightgear 2.plug in USB joystick 3.fgfs or js_demo Actual Results: Segmentation fault Expected Results: Run flightgear Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1,dev-lang/python-2.2.3-r5 [2.3.4 (#1, Feb 12 2005, 15:17:51)] distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.4-r1, 2.2.3-r5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.ccccom.com http://gentoo.ccccom.com" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acpi alsa arts berkdb bitmap-fonts bonobo cdr crypt cups curl esd fam font-server foomaticdb fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtkhtml guile imagemagick imlib ipv6 java jp2 jpeg lzw lzw-tiff mad motif mozilla mp3 ncurses nls ogg opengl oss pam perl png ppds python qt readline scanner slang ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xml xml2 xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Here seems to work, i've an usb gamepad, and both js_demo and fgfs runs without segfaults, also if I don't know how to make it fly (I see the plane react to axis movement anyway). Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 6 2005, 01:01:44)] ccache version 2.4 [disabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.9.5, 1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O3 -pipe -funroll-loops" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/env.d" CXXFLAGS="-march=athlon64 -O3 -pipe -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig cvs digest distlocks multilib-strict sandbox strict" GENTOO_MIRRORS="http://gentoo.inode.at/ http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LINGUAS="en" MAKEOPTS="-j2 -s" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/other /usr/local/portage/mplayer32 /usr/local/portage/flame-portage /home/flame/devel/gentoo/gentoo-x86 /home/flame/devel/flame-portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 S3TC X a52 aac acpi acpi4linux alsa apache2 apm avi bash-completion berkdb bzip2 bzlib cdda cddb cdio cdr cjk crypt css cups curl dnd dpms dts dvd dvdr dvdread fam fame ffmpeg flac gd gdbm gif gnutls gpgme gphoto2 gstreamer gtk2 hal idn ieee1394 imagemagick imlib2 ithreads java joystick jp2 jpeg kde kdeenablefinal latex libwww lirc lm_sensors lzw lzw-tiff mad maildir matroska mmap mng mozsvg mp3 mpeg mpeg4 mpm-threadpool native ncurses no_wxgtk1 noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nodrm nojdepend nojsch nojython nolog4j nomotif nooro noregexp norhino noxalan noxerces nptl nvidia ogg oggvorbis opengl pam pdf pdflib perl pic png ppds python qemu-fast qt rtc samba scanner snmp ssl stencil-buffer subversion svg svgz symlink sysfs syslog tetex theora threads tiff truetype truetype-fonts type1 type1-fonts usb userlocales utf8 v4l v4l2 vorbis wxwindows x11vnc xml2 xpm xrandr xv xvid xvmc zlib zvbi linguas_en" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Scott, please check dmesg for any messages relating to this.
Can you please re-trigger the problem and attach the following info: relevant `dmesg` output. emerge pciutils && lspci -vv > /tmp/out-lspci && lspci -vv -n > /tmp/out-lspci-n emerge usbutils && lsusb -vv > /tmp/out-lsusb
I just attempted to re-trigger the problem. After emerge, js_demo and fgfs both worked with my usb joystick. Since the bug was filed, the kernel was upgraded from linux-2.6.9-gentoo-r14 to linux-2.6.11-gentoo-r6. Also numerous upgrades with emerge -uD world. I believe that it was in this time that I changed from devfs to udev but I can't be sure. It is fine with me if this bug is closed out. If you would like me to boot the old kernel and try to cause the failure, let me know. Scott
will close for now. please reopen if this issue ever returns.
This bug has returned. However, the fix is also know. It is caused by a bug in jsLinux.cxx. The bug is fixed in the CVS repository version but not in the released version. It is a 2 line fix. See: http://cvs.sourceforge.net/viewcvs.py/plib/plib/src/js/jsLinux.cxx?rev=1.7&view=markup I applied the fix by hand using ebuild and it works. The problem only shows up with joysticks which declare more axes than jsLinux expects. I don't understand why it ever worked for me, but memory overflows can act that way. Scott
scott, sorry, you lost me -- which bit is the actual two line fix to which you refer?
actually, I found it from the cvs logs. plib-1.8.4-r1 is now in portage.