Hi, I was trying out Qt4.5.3 with the qt-ruby bindings. Once Qt's event loop is started, it's no longer possible to execute another thread from within ruby without segfaulting on a problem in libthr. Can anybody point out how to proceed debugging this? Used source and gdb backtrace are down below. -- RK FreeBSD-current (22-12-09) Qt 4.5.3 from ports (22-12-09) kdebindings-trunk (22-12-09) > gdb ruby19 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run test.rb Starting program: /usr/local/bin/ruby19 test.rb [New LWP 100172] [New Thread 8010041c0 (LWP 100172)] [New Thread 80100ae40 (LWP 100175)] [Thread 80100ae40 (LWP 100175) exited] [New Thread 80753e200 (LWP 100175) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 80753e200 (LWP 100175)] 0x0000000800505dc5 in _rtld_error () from /libexec/ld-elf.so.1 (gdb) bt #0 0x0000000800505dc5 in _rtld_error () from /libexec/ld-elf.so.1 #1 0x000000080050658b in dladdr () from /libexec/ld-elf.so.1 #2 0x0000000800506663 in dladdr () from /libexec/ld-elf.so.1 #3 0x00000008005037dd in ?? () from /libexec/ld-elf.so.1 #4 0x0000000800544c00 in ?? () #5 0x0000000000000000 in ?? () #6 0x00000008012399c0 in ?? () #7 0x00007fffffbfc710 in ?? () #8 0x0000000000000006 in ?? () #9 0x0000000801934ce2 in typeinfo name for QEvent () from /usr/local/lib/qt4/libQtCore.so.4 #10 0x0000000000000000 in ?? () #11 0x0000000000000001 in ?? () #12 0x0000000000000004 in ?? () #13 0x0000000000000206 in ?? () #14 0x0000000000000000 in ?? () #15 0x0000000800537400 in ?? () #16 0x0000000000000090 in ?? () #17 0x000000080187d011 in qt_native_write () from /usr/local/lib/qt4/libQtCore.so.4 #18 0x000000080187d0aa in qt_sa_sigchld_handler () from /usr/local/lib/qt4/libQtCore.so.4 #19 <signal handler called> #20 0x00000008008ff40c in __error () from /lib/libthr.so.3 #21 0x00000008008fd505 in pthread_cond_signal () from /lib/libthr.so.3 #22 0x0000000800765b33 in thread_timer (dummy=Variable "dummy" is not available. ) at thread_pthread.c:122 #23 0x00000008008f55b1 in pthread_getprio () from /lib/libthr.so.3 #24 0x0000000000000000 in ?? () #25 0x0000000000000000 in ?? () #26 0x0000000000000000 in ?? () #27 0x0000000000000000 in ?? () #28 0x0000000000000000 in ?? () #29 0x0000000000000000 in ?? () #30 0x0000000000000000 in ?? () --------- test.rb require 'Qt4' puts `date` module MyQt class MainWindow < Qt::MainWindow slots 'slotTest()' def conf(app) _at_actionQuit = Qt::Action.new(self) _at_actionQuit.setText("quit") _at_actionQuit.setShortcut("Ctrl+q") _at_actionTest = Qt::Action.new(self) _at_actionTest.setText("test") _at_actionTest.setShortcut("Ctrl+t") _at_menubar = Qt::MenuBar.new(self) ; _at_menubar.setObjectName("menubar") _at_menubar.setGeometry(Qt::Rect.new(0,0,400,28)) setMenuBar(_at_menuBar) _at_menuProgram = Qt::Menu.new(_at_menubar) _at_menuProgram.setTitle("Program") _at_menubar.addAction(_at_menuProgram.menuAction()) _at_menuProgram.addAction(_at_actionTest) _at_menuProgram.addAction(_at_actionQuit) Qt::MetaObject.connectSlotsByName(self) Qt::Object.connect(_at_actionTest, SIGNAL('activated()'), self, SLOT('slotTest()')) Qt::Object.connect(_at_actionQuit, SIGNAL('activated()'), app, SLOT('quit()')) end def slotTest puts `date` #puts "testing" STDOUT.flush end end end app = Qt::Application.new(0,[]) mainWindow = MyQt::MainWindow.new() mainWindow.conf(app) mainWindow.show app.exec ----------Received on Wed Dec 23 2009 - 14:59:46 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC