On 10/19/2010 07:08 PM, Peter Kümmel wrote:
Am Dienstag, den 19.10.2010, 17:32 -0400 schrieb Richard Heck:
On 10/19/2010 04:32 PM, Uwe Stöhr wrote:
When exporting I get now tons of this message in the LyX console:

QObject::startTimer: timers cannot be started from another thread
QApplication: Object event filter cannot be in a different thread.

When I first view a file (the Math manual) and then export it
subsequently, I also get this:

QObject::setParent: Cannot set parent, new parent is in a different
thread

I know why this is, I think: LyX wants to ask you if it's OK to
overwrite a file. I see no problems when exporting the first time, but
these kinds of messages when exporting a second time. Seems like a
fairly serious issue, and one I have no idea how to solve. Maybe someone
else does.
Exporting is now done in its own thread what is the reason for all the
warnings.

I think what's happening is this. If you export pdf (say) without there already being a pdf file there, then everything is fine. But if the pdf file exists, then LyX will try to ask the user whether to overwrite. This means creating a dialog as a child of the parent. But the parent, from what I can tell, is in the main thread, and that's not allowed.

I'll paste the full error I get below. As you'll see, LyX crashes here. Here's the backtrace:

0    raise    raise.c    64    0x0000003442e326c5
1    abort    abort.c    92    0x0000003442e33ea5
2    __assert_fail    assert.c    81    0x0000003442e2b7b5
3    ??    /usr/lib64/libX11.so.6    0    0x0000003444e4d02e
4    _XReply    /usr/lib64/libX11.so.6    0    0x0000003444e4d580
5 XGetWindowProperty /usr/lib64/libX11.so.6 0 0x0000003444e2a437
6    XGetWMHints    /usr/lib64/libX11.so.6    0    0x0000003444e2954c
7 QWidgetPrivate::setWindowIcon_sys qwidget_x11.cpp 1511 0x000000313be398fc
8    QWidget::create    qwidget.cpp    1355    0x000000313bdf77dc
9    QWidget::setVisible    qwidget.cpp    7379    0x000000313bdfc636
10    QDialog::setVisible    qdialog.cpp    732    0x000000313c22d60c
11    show    qwidget.h    485    0x000000313c22cb75
12    QDialog::exec    qdialog.cpp    537    0x000000313c22cb75
13 lyx::frontend::Alert::prompt GuiAlert.cpp 171 0x00000000009728f0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14    checkOverwrite    Exporter.cpp    51    0x000000000053460e
15    lyx::copyFile    Exporter.cpp    80    0x000000000053460e
16    lyx::Buffer::doExport    Buffer.cpp    3512    0x0000000000498770
17    lyx::Buffer::doExport    Buffer.cpp    3535    0x0000000000498e4d
18 lyx::frontend::GuiView::GuiViewPrivate::exportAndDestroy GuiView.cpp 2837 0x000000000099f022 19 QtConcurrent::StoredFunctorCall3<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > (*)(lyx::Buffer const*, lyx::Buffer*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), lyx::Buffer const*, lyx::Buffer*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::runFunctor() 0 0x00000000009bce01 20 QtConcurrent::RunFunctionTask<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >::run() 0 0x00000000009c2128 21 QThreadPoolThread::run qthreadpool.cpp 106 0x000000313aa6822f 22 QThreadPrivate::start qthread_unix.cpp 248 0x000000313aa711b5
23    start_thread    pthread_create.c    297    0x0000003443a06a3a
24    clone    clone.S    112    0x0000003442ede77d
25    ??        0    0x0000000000000000

I suppose we must need to pass this message back to the main thread somehow?

We are lucky not to have seen this already. There are calls to Alert::error() in doExport, too.

Richard

====

QObject::setParent: Cannot set parent, new parent is in a different thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Paint device returned engine == 0, type: 2
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5170), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5170), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5170), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5170), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x28b5430), parent's thread is QThread(0x280ccd0), current thread is QThread(0x3d57880)
QPixmap: It is not safe to use pixmaps outside the GUI thread
lyx: Fatal IO error: client killed

lyx: SIGSEGV signal caught!
Sorry, you have found a bug in LyX, hope you have not lost any data.
Please read the bug-reporting instructions in 'Help->Introduction' and send us a bug report, if necessary. Thanks !
Bye.
Error: LyX crashed!
----------------------------------------
SIGSEGV signal caught!
Sorry, you have found a bug in LyX, hope you have not lost any data.
Please read the bug-reporting instructions in 'Help->Introduction' and send us a bug report, if necessary. Thanks !
Bye.
/home/rgheck/bin/lyxsvn: line 4: 6722 Segmentation fault (core dumped) /cvs/lyxsvn/src/lyx -userdir $USERDIR -geometry 1024x1024+100+100 "$@"

Reply via email to