Skip to content

gui: test_bitcoin-qt segfaults on macOS if built from depends #35771

Closed
bitcoin-core/gui
#951

Description

@fanquake

master at bc49bd1

make -C depends
cmake -B build -G Ninja -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DBUILD_UTIL_CHAINSTATE=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON -DBUILD_KERNEL_LIB=ON --toolchain=depends/aarch64-apple-darwin25.5.0/toolchain.cmake
cmake --build build
./build/bin/test_bitcoin-qt
********* Start testing of AppTests *********
Config: Using QtTest library 6.8.4, Qt 6.8.4 (arm64-little_endian-lp64 static release build; by Apple LLVM 21.0.0 (clang-2100.1.1.101)), macos 26.5
PASS   : AppTests::initTestCase()
QINFO  : AppTests::appTests() Backing up GUI settings to "/var/folders/sq/z88fhjzj0b19ftsd2_bjrmjm0000gn/T/test_common bitcoin/70dacd0a11e009dfe424/regtest/guisettings.ini.bak"
QDEBUG : AppTests::appTests() requestInitialize : Requesting initialize
QDEBUG : AppTests::appTests() Running initialization in thread
QDEBUG : AppTests::appTests() initializeResult : Initialization result:  true
QINFO  : AppTests::appTests() Platform customization: "macosx"
QWARN  : AppTests::appTests() This plugin does not support propagateSizeHints()
Received signal 11 (SIGSEGV), code 2, for address 0x0000000000000001
         appTests function time: 208ms, total time: 209ms
[1]    33317 segmentation fault  ./build/bin/test_bitcoin-qt
bt
Process 33526 stopped
* thread #1, name = 'b-test', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
    frame #0: 0x000000018b3bd808 libobjc.A.dylib`objc_msgSend + 8
libobjc.A.dylib`objc_msgSend:
->  0x18b3bd808 <+8>:  ldr    x14, [x0]
    0x18b3bd80c <+12>: and    x16, x14, #0x7ffffffffffff8
    0x18b3bd810 <+16>: mov    x10, x0
    0x18b3bd814 <+20>: movk   x10, #0x6ae1, lsl #48
Target 0: (test_bitcoin-qt) stopped.
(lldb) bt
* thread #1, name = 'b-test', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
  * frame #0: 0x000000018b3bd808 libobjc.A.dylib`objc_msgSend + 8
    frame #1: 0x00000001007b9c54 test_bitcoin-qt`QMacStylePrivate::drawNSViewInRect(NSView*, QRectF const&, QPainter*, void (CGContext*, CGRect const&) block_pointer) const + 224
    frame #2: 0x00000001007bc288 test_bitcoin-qt`QMacStyle::drawPrimitive(QStyle::PrimitiveElement, QStyleOption const*, QPainter*, QWidget const*) const + 1696
    frame #3: 0x000000010054baa4 test_bitcoin-qt`QCommonStyle::drawComplexControl(QStyle::ComplexControl, QStyleOptionComplex const*, QPainter*, QWidget const*) const + 5892
    frame #4: 0x00000001007c5194 test_bitcoin-qt`QMacStyle::drawComplexControl(QStyle::ComplexControl, QStyleOptionComplex const*, QPainter*, QWidget const*) const + 3656
    frame #5: 0x00000001005f8144 test_bitcoin-qt`QGroupBox::paintEvent(QPaintEvent*) + 196
    frame #6: 0x0000000100526514 test_bitcoin-qt`QWidget::event(QEvent*) + 112
    frame #7: 0x00000001005f855c test_bitcoin-qt`QGroupBox::event(QEvent*) + 944
    frame #8: 0x00000001004e3d38 test_bitcoin-qt`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 336
    frame #9: 0x00000001004e4d00 test_bitcoin-qt`QApplication::notify(QObject*, QEvent*) + 468
    frame #10: 0x000000010101add4 test_bitcoin-qt`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 188

I assume this is related to bitcoin-core/gui#950, which re-enabled the tests.

Activity

  1. hebasto commented on Jul 22, 2026

    @hebasto
    Member

    Confirmed. Debugging...

  2. added this to the 32.0 milestone on Jul 22, 2026
  3. maflcko commented on Jul 22, 2026

    @maflcko
    Member

    Fixed in bitcoin-core/gui#951

    You can work around it via QT_STYLE_OVERRIDE=fusion for now.

  4. willcl-ark commented on Jul 22, 2026

    @willcl-ark
    Member

    I am also working on a branch to run test_bitcoin-qt and test_bitcoin from the cross builds in CI, so we have better coverage of some of the binaries being built in these jobs...

  5. added a commit that references this issue on Jul 22, 2026
  6. added a commit that references this issue on Jul 26, 2026
  7. added a commit that references this issue on Aug 19, 2026
  8. added a commit that references this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions