cell deep copy and paste in new layout produces an error in 0.29.7

When I copy a cell using deep copy from one layout to another, I get a crash dump. I have attached the message. I don't know if this is a bug or if I am doing something wrong.

Comments

  • edited September 2024

    Hello,

    I could reproduce the problem on Linux.

    KLayout: 0.29.7 (r2d4f5d822)
    OS: Linux Mint 20.3
    g++: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
    Qt: 5.15.7 (source build)
    Ruby: 3.1.3p185 (source build)
    Python: 3.12.6+ (heads/3.12:c6f3f83d888) (source build)
    

    The crash log and Valgrind output are attached.

    :
    :
    ==1173891== 1 errors in context 1 of 3724:
    ==1173891== Invalid read of size 8
    ==1173891==    at 0x1109C328: db::Cell::begin_parent_cells() const (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_db.so.0.29.7)
    ==1173891==    by 0x110A1E04: db::Cell::collect_caller_cells(std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >&, int) const (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_db.so.0.29.7)
    ==1173891==    by 0x110BE495: db::ClipboardData::do_insert(db::Layout&, db::complex_trans<int, int, double> const*, db::Cell*, std::vector<unsigned int, std::allocator<unsigned int> >*, db::ClipboardDataInsertReceiver*) const (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_db.so.0.29.7)
    ==1173891==    by 0x12D00437: lay::HierarchyControlPanel::paste() (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_layui.so.0.29.7)
    ==1173891==    by 0x12D7E1BC: lay::LayoutViewFunctions::cm_cell_paste() (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_layui.so.0.29.7)
    ==1173891==    by 0x12D85993: lay::LayoutViewFunctions::menu_activated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_layui.so.0.29.7)
    ==1173891==    by 0x100F5EAF: lay::LayoutViewBase::menu_activated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_laybasic.so.0.29.7)
    ==1173891==    by 0x4ED4069: lay::MainWindow::menu_activated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_lay.so.0.29.7)
    ==1173891==    by 0x10028A65: lay::Action::qaction_triggered() (in /home/sekigawa/GitWork/klayout/qt5.bin.linux-64-gcc-release/libklayout_laybasic.so.0.29.7)
    ==1173891==    by 0xE47B66F: void doActivate<false>(QObject*, int, void**) (in /usr/local/Qt-5.15.7/lib/libQt5Core.so.5.15.7)
    ==1173891==    by 0xEE8F955: QAction::triggered(bool) (in /usr/local/Qt-5.15.7/lib/libQt5Widgets.so.5.15.7)
    ==1173891==    by 0xEE92007: QAction::activate(QAction::ActionEvent) (in /usr/local/Qt-5.15.7/lib/libQt5Widgets.so.5.15.7)
    ==1173891==  Address 0x30 is not stack'd, malloc'd or (recently) free'd
    :
    :
    

    macOS Sonoma with Qt5.15.15 MacPorts
    * The problem is reproducible.

  • Thanks for reporting this issue. That's embarrassing. It's side effect of that bugfix https://github.com/KLayout/klayout/issues/1864.

    I have created a ticket: https://github.com/KLayout/klayout/issues/1874

    Kind regards,

    Matthias

  • Hi all.
    I also encountered a crash when copying a cell [shallow copy] and pasting it into a new layout in version 0.29.7.
    After reverting to version 0.29.6, the copy and paste operation succeeded.
    Thanks.

  • Hi,

    I have confirmed that https://github.com/KLayout/klayout/issues/1874 has already fixed this problem.
    The forthcoming maintenance release (0.29.8) will incorporate the modifications.

  • sekigawa-san,
    Thank you for the information. :)

  • edited October 2024

    Yes, exactly. The bug is known and I will try to release a new version soon.

    Sorry for the inconvenience.

    Matthias

Sign In or Register to comment.