[haiku-commits] haiku: hrev52254 - src/kits/debugger/controllers headers/private/debugger src/apps/debugger/user_interface/gui/utility_windows

  • From: Rene Gollent <rene@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 20 Aug 2018 16:48:56 -0400 (EDT)

hrev52254 adds 2 changesets to branch 'master'
old head: b2cb85f4d5aaeede227abb9abbffecbfbececa58
new head: fc48ae3f8024a729a738657e1464ab0394737901
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=fc48ae3f8024+%5Eb2cb85f4d5aa

----------------------------------------------------------------------------

9ebb7ab42294: Debugger: Fix #14374.
  
  ExpressionPromptWindow:
  - Post a quit requested rather than quitting directly. As a consequence of
    this oversight, the team window would never get the notification that the
    prompt had been closed, and would consequently not reset its internal state
    properly.

fc48ae3f8024: Debugger: Fix #14375, #12343.
  
  TeamDebugger:
  - When a job is aborted, instead of calling into the user interface directly
    to reset the status message, post a message to do so. Also, only post the
    message if we aren't already in a terminating state. Otherwise, if jobs
    were still running while the team debugger is executing its destructor, it
    would attempt to make calls to the already destroyed user interface. This
    bug has likely been with us for quite some time, but was hidden by incorrect
    ref counting in the past (see #12343).

                                         [ Rene Gollent <rene@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 11 insertions(+), 4 deletions(-)
headers/private/debugger/MessageCodes.h                    |  3 ++-
.../gui/utility_windows/ExpressionPromptWindow.cpp         |  2 +-
src/kits/debugger/controllers/TeamDebugger.cpp             | 10 ++++++++--

############################################################################

Commit:      9ebb7ab4229491af1eac87c876ed0cf92d0b8908
URL:         https://git.haiku-os.org/haiku/commit/?id=9ebb7ab42294
Author:      Rene Gollent <rene@xxxxxxxxxxx>
Date:        Mon Aug 20 20:40:59 2018 UTC

Ticket:      https://dev.haiku-os.org/ticket/14374

Debugger: Fix #14374.

ExpressionPromptWindow:
- Post a quit requested rather than quitting directly. As a consequence of
  this oversight, the team window would never get the notification that the
  prompt had been closed, and would consequently not reset its internal state
  properly.

----------------------------------------------------------------------------

diff --git 
a/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
 
b/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
index 554081786b..891d0e67ee 100644
--- 
a/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
+++ 
b/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
@@ -110,7 +110,7 @@ ExpressionPromptWindow::MessageReceived(BMessage* message)
                        addMessage.AddBool("persistent", true);
 
                        BMessenger(fAddTarget).SendMessage(&addMessage);
-                       Quit();
+                       PostMessage(B_QUIT_REQUESTED);
                        break;
                }
 

############################################################################

Revision:    hrev52254
Commit:      fc48ae3f8024a729a738657e1464ab0394737901
URL:         https://git.haiku-os.org/haiku/commit/?id=fc48ae3f8024
Author:      Rene Gollent <rene@xxxxxxxxxxx>
Date:        Mon Aug 20 20:42:55 2018 UTC

Ticket:      https://dev.haiku-os.org/ticket/12343
Ticket:      https://dev.haiku-os.org/ticket/14375

Debugger: Fix #14375, #12343.

TeamDebugger:
- When a job is aborted, instead of calling into the user interface directly
  to reset the status message, post a message to do so. Also, only post the
  message if we aren't already in a terminating state. Otherwise, if jobs
  were still running while the team debugger is executing its destructor, it
  would attempt to make calls to the already destroyed user interface. This
  bug has likely been with us for quite some time, but was hidden by incorrect
  ref counting in the past (see #12343).

----------------------------------------------------------------------------

diff --git a/headers/private/debugger/MessageCodes.h 
b/headers/private/debugger/MessageCodes.h
index 5a22f1f0ec..c092bd707a 100644
--- a/headers/private/debugger/MessageCodes.h
+++ b/headers/private/debugger/MessageCodes.h
@@ -60,7 +60,8 @@ enum {
 
        MSG_GENERATE_DEBUG_REPORT                                       = 
'gdrp',
        MSG_DEBUG_INFO_NEEDS_USER_INPUT                         = 'dnui',
-       MSG_USER_INTERFACE_FILE_CHOSEN                          = 'uifc'
+       MSG_USER_INTERFACE_FILE_CHOSEN                          = 'uifc',
+       MSG_RESET_USER_BACKGROUND_STATUS                        = 'rubs'
 };
 
 
diff --git a/src/kits/debugger/controllers/TeamDebugger.cpp 
b/src/kits/debugger/controllers/TeamDebugger.cpp
index 49f152e90c..61465ee8e0 100644
--- a/src/kits/debugger/controllers/TeamDebugger.cpp
+++ b/src/kits/debugger/controllers/TeamDebugger.cpp
@@ -963,6 +963,12 @@ TeamDebugger::MessageReceived(BMessage* message)
                        break;
                }
 
+               case MSG_RESET_USER_BACKGROUND_STATUS:
+               {
+                       fUserInterface->NotifyBackgroundWorkStatus("Ready.");
+                       break;
+               }
+
                default:
                        BLooper::MessageReceived(message);
                        break;
@@ -2546,8 +2552,8 @@ TeamDebugger::_NotifyUser(const char* title, const char* 
text,...)
 void
 TeamDebugger::_ResetUserBackgroundStatusIfNeeded()
 {
-       if (!fWorker->HasPendingJobs())
-               fUserInterface->NotifyBackgroundWorkStatus("Ready.");
+       if (!fTerminating && !fWorker->HasPendingJobs())
+               PostMessage(MSG_RESET_USER_BACKGROUND_STATUS);
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev52254 - src/kits/debugger/controllers headers/private/debugger src/apps/debugger/user_interface/gui/utility_windows - Rene Gollent