how to solve this segment fault bug?

明覺 shi.minjue at gmail.com
Tue May 12 05:45:49 BST 2009


On Sun, May 10, 2009 at 2:04 PM, taha abderrahman <taha_ab at yahoo.fr> wrote:
>
> Hi all,
> This crash seems to be due to a bug introduced with mesa 7.4 and which affects some amd64 architecture. As far as I know, Downgrading mesa to the previous 7.3 version should resolve this problem.
> Informations gathered from:
> https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/355103
> https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/356940/
> Hope this can help.

yes, you are right, so I installed
http://www.mesa3d.org/beta/MesaLib-7.6-devel-20090501.tar.gz
into /usr to overwrite the old mesa-7.4.1, the previous "seg fault" error
disappear, but another new one appear, seems to be associated with the
glLightfv function, here is the gdb info:
------------------------------------------------------------------------------------------------------------------------------
minjue:~/workspace/k3dsurf/k3dsurf-0.6.2/bin# gdb k3dsurf
GNU gdb (GDB) 6.8.50.20090106-cvs-debian
This GDB was configured as "x86_64-linux-gnu".
(gdb) break glviewer.cpp:740
Breakpoint 1 at 0x472920: file glviewer.cpp, line 740. (2 locations)
(gdb) run
Starting program: /root/workspace/k3dsurf/k3dsurf-0.6.2/bin/k3dsurf
[Thread debugging using libthread_db enabled]

Breakpoint 1, OpenGlWidget (this=0xa34a10, parent=<value optimized out>,
   name=<value optimized out>) at glviewer.cpp:740
740        glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
(gdb) print GL_LIGHT0
No symbol "GL_LIGHT0" in current context.
(gdb) print GL_AMBIENT
No symbol "GL_AMBIENT" in current context.
(gdb) print ambient
$1 = {0, 0, -4.28388841e+32, 4.59163468e-41}
(gdb) step
736        GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 };
(gdb)
740        glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
(gdb)
734        GLfloat ambient[] = { .0, .0, .0, 1.0 };
(gdb)
735        GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
(gdb)
736        GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 };
(gdb)
737        GLfloat local_view[] = { 1.0 };
(gdb)
740        glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5622
5622            pushq   %rdi
Current language:  auto; currently asm
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5623
5623            pushq   %rsi
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5624
5624            pushq   %rdx
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5625
5625            call    _x86_64_get_dispatch at PLT
(gdb)
_x86_64_get_dispatch () at ../../../src/mesa/x86-64/glapi_x86-64.S:76
76              movq    _gl_DispatchTSD(%rip), %rdi
(gdb)
77              jmp     pthread_getspecific at PLT
(gdb)
0x00007ffff6524840 in pthread_getspecific () from /lib/libpthread.so.0
(gdb)
Single stepping until exit from function pthread_getspecific,
which has no line number information.
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5626
5626            popq    %rdx
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5627
5627            popq    %rsi
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5628
5628            popq    %rdi
(gdb)
glLightfv () at ../../../src/mesa/x86-64/glapi_x86-64.S:5629
5629            movq    1280(%rax), %r11
(gdb)
5630            jmp     *%r11
(gdb)

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()


> Cheers,
> Taha
>
>> From: 明覺 <shi.minjue at gmail.com>
>> Subject: how to solve this segment fault bug?
>> To: kdevelop at barney.cs.uni-potsdam.de
>> Cc: cyril.brulebois at enst-bretagne.fr, taha_ab at yahoo.fr
>> Received: Saturday, May 9, 2009, 2:56 PM
>> I'm studying a software named
>> k3dsurf, which is a kdevelop project,
>> here is the source code
>> http://kde-apps.org/content/show.php?content=25049.
>> I have built it by kdevelop 3.5.4 successfully, but when i
>> start it,
>> it says segment fault, here is the gdb info:
>> ------------------------------------------------------------------------------------------------------------------------------
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007ffff5d6da60 in ?? () from /lib/libc.so.6
>> (gdb) bt
>> #0  0x00007ffff5d6da60 in ?? () from /lib/libc.so.6
>> #1  0x00007ffff6ec4671 in glXWaitX () at
>> glxcmds.c:660
>> #2  0x00007ffff790c2a1 in
>> QGLWidget::resizeEvent(QResizeEvent*) ()
>>    from /usr/lib/libqt-mt.so.3
>> #3  0x00007ffff772f07b in QWidget::event(QEvent*) ()
>>    from /usr/lib/libqt-mt.so.3
>> #4  0x00007ffff76a8953 in
>> QApplication::internalNotify(QObject*, QEvent*) ()
>>    from /usr/lib/libqt-mt.so.3
>> #5  0x00007ffff76a962e in
>> QApplication::notify(QObject*, QEvent*) ()
>>    from /usr/lib/libqt-mt.so.3
>> #6  0x00007ffff76aa03a in
>> QApplication::sendPostedEvents(QObject*, int) ()
>>    from /usr/lib/libqt-mt.so.3
>> #7  0x00007ffff773018d in QWidget::show() () from
>> /usr/lib/libqt-mt.so.3
>> #8  0x00007ffff772e5d1 in QWidget::showChildren(bool)
>> ()
>>    from /usr/lib/libqt-mt.so.3
>> #9  0x00007ffff7730260 in QWidget::show() () from
>> /usr/lib/libqt-mt.so.3
>> #10 0x00007ffff772e5d1 in QWidget::showChildren(bool) ()
>>    from /usr/lib/libqt-mt.so.3
>> #11 0x00007ffff7730260 in QWidget::show() () from
>> /usr/lib/libqt-mt.so.3
>> #12 0x00007ffff78193c9 in QWidgetStack::show() () from
>> /usr/lib/libqt-mt.so.3
>> #13 0x00007ffff772e5d1 in QWidget::showChildren(bool) ()
>>    from /usr/lib/libqt-mt.so.3
>> #14 0x00007ffff7730260 in QWidget::show() () from
>> /usr/lib/libqt-mt.so.3
>> ------------------------------------------------------------------------------------------------------------------------------
>>
>>
>> glxcmds.c is a file of mesa, line 660 of this file is like
>> this:
>> ------------------------------------------------------------------------------------------------------------------------------
>> PUBLIC void glXWaitX(void)
>> {
>>    ......
>> #ifdef GLX_DIRECT_RENDERING
>>     if (gc->driContext) {
>>         int screen;
>>         __GLXDRIdrawable *pdraw =
>> GetGLXDRIDrawable(dpy,
>> gc->currentDrawable, &screen);
>>
>>         if ( pdraw != NULL ) {
>>         __GLXscreenConfigs * const
>> psc = GetGLXScreenConfigs(dpy, screen);
>>         if
>> (psc->driScreen->waitX != NULL)
>> [line 660]
>>     (*psc->driScreen->waitX)(pdraw);
>>     } else
>>         XSync(dpy, False);
>>     return;
>>     }
>> ......
>> ------------------------------------------------------------------------------------------------------------------------------
>>
>> how could i solve this bug? my platform is
>> debian-sid-amd64, thanks.
>> (another information is that in i386 environment, there is
>> no the
>> segment fault error, so this is a  issue associated
>> with the amd64
>> platform environment)
>>
>
>
>      __________________________________________________________________
> Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
>



-- 
我的操作系統是Gnu/Linux Debian/gNewSense Gnome Mozilla Gmail/Evolution
Gtkmm/Gtkglextmm Scim Totem Pidgin.




More information about the KDevelop mailing list