From 4713e795b6c9508c0e40462e155f90d769708775 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Sun, 30 Aug 2020 14:37:44 +0530 Subject: fixed crash on exception of ngspice taking too long time --- src/frontEnd/Application.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 44616ab7..4edf7a9f 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -532,16 +532,27 @@ class Application(QtWidgets.QMainWindow): break except Exception: pass - time.sleep(0.5) + time.sleep(1) # Fail Safe ===> count += 1 if count >= 10: - raise Exception( + print( "Ngspice taking too long for simulation. " "Check netlist file to change simulation parameters." ) + self.msg = QtWidgets.QErrorMessage() + self.msg.setModal(True) + self.msg.setWindowTitle("Warning Message") + self.msg.showMessage( + 'Ngspice taking too long for simulation. ' + 'Check netlist file to change simulation parameters.' + ) + self.msg.exec_() + + return + # Calling Python Plotting try: self.obj_Mainview.obj_dockarea.plottingEditor() -- cgit