Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

release 0.21.6: Ruby/Qt bug: Segmentation fault

edited March 2011 in KLayout Support
Hi Matthias,

I compiled the release 0.21.6 on Centos 5.5 w/ Qt-4.7.2 and when I click on File > Open the tools crash w/ a segmentation fault.
I tried to use it w/ 4.5.3 (same thing) and w/ 4.5.1 it is working.

In all cases klayout start and I have the main window.
I can open a layout through File > Open Recent > (select a gds opened previously).
The tool can display the window for Layout Reader Options or the Setup window but when I click on File > Open, it begins to display the window (<1 sec) and crash w/ the msg below.

The Qt 4.5.1 was compiled on Centos 4.7 and the others on Centos 5.5.
The Qt packages come from here:
4.5.1 was from Trolltech site.
ftp://ftp.qt.nokia.com/qt/source/qt-x11-opensource-src-4.5.3.tar.gz
http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.2.tar.gz

OS:
Linux linux27 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:50:31 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

klayout was compiled w/ the following options
./build.sh -qt $TOOLS_ROOT_COM/freeware/gnu/Trolltech/Qt-4.5.3 -rblib /usr/lib64/libruby.so.1.8 -rbinc /usr/lib64/ruby/1.8/x86_64-linux -platform linux-64-gcc-release


% setenv LD_LIBRARY_PATH $QT_ROOT/Qt-4.7.2/lib
% klayout/0.21.6/linux/bin/klayout
klayout: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [x86_64-linux]

Abort

Thanks,
Jo

Comments

  • edited March 2011

    Hi Jo,

    I had a report of a similar issue before: [http://klayout.de/forum/comments.php?DiscussionID=98&page=1#Item_9].

    That case apparently was related to the native file dialog, which was GTk. My suggestion was to try with a different style, i.e.

    klayout -style=windows ...

    In that case I assume the Gtk native file dialog is bypassed. So far I have not received a confirmation whether that helps.

    I am using 4.7.2 with Gnome on Ubuntu 10.04. Unfortunately I am not able to reproduce the problem, even if I explicitly enable GtkStyle with -style=GtkStyle. So I can just guess.

    One hypothesis is: the problem may be caused by the zlib version I was including. You can instruct the build to use the system zlib this way:

    From src/Makefile.body disable line 483 (delete or comment):

    # include $(SOURCE)/contrib/zlib/Makefile.body
    

    In config/Makefile.conf.linux-32-gcc-release or config/Makefile.conf.linux-64-gcc-release add -lz to line 34:

    LIBS=-L$(QTLIB) -lQtGui -lQtCore -lQtXml -lrt -lstdc++ -lcrypt -ldl -lz
    

    If that does not help, are you able to send a trace trace?

    Best regards,

    Matthias

  • edited 3:49PM
    Hi Matthias,

    sorry for the delay in the answer.

    If I use your first suggestion (klayout -style=windows ...), it works (I am also using Gnome).

    I tried (klayout -style=GtkStyle ...) and Oh surprise, it works too !
    but when I start klayout w/o specifying a style, it is crashing...

    Regards,
    Jo
  • edited 3:49PM

    Hi Jo,

    at least that is a workaround.

    I am still suspecting that it's the zlib which causes the problems, although I don't see any problems with the systems I have had so far.

    If by chance you find the time to check if it works with the system zlib I would be interested in the results.

    Best regards,

    Matthias

  • edited 3:49PM
    Hi Matthias,

    I compiled again klayout 0.21.6 w/ the 2 modifs proposed by you:

    ...
    From src/Makefile.body disable line 483 (comment):

    # include $(SOURCE)/contrib/zlib/Makefile.body

    In config/Makefile.conf.linux-64-gcc-release add -lz to line 34:

    LIBS=-L$(QTLIB) -lQtGui -lQtCore -lQtXml -lrt -lstdc++ -lcrypt -ldl -lz

    ...

    and

    ./build.sh -qt $TOOLS_ROOT_COM/freeware/gnu/Trolltech/Qt-4.7.2 -rblib /usr/lib64/libruby.so.1.8 -rbinc /usr/lib64/ruby/1.8/x86_64-linux -platform linux-64-gcc-release

    and now I do not have any more the problem as you were suspecting :-)

    Regards,
    Jo
  • edited 3:49PM

    Hi Jo,

    Thanks, that was very helpful!

    I'll provide a new version of the build script that uses the system zlib as far as possible.

    Best regards,

    Matthias

Sign In or Register to comment.