segmentation fault

edited December 2010 in KLayout Support
I have finished building klayout 0.21.3

I used this line to build it:

./build.sh -qt /usr/lib64/qt4/ \
-qtinc /usr/lib64/qt4/include/ \
-qtbin /usr/lib64/qt4/bin/ \
-qtlib /usr/lib64/qt4/lib64/ \
-rblib /usr/lib64/libruby.so.1.8 \
-rbinc /usr/lib64/ruby/1.8/x86_64-linux/ \
-platform linux-64-gcc-release \
-build /usr/local/klayout/build

I start the application but whenever I try to open a gds file, I get

klayout: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [x86_64-linux]

Abort


I don't have this issue with 0.20.2 or 0.19.2

# cat /etc/redhat-release

CentOS release 5.5 (Final)

# rpm -qa | grep qt4

qt4-doc-4.2.1-1
qt4-4.2.1-1
qt4-mysql-4.2.1-1
qt4-devel-4.2.1-1
qt4-sqlite-4.2.1-1
qt4-devel-4.2.1-1
qt4-odbc-4.2.1-1
qt4-4.2.1-1
qt4-postgresql-4.2.1-1

# rpm -qa | grep gcc

compat-gcc-34-3.4.6-4
gcc44-4.4.0-6.el5
gcc-java-4.1.2-48.el5
gcc44-c++-4.4.0-6.el5
gcc-c++-4.1.2-48.el5
gcc-objc++-4.1.2-48.el5
compat-libgcc-296-2.96-138
libgcc-4.1.2-48.el5
compat-gcc-34-g77-3.4.6-4
gcc-gnat-4.1.2-48.el5
compat-gcc-34-c++-3.4.6-4
gcc-gfortran-4.1.2-48.el5
gcc-objc-4.1.2-48.el5
libgcc-4.1.2-48.el5
gcc44-gfortran-4.4.0-6.el5
gcc-4.1.2-48.el5

Is there a more helpful log to analyse why it is aborting?

Kind regards

werdina

PS: Build err log

cat err.txt
/home/eda/klayout/5/klayout-0.21.3/src/Makefile.body:577: .dep: No such file or directory
/home/eda/klayout/5/klayout-0.21.3/src/laySession.h:0: Warning: No relevant classes found. No output generated.
/home/eda/klayout/5/klayout-0.21.3/src/layTechSetupDialog.h:0: Warning: No relevant classes found. No output generated.
/home/eda/klayout/5/klayout-0.21.3/src/layDisplayState.h:0: Warning: No relevant classes found. No output generated.
/home/eda/klayout/5/klayout-0.21.3/src/layBookmarkList.h:0: Warning: No relevant classes found. No output generated.
/home/eda/klayout/5/klayout-0.21.3/src/layOASISWriterPlugin.h:0: Warning: No relevant classes found. No output generated.
/home/eda/klayout/5/klayout-0.21.3/src/rdbInfoWidget.h:0: Warning: No relevant classes found. No output generated.
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc: In member function âvoid tl::SelfTimer::report() constâ:
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/tlTimer.cc:133: warning: use of assignment suppression and length modifier together in scanf format
/home/eda/klayout/5/klayout-0.21.3/src/dbLayoutDiff.h:86: warning: âclass db::DifferenceReceiverâ has virtual functions but non-virtual destructor
/home/eda/klayout/5/klayout-0.21.3/src/dbLayoutDiff.cc:696: warning: âclass db::PrintingDifferenceReceiverâ has virtual functions but non-virtual destructor

Comments

  • edited December 2010

    Hi,

    the logs look OK as well as the package list. I assume that gcc 4.4.0 is in your path. The Qt package is somewhat outdated - the oldest one I am testing on is 4.2.3. Although not a lot Qt-related code has changed to 0.21, I had issues with some older Qt versions in the past with similar effects. Is it possible to upgrade to a more recent version (I am using 4.6.2 right now)?

    Beside that, a stack trace would be helpful.

    Best regards,

    Matthias

  • edited November -1
    Thanks for replying Matthias. I shall try and upgrade the Qt version. How does one do a stack trace?
  • edited January 2011

    Hi,

    you can create a stack trace with the GNU debugger (gdb) for example. It usually comes with the gcc package, so I assume you have it already.

    Instead of starting KLayout directly, enter gdb

    cd {where klayout resides}
    gdb ./klayout
    

    on the gdb prompt, enter

    run
    

    After that, KLayout will start. Try to reproduce the problem. When the segmentation fault occurs, gdb will stop the process and present the gdb prompt. You now can create a stack trace with the gdb command

    bt 
    

    The stack trace is instructive because it tells where the fault had happened.

    Best regards,

    Matthias

  • edited January 2011
    Hello Matthias

    Here's the stack trace.

    bin]$ gdb ./klayout
    GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)
    Copyright (C) 2009 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/ops/klayout/klayout-0.21.3/bin/klayout...(no debugging symbols found)...done.
    (gdb) run
    Starting program: /home/ops/klayout/klayout-0.21.3/bin/klayout
    [Thread debugging using libthread_db enabled]
    [New Thread 0x40a00940 (LWP 10067)]
    [New Thread 0x41401940 (LWP 10068)]

    Program received signal SIGSEGV, Segmentation fault.
    0x00000036a3679cba in strncmp () from /lib64/libc.so.6
    (gdb) bt
    #0 0x00000036a3679cba in strncmp () from /lib64/libc.so.6
    #1 0x00000036afc58419 in __xmlParserInputBufferCreateFilename () from /usr/lib64/libxml2.so.2
    #2 0x00000036afcd7115 in xmlNewTextReaderFilename () from /usr/lib64/libxml2.so.2
    #3 0x00000036b2c2fb2e in ?? () from /usr/lib64/libgnomevfs-2.so.0
    #4 0x00000036b2c2fe0a in ?? () from /usr/lib64/libgnomevfs-2.so.0
    #5 0x00000036b2c2fea9 in gnome_vfs_mime_get_value () from /usr/lib64/libgnomevfs-2.so.0
    #6 0x00000036b2c2d52f in gnome_vfs_mime_get_icon () from /usr/lib64/libgnomevfs-2.so.0
    #7 0x00000036b5462394 in gnome_icon_lookup () from /usr/lib64/libgnomeui-2.so.0
    #8 0x00002aaaaf14d0c0 in ?? () from /usr/lib64/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
    #9 0x00002aaaaf14d393 in ?? () from /usr/lib64/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
    #10 0x00000036b2c2a0f2 in ?? () from /usr/lib64/libgnomevfs-2.so.0
    #11 0x00000036b2c2a7e8 in ?? () from /usr/lib64/libgnomevfs-2.so.0
    #12 0x00000036a9a2cdb4 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
    #13 0x00000036a9a2fc0d in ?? () from /lib64/libglib-2.0.so.0
    #14 0x00000036a9a2ff1a in g_main_loop_run () from /lib64/libglib-2.0.so.0
    #15 0x00000036ac2b88ca in gtk_dialog_run () from /usr/lib64/libgtk-x11-2.0.so.0
    #16 0x00002aaaaaffe78d in QGtk::openFilename (parent=0x1c3aa50, caption=<value optimized out>, dir=..., filter=..., selectedFilter=0x0, options=...) at styles/gtksymbols.cpp:807
    #17 0x00002aaaab15ecab in QFileDialog::getOpenFileName (parent=0x1200001c4f, caption=..., dir=..., filter=..., selectedFilter=0x0, options=...) at dialogs/qfiledialog.cpp:1587
    #18 0x0000000000d12415 in lay::FileDialog::get_open(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ()
    #19 0x00000000010aac59 in lay::MainWindow::open(int) ()
    #20 0x000000000134fcdd in lay::MainWindow::qt_metacall(QMetaObject::Call, int, void**) ()
    #21 0x00002aaaab849151 in QMetaObject::activate (sender=0x2047b20, from_signal_index=<value optimized out>, to_signal_index=6, argv=0x6d783f3c) at kernel/qobject.cpp:3111
    #22 0x00002aaaaac9ba47 in QAction::triggered (this=0x7fffffffaa70, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
    #23 0x00002aaaaac9c660 in QAction::activate (this=0x2047b20, event=<value optimized out>) at kernel/qaction.cpp:1160
    #24 0x00002aaaab0be3fa in QMenuPrivate::activateCausedStack (this=0x21486a0, causedStack=..., action=0x2047b20, action_e=Trigger, self=true) at widgets/qmenu.cpp:967
    #25 0x00002aaaab0c47d2 in QMenuPrivate::activateAction (this=0x21486a0, action=0x2047b20, action_e=Trigger, self=true) at widgets/qmenu.cpp:1060
    #26 0x00002aaaaacf3e78 in QWidget::event (this=0x2148b40, event=0x7fffffffbde0) at kernel/qwidget.cpp:7521
    #27 0x00002aaaab0c29f1 in QMenu::event (this=0x2148b40, e=0x7fffffffbde0) at widgets/qmenu.cpp:2353
    #28 0x00002aaaaaca23bf in QApplicationPrivate::notify_helper (this=0x199e370, receiver=0x2148b40, e=0x7fffffffbde0) at kernel/qapplication.cpp:4057
    #29 0x00002aaaaaca7907 in QApplication::notify (this=<value optimized out>, receiver=0x2148b40, e=0x7fffffffbde0) at kernel/qapplication.cpp:3759
    #30 0x00002aaaab834454 in QCoreApplication::notifyInternal (this=0x7fffffffdc88, receiver=0x2148b40, event=0x7fffffffbde0) at kernel/qcoreapplication.cpp:610
    #31 0x00002aaaaaca6c51 in sendSpontaneousEvent (receiver=0x2148b40, event=0x7fffffffbde0, alienWidget=0x0, nativeWidget=0x2148b40, buttonDown=<value optimized out>,
    lastMouseReceiver=...) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
    #32 QApplicationPrivate::sendMouseEvent (receiver=0x2148b40, event=0x7fffffffbde0, alienWidget=0x0, nativeWidget=0x2148b40, buttonDown=<value optimized out>,
    lastMouseReceiver=...) at kernel/qapplication.cpp:2925
    #33 0x00002aaaaad0ac9e in QETWidget::translateMouseEvent (this=0x2148b40, event=<value optimized out>) at kernel/qapplication_x11.cpp:4382
    #34 0x00002aaaaad09b37 in QApplication::x11ProcessEvent (this=0x7fffffffdc88, event=0x7fffffffd590) at kernel/qapplication_x11.cpp:3566
    #35 0x00002aaaaad2fe95 in x11EventSourceDispatch (s=0x19a8390, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
    #36 0x00000036a9a2cdb4 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
    #37 0x00000036a9a2fc0d in ?? () from /lib64/libglib-2.0.so.0
    #38 0x00000036a9a3011e in g_main_context_iteration () from /lib64/libglib-2.0.so.0
    #39 0x00002aaaab85ddde in QEventDispatcherGlib::processEvents (this=0x199b560, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:324
    #40 0x00002aaaaad2fcaf in QGuiEventDispatcherGlib::processEvents (this=0x7fffffffaa70, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
    #41 0x00002aaaab8337e5 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
    #42 0x00002aaaab833b2a in QEventLoop::exec (this=0x7fffffffd920, flags=...) at kernel/qeventloop.cpp:200
    #43 0x00002aaaab8358f4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
    ---Type <return> to continue, or q <return> to quit---
    #44 0x0000000000c991c6 in lay::Application::exec() ()
    #45 0x0000000000ca209b in lay::Application::run() ()
    #46 0x0000000000759bae in main ()
  • edited January 2011

    Hi,

    thank you for the stack trace. It indicates that the problem happens inside GTK's file dialog and does not seem to be related to Qt or KLayout at the first glance.

    Google gave me some hint that libxml2 might be the problem (https://bugs.launchpad.net/ubuntu/+source/libxml2/+bug/149399). It suggests that version 2.6.30 (or greater) of that library should fix the problem. Could you check the version of your libxml2? I use Ubuntu 10.04LTS which comes with 2.7.6.

    Best regards,

    Matthias

  • edited November -1
    Hello Matthias

    I am compiling libxml2 now. The one installed was libxml2 2.6.2. I will let you know how it goes.

    Br

    werd
  • edited November -1
    Hello

    There is absolutely no difference. It is still crashing with the same error. It is now libxml2-2.7.2

    werd
  • edited January 2011

    Hi Werd,

    I admit, I am somewhat helpless now.

    I am quite sure (from your stack trace) that the problem is related to QGtkStyle, but I can't reproduce it, even after explicitly enabling GTK style. What puzzles me is that this style is supposed to work with Qt 4.3 and upward, not with Qt 4.2.1.

    Have you tried using a different style, i.e.

    klayout -style=windows ...

    This should bypass QGtkStyle What happens with this style?

    Best regards,

    Matthias

  • edited March 2011

    Hallo all,

    I similar issue has been reported here: http://klayout.de/forum/comments.php?DiscussionID=104&page=1

    Apparently it helps to build KLayout with the system zlib. See under the link above for a description how to do so.

    Matthias

Sign In or Register to comment.