Skip to content

Conversation

fanquake
Copy link
Member

Should address this comment.

qt_exception

Can be triggered with a diff like:

diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
index 6243a71c7..e5d499012 100644
--- a/src/qt/modaloverlay.cpp
+++ b/src/qt/modaloverlay.cpp
@@ -6,6 +6,7 @@
 #include <qt/forms/ui_modaloverlay.h>
 
 #include <qt/guiutil.h>
+#include <util/check.h>
 
 #include <chainparams.h>
 
@@ -179,6 +180,7 @@ void ModalOverlay::showHide(bool hide, bool userRequested)
 
 void ModalOverlay::closeClicked()
 {
+    CHECK_NONFATAL(false);
     showHide(true);
     userClosed = true;
 }

and clicking close in the modal.

EXCEPTION: 18NonFatalCheckError       
qt/modaloverlay.cpp:183 (closeClicked)
Internal bug detected: 'false'
You may report this issue here: https://github.com/bitcoin/bitcoin/issues

@fanquake fanquake added the GUI label Apr 15, 2020
@fanquake fanquake requested a review from maflcko April 15, 2020 07:47
@jonasschnelli
Copy link
Contributor

Thanks. utACK 1b04302
Bitcoin will soon merge this.

@cvengler
Copy link
Contributor

utACK 1b04302

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1b04302.

@maflcko maflcko added this to the 0.21.0 milestone Apr 15, 2020
@maflcko maflcko merged commit 18f11fb into bitcoin:master Apr 15, 2020
@fanquake fanquake deleted the use_package_name_in_exception branch April 16, 2020 07:08
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Apr 19, 2020
ComputerCraftr pushed a commit to ComputerCraftr/bitcoin that referenced this pull request Jun 10, 2020
1b04302 gui: use PACKAGE_NAME in exception message (fanquake)

Pull request description:

  Should address [this comment](bitcoin#18643 (comment)).

  ![qt_exception](https://user-images.githubusercontent.com/863730/79310875-348bf780-7f2f-11ea-9970-ba1ac28c7849.png)

  Can be triggered with a diff like:
  ```diff
  diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
  index 6243a71..e5d499012 100644
  --- a/src/qt/modaloverlay.cpp
  +++ b/src/qt/modaloverlay.cpp
  @@ -6,6 +6,7 @@
   #include <qt/forms/ui_modaloverlay.h>

   #include <qt/guiutil.h>
  +#include <util/check.h>

   #include <chainparams.h>

  @@ -179,6 +180,7 @@ void ModalOverlay::showHide(bool hide, bool userRequested)

   void ModalOverlay::closeClicked()
   {
  +    CHECK_NONFATAL(false);
       showHide(true);
       userClosed = true;
   }
  ```
  and clicking close in the modal.
  ```bash
  EXCEPTION: 18NonFatalCheckError
  qt/modaloverlay.cpp:183 (closeClicked)
  Internal bug detected: 'false'
  You may report this issue here: https://github.com/bitcoin/bitcoin/issues
  ```

ACKs for top commit:
  jonasschnelli:
    Thanks. utACK 1b04302
  emilengler:
    utACK 1b04302
  hebasto:
    ACK 1b04302.

Tree-SHA512: 20118269882fbbb5602dafe8101c6ca6c92d7b97efc1ef280a68a83c6a58340018d05f837ecabefee618dc11a62e82828d5ecde4350a71a4c2fd24257b90d45c
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 15, 2021
Summary: This is a backport of Core [[bitcoin/bitcoin#18646 | PR18646]]

Test Plan:
```
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
index e5f32fe..c5686cc0d 100644
--- a/src/qt/modaloverlay.cpp
+++ b/src/qt/modaloverlay.cpp
@@ -7,6 +7,7 @@

 #include <chainparams.h>
 #include <qt/guiutil.h>
+#include <util/check.h>

 #include <QPropertyAnimation>
 #include <QResizeEvent>
@@ -197,6 +198,7 @@ void ModalOverlay::showHide(bool hide, bool userRequested) {
 }

 void ModalOverlay::closeClicked() {
+    CHECK_NONFATAL(false);
     showHide(true);
     userClosed = true;
 }
```
Running  `bitcoin-qt` and clicking Hide in the modal causes the exception dialog to appear. Check that it includes "Bitcoin ABC".

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8928
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants