texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Qt segfault & debugging issues


From: Norbert Nemec
Subject: [Texmacs-dev] Qt segfault & debugging issues
Date: Sat, 18 Apr 2009 18:25:46 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

Hi there,

I just tried out the latest version of the TeXmacs-Qt bindings. It never worked for me in the past for ever changing reasons. Now this time, I get a segfault as soon as I click on any of the menus. I tried to debug the problem, stumbling over several problems:

* when I just call the -ggdb compiled version within gdb, run it and click on some menu, TeXmacs dies and the gdb displays the segfault. However, TeXmacs seems to keep the keyboard and mouse focus making it impossible to do anything on the X-Server. Only thing i can do is to change to the text-console (Ctrl-Alt-F1) and kill texmacs from there. Afterwards, however, gdb is dead as well and I cannot even produce a backtrace. I found that TeXmacs generally tends to be a bit aggressive in grabbing the focus. Even the non-Qt version tends to interfere badly with KDE quite often.

* I managed to work around the problem by producing a core-dump (via ulimit) and analyse that. I have attached the backtrace. As I understand it, there is a recursive call to processEvent which makes me guess that there is a problem with the event loop in TeXmacs

* Is there a deep reason why the TeXmacs-Qt bindings implement their own event loop instead of using that of Qt? From what I found on the internet, this tends to cause all kinds of problems and people generally advise against it. The code in qt_gui_rep::event_loop does not seem to do anything fancy that could not simply be done by hooking into the regular Qt event loop.

* How do I activate DEBUG_EVENTS?

Greetings,
Norbert
Program terminated with signal 11, Segmentation fault.
#0  0x00007ff3bacd20e6 in __dynamic_cast () from /usr/lib/libstdc++.so.6
(gdb) backtrace
#0  0x00007ff3bacd20e6 in __dynamic_cast () from /usr/lib/libstdc++.so.6
#1  0x00007ff3b71f1d4b in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#2  0x00007ff3b6df5dcd in KStyle::drawControl () from /usr/lib/libkdeui.so.5
#3  0x00007ff3b71eb864 in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#4  0x00007ff3bcd70dd7 in QMenu::paintEvent () from /usr/lib/libQtGui.so.4
#5  0x00007ff3bca2d114 in QWidget::event () from /usr/lib/libQtGui.so.4
#6  0x00007ff3bcd7098b in QMenu::event () from /usr/lib/libQtGui.so.4
#7  0x00007ff3bc9dac3d in QApplicationPrivate::notify_helper () from 
/usr/lib/libQtGui.so.4
#8  0x00007ff3bc9e29ba in QApplication::notify () from /usr/lib/libQtGui.so.4
#9  0x00007ff3bc526d61 in QCoreApplication::notifyInternal () from 
/usr/lib/libQtCore.so.4
#10 0x00007ff3bca2bb4f in QWidgetPrivate::drawWidget () from 
/usr/lib/libQtGui.so.4
#11 0x00007ff3bcb85664 in ?? () from /usr/lib/libQtGui.so.4
#12 0x00007ff3bcb85a49 in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007ff3bca385ff in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007ff3bca45673 in QApplication::x11ProcessEvent () from 
/usr/lib/libQtGui.so.4
#15 0x00007ff3bca6d2c4 in ?? () from /usr/lib/libQtGui.so.4
#16 0x00007ff3b9b930ca in g_main_context_dispatch () from 
/usr/lib/libglib-2.0.so.0
#17 0x00007ff3b9b967a0 in ?? () from /usr/lib/libglib-2.0.so.0
#18 0x00007ff3b9b9693c in g_main_context_iteration () from 
/usr/lib/libglib-2.0.so.0
#19 0x00007ff3bc54f15f in QEventDispatcherGlib::processEvents () from 
/usr/lib/libQtCore.so.4
#20 0x00007ff3bca6ca6f in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007ff3bc525682 in QEventLoop::processEvents () from 
/usr/lib/libQtCore.so.4
#22 0x00007ff3bc52580d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#23 0x00007ff3bcd707e5 in QMenu::exec () from /usr/lib/libQtGui.so.4
#24 0x00007ff3bcdb08c9 in ?? () from /usr/lib/libQtGui.so.4
#25 0x00007ff3bcdb11b1 in QToolButton::qt_metacall () from 
/usr/lib/libQtGui.so.4
#26 0x00007ff3bc53b134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#27 0x00007ff3bcce54ae in ?? () from /usr/lib/libQtGui.so.4
#28 0x00007ff3bcce5683 in QAbstractButton::mousePressEvent () from 
/usr/lib/libQtGui.so.4
#29 0x00007ff3bcdb17e3 in QToolButton::mousePressEvent () from 
/usr/lib/libQtGui.so.4
#30 0x00007ff3bca2d30f in QWidget::event () from /usr/lib/libQtGui.so.4
#31 0x00007ff3bc9dac3d in QApplicationPrivate::notify_helper () from 
/usr/lib/libQtGui.so.4
#32 0x00007ff3bc9e322a in QApplication::notify () from /usr/lib/libQtGui.so.4
#33 0x00007ff3bc526d61 in QCoreApplication::notifyInternal () from 
/usr/lib/libQtCore.so.4
#34 0x00007ff3bc9e25c8 in QApplicationPrivate::sendMouseEvent () from 
/usr/lib/libQtGui.so.4
#35 0x00007ff3bca46be9 in ?? () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#36 0x00007ff3bca45607 in QApplication::x11ProcessEvent () from 
/usr/lib/libQtGui.so.4
#37 0x00007ff3bca6d2c4 in ?? () from /usr/lib/libQtGui.so.4
#38 0x00007ff3b9b930ca in g_main_context_dispatch () from 
/usr/lib/libglib-2.0.so.0
#39 0x00007ff3b9b967a0 in ?? () from /usr/lib/libglib-2.0.so.0
#40 0x00007ff3b9b9693c in g_main_context_iteration () from 
/usr/lib/libglib-2.0.so.0
#41 0x00007ff3bc54f15f in QEventDispatcherGlib::processEvents () from 
/usr/lib/libQtCore.so.4
#42 0x00007ff3bca6ca6f in ?? () from /usr/lib/libQtGui.so.4
#43 0x00007ff3bc527e29 in QCoreApplication::processEvents () from 
/usr/lib/libQtCore.so.4
#44 0x000000000067e711 in qt_gui_rep::event_loop (this=0x1654018) at 
./Plugins/Qt/qt_gui.cpp:195
#45 0x00000000006c48f0 in TeXmacs_main (argc=1, argv=0x7fffc5583428) at 
./Texmacs/Texmacs/texmacs.cpp:233
#46 0x00000000005794db in new_call_back (closure=0x0, argc=1, 
argv=0x7fffc5583428) at ./Guile/Scheme/evaluate.cpp:33
#47 0x00007ff3bbf257df in ?? () from /usr/lib/libguile.so.17
#48 0x00007ff3bbefadfa in ?? () from /usr/lib/libguile.so.17
#49 0x00007ff3bbf64def in scm_c_catch () from /usr/lib/libguile.so.17
#50 0x00007ff3bbefb2c1 in scm_i_with_continuation_barrier () from 
/usr/lib/libguile.so.17
#51 0x00007ff3bbefb360 in scm_c_with_continuation_barrier () from 
/usr/lib/libguile.so.17
#52 0x00007ff3bbf63cc3 in scm_i_with_guile_and_parent () from 
/usr/lib/libguile.so.17
#53 0x00007ff3bbf257a5 in scm_boot_guile () from /usr/lib/libguile.so.17
#54 0x0000000000579c9c in start_guile (argc=1, argv=0x7fffc5583428, 
call_back=0x6c2d00 <TeXmacs_main(int, char**)>) at 
./Guile/Scheme/evaluate.cpp:41
#55 0x00000000006c2cf9 in main (argc=1, argv=0x7fffc5583428) at 
./Texmacs/Texmacs/texmacs.cpp:300

reply via email to

[Prev in Thread] Current Thread [Next in Thread]