Opened 8 years ago

Closed 4 years ago

#3009 closed defect (fixed)

"Quit GRASS GIS" button only exits GUI

Reported by: cmbarton Owned by: grass-dev@…
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)

GRASS_quit_dialog.png (22.1 KB ) - added by cmbarton 8 years ago.
Quit GRASS dialog

Download all attachments as: .zip

Change History (14)

by cmbarton, 8 years ago

Attachment: GRASS_quit_dialog.png added

Quit GRASS dialog

comment:1 by annakrat, 8 years ago

Platform: UnspecifiedMacOSX

Yes, other platforms work.

comment:2 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:3 by neteler, 6 years ago

Milestone: 7.0.67.0.7

comment:4 by martinl, 5 years ago

Still relevant?

comment:5 by cmbarton, 5 years ago

Yes. Quit GRASS button does not work on the Mac

comment:6 by martinl, 5 years ago

Milestone: 7.0.77.6.2

comment:7 by nila, 4 years ago

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 by nila, 4 years ago

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 by nila, 4 years ago

I was wrong in my previous assessment.

Now I found the bug and the PR#408 may fix this issue.

in reply to:  8 comment:10 by annakrat, 4 years ago

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 and self._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 by neteler, 4 years ago

Milestone: 7.6.27.8.3

comment:12 by nila, 4 years ago

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 by nila, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.