Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MacOs 12.0.1 problems with QtBluetooth
Qt 6.11 is out! See what's new in the release blog

MacOs 12.0.1 problems with QtBluetooth

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 527 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davidesalvetti
    wrote on last edited by
    #1

    Hi everyone,

    I'm having problems running my MacOs application on MacOs Monterey 12.0.1. I'm using Qt 5.15.7 clang 64bit and I have updated Xcode to version 13.2.

    My application can connect to bluetooth classic devices. When I start a new discovery with the command:

    discoveryAgent = new QBluetoothDeviceDiscoveryAgent();
            // Start a discovery
            discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::ClassicMethod);
    

    the application after a few seconds crashes and I don't understand why. With macOS Big Sur I did not see this behaviour. This is the stack trace:

                                                                                                                                                                                                                                
                                                                                                                                                                                                                                
    1   None                                                                            No value                                                                                                                 0x4f52         
    2   -[OSXBTConnectionMonitor connectionNotification:withDevice:]                    osxbtconnectionmonitor.mm                                                                                           121  0x1017c8d44    
    3   __59-[IOBluetoothConcreteUserNotification peerConnected:error:]_block_invoke    (x86_64) /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth                                         0x7ff824d4bbdc 
    4   _dispatch_call_block_and_release                                                (x86_64) /usr/lib/system/libdispatch.dylib                                                                               0x7ff815cb1ad8 
    5   _dispatch_client_callout                                                        (x86_64) /usr/lib/system/libdispatch.dylib                                                                               0x7ff815cb2cc9 
    6   _dispatch_main_queue_callback_4CF                                               (x86_64) /usr/lib/system/libdispatch.dylib                                                                               0x7ff815cbf5d8 
    7   __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__                              (x86_64h) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation                                  0x7ff815f6e5d9 
    8   __CFRunLoopRun                                                                  (x86_64h) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation                                  0x7ff815f2f6ae 
    9   CFRunLoopRunSpecific                                                            (x86_64h) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation                                  0x7ff815f2e52d 
    10  RunCurrentEventLoopInMode                                                       (x86_64) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox      0x7ff81eb4c3e1 
    11  ReceiveNextEventCommon                                                          (x86_64) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox      0x7ff81eb4c137 
    12  _BlockUntilNextEventMatchingListInModeWithFilter                                (x86_64) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox      0x7ff81eb4bed5 
    13  _DPSNextEvent                                                                   (x86_64) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit                                                   0x7ff8189598f0 
    14  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (x86_64) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit                                                   0x7ff818957f5c 
    15  qt_mac_waitForMoreEvents(NSString *)                                            qcocoaeventdispatcher.mm                                                                                            342  0x1042d4356    
    16  QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)     qcocoaeventdispatcher.mm                                                                                            411  0x1042d431b    
    17  QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                qeventloop.cpp                                                                                                      139  0x103ddadef    
    18  QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                         qeventloop.cpp                                                                                                      232  0x103ddadcb    
    19  QCoreApplication::exec()                                                        qcoreapplication.cpp                                                                                                1375 0x103ddf372    
    20  main                                                                            main.cpp                                                                                                            215  0x1005578b5    
    ... <More>                                                                                                                                                                                                                  
    
    

    It looks like a problem with osxbtconnectionmonitor.mm file, in particular when I debug the process it stucks at line 121 of that file. but I cannot understand why.
    The first thing I tried was to update everything (Qt and XCode) but it didn't solve my problem.

    Inside the application output I can see this message before the app crashes:

    [CoreBluetooth] No name or address
    

    Searching on the net I have found this thread:
    https://stackoverflow.com/questions/69661809/no-name-or-address-cbcentralmanager-no-longer-working-on-macos-12

    Anybody knows about this problem? Is there something I can do?

    Thanks in advance!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved