Segmentation fault

Help
DrSlony
2009-03-06
2013-04-24
  • DrSlony
    DrSlony
    2009-03-06

    Hey

    I compiled Panini 0.62.83 and also the prior version on gentoo linux (x86_64), both would segfault when I ran ./bin/panini. I also compiled the debug version of both, but that didn't give any error messages either, just "segmentation fault".

    I use qt-4.5 now, but I used an older qt when I tried the older panini.

    The first tiem I ran "qmake panini.pro" it would give these two errors:
    sh: build/pvQtVersion.h: No such file or directory
    sh: build/pvQtVersion.h: No such file or directory

    But when I ran "qmake panini.pro" again, it didn't produce any errors.

    Here is a log of both "qmake panini.pro" and of "make release":
    http://paste2.org/p/159770

    How can I provide you with more info, and is there anything I can do to run this?

    DrSlony

     
    • Tom Sharpless
      Tom Sharpless
      2009-03-07

      Hi

      On Fri, Mar 6, 2009 at 4:09 PM, DrSlony <drslony@panopixel.org> wrote:

          DrSlony from My Autopano Pro forum has sent you a message. You can reply to DrSlony by replying to this e-mail.

          The message reads as follows:
          -----------------------------------------------------------------------

          Hey

          I compiled Panini 0.62.83 and also the prior version on gentoo linux (x86_64), both would segfault when I ran ./bin/panini. I also compiled the debug version of both, but that didn't give any error messages either, just "segmentation fault".

          I use qt-4.5 now, but I used an older qt when I tried the older panini.

      I have been using Qt version 4.4.2 or 4.4.3 (they are the same).  Versions older than 4.4.1 won't work.  No experience with 4.5.

          The first tiem I ran "qmake panini.pro" it would give these two errors:
          sh: build/pvQtVersion.h: No such file or directory
          sh: build/pvQtVersion.h: No such file or directory

          But when I ran "qmake panini.pro" again, it didn't produce any errors.

      That is normal.  The first run creates the version header.

          Here is a log of both "qmake panini.pro" and of "make release":
          http://paste2.org/p/159770

          How can I provide you with more info, and is there anything I can do to run this?

      The best thing would be to build the debug version and run it under gdb, which should be able to provide a stack trace leading up to the fault.  I think the needed commands would be:
      gdb ./bin/panini-d        to start the process
      (gdb) r                         to run panini
                                          and then after the fault
      (gdb) bt                       to print the backtrace
      (gdb) q                        to return to shell

      Hopefully the trace will show where the problem lies.

      Regards, Tom

       
    • DrSlony
      DrSlony
      2009-06-16

      Hey

      I tried compiling the latest stable (Panini 0.63.94) and the latest SVN. Both seemed to compile fine, but segfault when I'd run ./Panini
      Next I installed qt-creator and compiled panini from within there. Compiled fine, segfault when run.

      My system specs:
      Gentoo Linux x86_64
      Kernel: gentoo-sources-2.6.29-r5
      Motherboard: Gigabyte 965P-DS3
      CPU: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz 266MHz
      RAM: Geil 4 x 2GB Dual DDR2 DIMM 800 MHz
      nvidia-drivers-180.60
      kde 4.2.4
      qt-4.5.1

      emerge --info
      System uname: Linux-2.6.29-gentoo-r5-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-glibc2.2.5        
      ccache version 2.4 [enabled]                                                                             
      app-shells/bash:     3.2_p39                                                                             
      dev-java/java-config: 2.1.7                                                                              
      dev-lang/python:     2.5.4-r2                                                                            
      dev-python/pycrypto: 2.0.1-r8                                                                            
      dev-util/ccache:     2.4-r7                                                                              
      dev-util/cmake:      2.6.4                                                                               
      sys-apps/baselayout: 1.12.11.1
      sys-apps/sandbox:    1.6-r2
      sys-devel/autoconf:  2.13, 2.63
      sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
      sys-devel/binutils:  2.18-r3
      sys-devel/gcc-config: 1.4.1
      sys-devel/libtool:   1.5.26
      virtual/os-headers:  2.6.27-r2
      ACCEPT_KEYWORDS="amd64"
      CBUILD="x86_64-pc-linux-gnu"
      CFLAGS="-march=nocona -O2 -pipe"
      CHOST="x86_64-pc-linux-gnu"
      CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
      CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
      CXXFLAGS="-march=nocona -O2 -pipe"
      MAKEOPTS="-j3"
      USERLAND="GNU" VIDEO_CARDS="nvidia"
      Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

      I got the latest SVN and used gdb:
      drslony@budgie ~/.panini $ gdb ./Panini
      GNU gdb 6.8
      Copyright (C) 2008 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "x86_64-pc-linux-gnu"...
      (gdb) r
      Starting program: /home/drslony/.panini/Panini
      [Thread debugging using libthread_db enabled]
      [New Thread 0x7ff0529ce790 (LWP 29649)]

      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7ff0529ce790 (LWP 29649)]
      0x0000003a593950e4 in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      (gdb) bt
      #0  0x0000003a593950e4 in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #1  0x0000003a5934ecb3 in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #2  0x0000003a595253c0 in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #3  0x0000003a58ee5379 in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #4  0x0000003a58ee539d in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #5  0x0000003a58e7a8cb in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #6  0x0000003a58e7af85 in ?? () from /usr/lib64/opengl/nvidia/lib/libGLcore.so.1
      #7  0x000000000041152e in pvQtView::paintGL (this=0x16a73f0) at src/pvQtView.cpp:861
      #8  0x0000003b51a1f9e4 in QGLWidget::glDraw () from /usr/lib/qt4/libQtOpenGL.so.4
      #9  0x0000000000411972 in pvQtView::resizeGL (this=0x16a73f0, width=640, height=448) at src/pvQtView.cpp:880
      #10 0x0000003b51a4c568 in QGLWidget::resizeEvent () from /usr/lib/qt4/libQtOpenGL.so.4
      #11 0x0000003b4c9e167a in QWidget::event () from /usr/lib/qt4/libQtGui.so.4
      #12 0x0000003b51a22024 in QGLWidget::event () from /usr/lib/qt4/libQtOpenGL.so.4
      #13 0x0000003b4c99cfe5 in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
      #14 0x0000003b4c9a4342 in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
      #15 0x0000003521d1c78e in QCoreApplication::notifyInternal () from /usr/lib/qt4/libQtCore.so.4
      #16 0x0000003b4c9dcd94 in QWidgetPrivate::sendPendingMoveAndResizeEvents () from /usr/lib/qt4/libQtGui.so.4
      #17 0x0000003b4c9e21d5 in QWidgetPrivate::show_helper () from /usr/lib/qt4/libQtGui.so.4
      #18 0x0000003b4c9e2802 in QWidget::setVisible () from /usr/lib/qt4/libQtGui.so.4
      #19 0x0000003b4c9e2615 in QWidgetPrivate::showChildren () from /usr/lib/qt4/libQtGui.so.4
      #20 0x0000003b4c9e21f1 in QWidgetPrivate::show_helper () from /usr/lib/qt4/libQtGui.so.4
      #21 0x0000003b4c9e2802 in QWidget::setVisible () from /usr/lib/qt4/libQtGui.so.4
      #22 0x0000003b4c9e2615 in QWidgetPrivate::showChildren () from /usr/lib/qt4/libQtGui.so.4
      #23 0x0000003b4c9e21f1 in QWidgetPrivate::show_helper () from /usr/lib/qt4/libQtGui.so.4
      #24 0x0000003b4c9e2802 in QWidget::setVisible () from /usr/lib/qt4/libQtGui.so.4
      #25 0x000000000040b533 in QWidget::show (this=0x1659610) at /usr/include/qt4/QtGui/qwidget.h:473
      #26 0x000000000040b47d in main (argc=1, argv=0x7fff5aa09668) at src/main.cpp:30
      (gdb) q
      The program is running.  Exit anyway? (y or n) y

      Regards

       
    • Tom Sharpless
      Tom Sharpless
      2009-06-18

      Probably a video driver issue.  Small Likelihood that my code is at fault, since it runs OK on other 64 bit Linux, including my Ubuntu/AMD64/nvidia system.  And the fault is 7 call levels inside the nvidia OpenGL library.

      The backtrace shows that OpenGL is failing the first time it is asked to execute a display list that would show the wire frame  panosphere.  So either that list was compiled wrong by the OpenGL library, or the library cannor execute it correctly.

      Or -- remotely possible -- my code contains a bad index number that points inside allocated memory on my system and many others, but outside it on yours.

      Try updating your nvidia drivers and see what happens.

       
    • DrSlony
      DrSlony
      2009-06-18

      I have always used the latest nvidia drivers, and as I first tried to run this long before my first bug report, it has segfaulted on many nvidia driver versions, not just my current 180.60. All other opengl programs work fine.

      If there's anything else you want me to try, feel free to tell, I'd really like to try this tool. I now 'use' the svn version so I can quickly try any fixes you implement.

       
    • DrSlony
      DrSlony
      2009-06-18

      ps. I now use gcc-4.3.2-r3, I also have gcc-4.1.2 installed. It's also very possible that I tried compiling panini using other versions, since I did switch to this newer GCC this year some time, very possibly after first trying panini.

       
    • DrSlony
      DrSlony
      2009-06-30

      Latest SVN as of today, 2009-06-30, still segfaults.

      I use glibc-2.10.1, someone said that using it on a 64bit system can cause strange things to happen. Every other program I use works fine, never had trouble with it. Could this segfault be related to that glibc version in any way?

       
      • Tom Sharpless
        Tom Sharpless
        2009-07-12

        I have no idea.  You might want to try a glibc version that is "approved" for your system.

        BTW what version of Qt are you using?  I would expect trouble if it is earlier that 4.2.

        Wish I could be more helpful -- Tom

         
        • DrSlony
          DrSlony
          2009-07-20

          glibc-2.10.1
          qt-4.5.2

           
          • Tom Sharpless
            Tom Sharpless
            2009-07-26

            I'm sorry to hear you are still having this problem.  Would you be so kind as to download and build the latest version of Panini (0.7.1) and repeat the gdb backtrace?
            Please confirm that this happens immediately on starting the program. 
            Has any window appeared on the screen?
            Thanks, Tom

             
            • DrSlony
              DrSlony
              2009-08-31

              Hey, sorry for taking so long to reply!

              I tried the latest svn version and it runs fine!

              I get several errors while using Panini, although it seems to work fine:
              While launching Panini - no errors.
              Source > Equirectangular -
              Debug: (6379) findLibraryInternal: plugins should not have a 'lib' prefix: "libkfilemodule.so"
              I click OK
              Debug: (6379) KPluginLoader::load: The plugin "libkfilemodule" doesn't contain a kde_plugin_verification_data structure

              No more errors pop up.

              Regards!

               
    • Tom Sharpless
      Tom Sharpless
      2009-07-26

      I get the impression that there is a huge number of configuration options for nVidia drivers on Gentoo, many involving kernel recompiles.  Have you considered trying to analyze your configuration?  Do all the GLX tools work and report no problems?

       
    • DrSlony
      DrSlony
      2009-08-31

      "I get the impression that there is a huge number of configuration options for nVidia drivers on Gentoo, many involving kernel recompiles. Have you considered trying to analyze your configuration? Do all the GLX tools work and report no problems? "

      Yes, everything else worked fine. I use several other apps that make use of 3D. Now Panini runs well :)