Opened 5 years ago
Closed 9 months ago
#3009 closed defect (fixed)
"Quit GRASS GIS" button only exits GUI
Reported by: | cmbarton | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.3 |
Component: | wxGUI | Version: | unspecified |
Keywords: | "quit grass gis button" | Cc: | |
CPU: | Unspecified | Platform: | MacOSX |
Description
For some time, quitting GRASS from the GUI opens a dialog (see attached) with buttons to "Close GUI" and "Quit GRASS GIS".
But both do the same thing: quitting the GUI but not exiting GRASS. At least that is what happens on the Mac. Is this the case on other platforms too?
Attachments (1)
Change History (14)
Changed 5 years ago by
Attachment: | GRASS_quit_dialog.png added |
---|
comment:2 Changed 5 years ago by
Milestone: | 7.0.5 → 7.0.6 |
---|
comment:3 Changed 3 years ago by
Milestone: | 7.0.6 → 7.0.7 |
---|
comment:6 Changed 2 years ago by
Milestone: | 7.0.7 → 7.6.2 |
---|
comment:7 Changed 14 months ago by
This is still an issue with 7.8 branch and master (7.9.dev), with Python 3.8.2 and wxPython 4.0.7.post2.
comment:8 follow-up: 10 Changed 14 months ago by
I believe I have found the cause of this issue.
In gui/wxpython/lmgr/frame.py:2533-2536 GMFrame.OnCloseWindowOrExit()
:
if ret != wx.ID_CANCEL: self._closeWindow(event) if ret == wx.ID_YES: self._quitGRASS()
in self._closeWindow
self (the GMFrame) will be destroyed and self._quitGRASS
will never be reached.
comment:9 Changed 13 months ago by
I was wrong in my previous assessment.
Now I found the bug and the PR#408 may fix this issue.
comment:10 Changed 13 months ago by
Replying to nila:
I believe I have found the cause of this issue.
In gui/wxpython/lmgr/frame.py:2533-2536
GMFrame.OnCloseWindowOrExit()
:if ret != wx.ID_CANCEL: self._closeWindow(event) if ret == wx.ID_YES: self._quitGRASS()in
self._closeWindow
self (the GMFrame) will be destroyed andself._quitGRASS
will never be reached.
Are you sure this is not the case? It seems like that would be a problem. Not sure what the solution would be, perhaps moving the os.kill to the GMApp OnExit? handler.
comment:11 Changed 13 months ago by
Milestone: | 7.6.2 → 7.8.3 |
---|
comment:12 Changed 9 months ago by
This issue has been solved for bash and zsh terminal with PR722.
The cause of the problem is that some shells often ignore SIGTERM when interactive, which is the case - as it seems - for e.g. mac and FreeBSD shells.
Adding a trap "exit" TERM
did the trick.
comment:13 Changed 9 months ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Quit GRASS dialog