[Kde-bindings] [Bug 71316] QtRuby : Segmentation fault when loading Qt

lypanov at kde.org lypanov at kde.org
Sun Dec 28 11:26:25 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=71316     




------- Additional Comments From lypanov at kde.org  2003-12-28 12:26 -------
Subject: Re: [Kde-bindings]  New: QtRuby : Segmentation fault when loading Qt

On Sun, Dec 28, 2003 at 10:54:36AM +0000, Richard Dale wrote:
> On Saturday 27 December 2003 17:01, Fr??d??ric wrote:
> > Version:           3.1.94 (using KDE KDE 3.1.94)
> > Installed from:    Compiled From Sources
> > Compiler:          gcc (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2,
> > propolice) OS:          Linux
> >
> > I've compiled the KDEBINDINGS of KDE3.0beta2 and the last CVS tree for
> > QtRuby (and Kalyptus and Smoke). When I launch any ruby script which
> > requires Qt, I've the following error :
> >
> > bash-2.05b$ ruby canvastest.rb
> > /usr/lib/ruby/site_ruby/1.8/i686-linux-gnu/Qt.so: [BUG] Segmentation fault
> > ruby 1.8.1 (2003-10-31) [i686-linux-gnu]
> >
> > Segmentation fault
> Can you try running under gdb to see where the seg fault is occuring? Alex 
> Kellett has had problems with QtRuby/ruby 1.8 seg faulting in pthreads code, 
> and he was using a more recent gcc than me. He said the workround was to 
> build ruby with pthreads enabled. I have no problem, and I'm using gcc 3.2.2. 
> I think it's some sort of library incompatibility. But I haven't tried ruby 
> 1.8.1 with qtruby yet though.

richard, which qt version are you running?
do you have a x86 box anywhere that you can test on?

my qt version is qt-copy previous to the 3.3 import
therefore, it would be 3.2.3 or so i guess.
my gcc version is also the stable gentoo compiler: gcc 3.2.3 
the actual backtrace i see can be stopped by compiling the
latest versions of ruby (maybe preview 3 or higher, cvs
for certain) with an option which makes it use pthread
locking to stop pthread related problems. 

when i put the seg faulting ruby into gdb (i.e, with a default ruby
compilation, no special flag) i can see a thread being started
for no apparent reason (well, unless gdb is doing this....)
[and shortly after it segfaults.

ruby 1.8 does the same. qt 3.1 on my work machine with the 
rest of the toolkit at exactly the same level as my home
machine (e.g, ruby, gcc, glibc, etc). *works*. no crash
on startup.

i've thought about workarounds for a while. but its 
really not the sort of stuff that i feel like working
on at the moment (wrappers that dlload Qt.so after doing
a pthread lock, blah blah blah)

i'll email the backtrace shortly. and the ruby configure
flag that works around it. and the code that ruby adds
that makes it work.

i've been unable as of yet to find the code in qt which
causes the crash unfortunately. so, i'll try to search for
thread related stuff later on in the week if i'm time.
   
mvg,
Alex



More information about the Kde-bindings mailing list