Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGABRT on macOS after Dock menu --> Quit #545

Closed
hebasto opened this issue Feb 9, 2022 · 2 comments · Fixed by #547
Closed

SIGABRT on macOS after Dock menu --> Quit #545

hebasto opened this issue Feb 9, 2022 · 2 comments · Fixed by #547
Labels
Bug Something isn't working macOS
Milestone

Comments

@hebasto
Copy link
Member

hebasto commented Feb 9, 2022

macOS Big Sur 11.6.3 (20G415) + master branch (b7942c9):

% src/qt/bitcoin-qt -signet        
zsh: abort      src/qt/bitcoin-qt -signet
% lldb src/qt/bitcoin-qt -- -signet
...
Process 5957 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff2060f92e libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff2060f92e <+10>: jae    0x7fff2060f938            ; <+20>
    0x7fff2060f930 <+12>: movq   %rax, %rdi
    0x7fff2060f933 <+15>: jmp    0x7fff20609ad9            ; cerror_nocancel
    0x7fff2060f938 <+20>: retq   
Target 0: (bitcoin-qt) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff2060f92e libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff2063e5bd libsystem_pthread.dylib`pthread_kill + 263
    frame #2: 0x00007fff20593406 libsystem_c.dylib`abort + 125
    frame #3: 0x00000001016f9ca9 QtCore`___lldb_unnamed_symbol171$$QtCore + 9
    frame #4: 0x0000000101a28608 QtCore`QMessageLogger::fatal(char const*, ...) const + 196
    frame #5: 0x0000000101a28abe QtCore`___lldb_unnamed_symbol4042$$QtCore + 46
    frame #6: 0x00000001017015a8 QtCore`QThread::~QThread() + 152
    frame #7: 0x000000010006fcfe bitcoin-qt`RPCConsole::~RPCConsole(this=0x000000010a8b9600) at rpcconsole.cpp:605:1 [opt]
    frame #8: 0x0000000100070030 bitcoin-qt`RPCConsole::~RPCConsole() [inlined] RPCConsole::~RPCConsole(this=0x000000010a8b9600) at rpcconsole.cpp:585:1 [opt]
    frame #9: 0x000000010007002b bitcoin-qt`RPCConsole::~RPCConsole(this=0x000000010a8b9600) at rpcconsole.cpp:585:1 [opt]
    frame #10: 0x0000000100020109 bitcoin-qt`BitcoinGUI::~BitcoinGUI(this=0x000000010a8a9150) at bitcoingui.cpp:242:5 [opt]
    frame #11: 0x0000000100020340 bitcoin-qt`BitcoinGUI::~BitcoinGUI() [inlined] BitcoinGUI::~BitcoinGUI(this=0x000000010a8a9150) at bitcoingui.cpp:228:1 [opt]
    frame #12: 0x000000010002033b bitcoin-qt`BitcoinGUI::~BitcoinGUI(this=0x000000010a8a9150) at bitcoingui.cpp:228:1 [opt]
    frame #13: 0x000000010000bd52 bitcoin-qt`BitcoinApplication::~BitcoinApplication(this=0x00007ffeefbff8d0) at bitcoin.cpp:247:5 [opt]
    frame #14: 0x000000010000e34c bitcoin-qt`GuiMain(int, char**) [inlined] BitcoinApplication::~BitcoinApplication(this=0x00007ffeefbff8d0) at bitcoin.cpp:244:1 [opt]
    frame #15: 0x000000010000e347 bitcoin-qt`GuiMain(argc=<unavailable>, argv=<unavailable>) at bitcoin.cpp:659:1 [opt]
    frame #16: 0x00007fff20659f3d libdyld.dylib`start + 1
    frame #17: 0x00007fff20659f3d libdyld.dylib`start + 1
...
@hebasto hebasto added Bug Something isn't working macOS labels Feb 9, 2022
@hebasto
Copy link
Member Author

hebasto commented Feb 9, 2022

Hmm, git bisect points at f3a17bb.

@hebasto
Copy link
Member Author

hebasto commented Feb 9, 2022

Apparently, for the following connection the signal is not emitted

connect(quitAction, &QAction::triggered, this, &BitcoinGUI::quitRequested);

@bitcoin-core bitcoin-core deleted a comment Feb 9, 2022
@hebasto hebasto added this to the 23.0 milestone Feb 12, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this issue Feb 22, 2022
…andle QEvent::Quit

e7fc506 qt: Override BitcoinApplication::event() to handle QEvent::Quit (Hennadii Stepanov)

Pull request description:

  bitcoin-core/gui#336 introduced a regression when termination requests from a platform are not handled properly.

  This PR fixes this regression. On macOS shutdown after clicking "Quit" in Dock icon menu, and during logout works again.

  Fixes bitcoin-core/gui#545.

ACKs for top commit:
  RandyMcMillan:
    tACK e7fc506
  Sjors:
    tACK e7fc506 (rebased on master) indeed fixes the crash described in #545
  promag:
    Tested ACK e7fc506 on macOS 10.15 with Qt 5.15.2.

Tree-SHA512: 236a483dc0828f22999469e133b8ac9f0b6267ec2a27004c3ebaa967689ddb972ea1fa90c1dd41f3bff3d17bf571a707babcef53bd79fd711fda98cfbf120131
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Feb 22, 2023
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Dec 28, 2023
…andle QEvent::Quit

e7fc506 qt: Override BitcoinApplication::event() to handle QEvent::Quit (Hennadii Stepanov)

Pull request description:

  bitcoin-core/gui#336 introduced a regression when termination requests from a platform are not handled properly.

  This PR fixes this regression. On macOS shutdown after clicking "Quit" in Dock icon menu, and during logout works again.

  Fixes bitcoin-core/gui#545.

ACKs for top commit:
  RandyMcMillan:
    tACK e7fc506
  Sjors:
    tACK e7fc506 (rebased on master) indeed fixes the crash described in dashpay#545
  promag:
    Tested ACK e7fc506 on macOS 10.15 with Qt 5.15.2.

Tree-SHA512: 236a483dc0828f22999469e133b8ac9f0b6267ec2a27004c3ebaa967689ddb972ea1fa90c1dd41f3bff3d17bf571a707babcef53bd79fd711fda98cfbf120131
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 1, 2024
…andle QEvent::Quit

e7fc506 qt: Override BitcoinApplication::event() to handle QEvent::Quit (Hennadii Stepanov)

Pull request description:

  bitcoin-core/gui#336 introduced a regression when termination requests from a platform are not handled properly.

  This PR fixes this regression. On macOS shutdown after clicking "Quit" in Dock icon menu, and during logout works again.

  Fixes bitcoin-core/gui#545.

ACKs for top commit:
  RandyMcMillan:
    tACK e7fc506
  Sjors:
    tACK e7fc506 (rebased on master) indeed fixes the crash described in dashpay#545
  promag:
    Tested ACK e7fc506 on macOS 10.15 with Qt 5.15.2.

Tree-SHA512: 236a483dc0828f22999469e133b8ac9f0b6267ec2a27004c3ebaa967689ddb972ea1fa90c1dd41f3bff3d17bf571a707babcef53bd79fd711fda98cfbf120131
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant