The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.5k stars 525 forks source link

Avoid GUI crash when trying to open hetamap configuration box #5145

Open gudeh opened 3 months ago

gudeh commented 3 months ago

Describe the bug

When trying to double click a heatmap on the GUI and no design is loaded we get a crash:

OpenROAD v2.0-13890-g319cce5a8 Features included (+) or not (-): +Charts +GPU +GUI +Python This program is licensed under the BSD-3 license. See the LICENSE file for details. Components of this program may be licensed under more restrictive licenses which must be honored. Signal 11 received Stack trace: 0# 0x00006047CBEE54AB in openroad 1# 0x000070B0B1842520 in /lib/x86_64-linux-gnu/libc.so.6 2# odb::dbBlock::getDbUnitsPerMicron() in openroad 3# gui::HeatMapDataSource::showSetup() in openroad 4# gui::DisplayControls::displayItemDblClicked(QModelIndex const&) in openroad 5# 0x000070B0B28F1793 in /lib/x86_64-linux-gnu/libQt5Core.so.5 6# QAbstractItemView::doubleClicked(QModelIndex const&) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 7# QTreeView::mouseDoubleClickEvent(QMouseEvent) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 8# QWidget::event(QEvent) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 9# QFrame::event(QEvent) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 10# QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject, QEvent) in /lib/x86_64-linux-gnu/libQt5Core.so.5 11# QApplicationPrivate::notify_helper(QObject, QEvent) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 12# QApplication::notify(QObject, QEvent) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 13# QCoreApplication::notifyInternal2(QObject, QEvent) in /lib/x86_64-linux-gnu/libQt5Core.so.5 14# QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget*, QWidget*, QPointer&, bool, bool) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 15# 0x000070B0B35C8D40 in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 16# 0x000070B0B35CBFD5 in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 17# QApplicationPrivate::notify_helper(QObject, QEvent) in /lib/x86_64-linux-gnu/libQt5Widgets.so.5 18# QCoreApplication::notifyInternal2(QObject, QEvent) in /lib/x86_64-linux-gnu/libQt5Core.so.5 19# QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent) in /lib/x86_64-linux-gnu/libQt5Gui.so.5 20# QWindowSystemInterface::sendWindowSystemEvents(QFlags) in /lib/x86_64-linux-gnu/libQt5Gui.so.5 21# 0x000070B0ADEF8D6E in /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 22# g_main_context_dispatch in /lib/x86_64-linux-gnu/libglib-2.0.so.0 23# 0x000070B0B1B712B8 in /lib/x86_64-linux-gnu/libglib-2.0.so.0 24# g_main_context_iteration in /lib/x86_64-linux-gnu/libglib-2.0.so.0 25# QEventDispatcherGlib::processEvents(QFlags) in /lib/x86_64-linux-gnu/libQt5Core.so.5 26# QEventLoop::exec(QFlags) in /lib/x86_64-linux-gnu/libQt5Core.so.5 27# QCoreApplication::exec() in /lib/x86_64-linux-gnu/libQt5Core.so.5 28# gui::startGui(int&, char*, Tcl_Interp, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool) in openroad 29# ord::tclAppInit(Tcl_Interp*) in openroad 30# Tcl_MainEx in /lib/x86_64-linux-gnu/libtcl8.6.so 31# main in openroad 32# 0x000070B0B1829D90 in /lib/x86_64-linux-gnu/libc.so.6 33# libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 34# _start in openroad Segmentation fault (core dumped)

Expected Behavior

Make the tool not to crash if there is no design loaded.

Environment

Git commit: 5c702fa8e68b5f258f4eb4cc59ced242b5d3ebb9
kernel: Linux 6.5.0-35-generic
os: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
cmake version 3.24.2
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OpenROAD version: v2.0-13883-g5c702fa8e
-- System name: Linux
-- Compiler: GNU 11.4.0
-- Build type: RELEASE
-- Install prefix: /usr/local
-- C++ Standard: 17
-- C++ Standard Required: ON
-- C++ Extensions: OFF
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test C_COMPILER_SUPPORTS__-Wall
-- Performing Test C_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test C_COMPILER_SUPPORTS__-x
-- Performing Test C_COMPILER_SUPPORTS__-x - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-x
-- Performing Test CXX_COMPILER_SUPPORTS__-x - Failed
-- Performing Test C_COMPILER_SUPPORTS__c++
-- Performing Test C_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__c++
-- Performing Test CXX_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17 - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17 - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- TCL readline library: /usr/lib/x86_64-linux-gnu/libtclreadline.so
-- TCL readline header: /usr/include/x86_64-linux-gnu
-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.2", minimum required is "4.0")  
-- Found Boost: /home/gudeh/.local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0")  
-- boost: 1.80.0
-- Found Python3: /usr/include/python3.10 (found version "3.10.12") found components: Development Development.Module Development.Embed 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- spdlog: 1.8.1
-- Found BISON: /usr/bin/bison (found version "3.8.2") 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- STA version: 2.5.0
-- STA git sha: b71b48ad16590ea7fa144790a2f7ab2ab3d24640
-- System name: Linux
-- Compiler: GNU 11.4.0
-- Build type: RELEASE
-- Build CXX_FLAGS: -O3 -DNDEBUG
-- Install prefix: /usr/local
-- Found FLEX: /usr/bin/flex (found version "2.6.4") 
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- SSTA: 0
-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.2", minimum required is "3.0")  
-- STA executable: /home/gudeh/Desktop/masterCode/tools/OpenROAD/src/sta/app/sta
-- Found re2: /opt/or-tools/lib/cmake/re2/re2Config.cmake (found version "9.0.0") 
-- Found Clp: /opt/or-tools/lib/cmake/Clp/ClpConfig.cmake (found version "1.17.7") 
-- Found Cbc: /opt/or-tools/lib/cmake/Cbc/CbcConfig.cmake (found version "2.10.7") 
-- Found SCIP: /opt/or-tools/lib/cmake/scip/scip-config.cmake (found version "8.0.1") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- GPU is not enabled
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- GUI is enabled
-- Charts widget is enabled
-- Found Boost: /home/gudeh/.local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: serialization 
-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS) 
-- Found Boost: /home/gudeh/.local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.78")  
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- Found Boost: /home/gudeh/.local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: serialization system thread 
-- FouNumber of processor cores: 16
nd Boost: /home/gudeh/.local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0")  
-- Found Eigen3: /home/gudeh/.local/share/eigen3/cmake/Eigen3Config.cmake (found version "3.4.0") 
-- TCL readline enabled
-- Tcl Extended disabled
-- Python3 enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmp.Fu4WxryK4F

To Reproduce

openroad -gui double click any heatmap.

Relevant log output

No response

Screenshots

No response

Additional Context

No response

maliberty commented 3 months ago

@gudeh are you planning to look at this or do you need help from @AcKoucher ?

gudeh commented 3 months ago

@gudeh are you planning to look at this or do you need help from @AcKoucher ?

@AcKoucher just told me to create the issue. I showed the problem on a synch we just did.