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. qt app crashing without any application code involved
QtWS25 Last Chance

qt app crashing without any application code involved

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 2.4k 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.
  • B Offline
    B Offline
    benPaperspace
    wrote on last edited by
    #1

    qt crashing on mac with the following stack trace:
    looks like non of our application code is involved. any chance someone could shed more light on this please?

    
    Thread 0 Crashed:: CrBrowserMain  Dispatch queue: com.apple.main-thread
    0   libobjc.A.dylib               	0x00007fffca066b5d objc_msgSend + 29
    1   libqcocoa.dylib               	0x00000001176431af -[QNSView drawRect:] + 383
    2   com.apple.AppKit              	0x00007fffb308aaf9 -[NSView _drawRect:clip:] + 2276
    3   com.apple.AppKit              	0x00007fffb30daaab -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753
    4   com.apple.AppKit              	0x00007fffb30daf16 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884
    5   com.apple.AppKit              	0x00007fffb3088632 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837
    6   com.apple.AppKit              	0x00007fffb3089231 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
    7   com.apple.AppKit              	0x00007fffb3087e0f -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334
    8   com.apple.AppKit              	0x00007fffb3086238 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452
    9   com.apple.AppKit              	0x00007fffb3081b25 -[NSView displayIfNeeded] + 1748
    10  com.apple.AppKit              	0x00007fffb3081437 -[NSWindow displayIfNeeded] + 230
    11  com.apple.AppKit              	0x00007fffb37dff3f ___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277
    12  com.apple.AppKit              	0x00007fffb3080f15 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454
    13  com.apple.QuartzCore          	0x00007fffbb12fa96 CA::Transaction::run_commit_handlers(CATransactionPhase) + 46
    14  com.apple.QuartzCore          	0x00007fffbb237800 CA::Context::commit_transaction(CA::Transaction*) + 160
    15  com.apple.QuartzCore          	0x00007fffbb12e631 CA::Transaction::commit() + 475
    16  com.apple.AppKit              	0x00007fffb3363f1d __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323
    17  com.apple.CoreFoundation      	0x00007fffb5420397 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    18  com.apple.CoreFoundation      	0x00007fffb5420307 __CFRunLoopDoObservers + 391
    19  com.apple.CoreFoundation      	0x00007fffb5400f39 __CFRunLoopRun + 873
    20  com.apple.CoreFoundation      	0x00007fffb5400974 CFRunLoopRunSpecific + 420
    21  com.apple.HIToolbox           	0x00007fffb498ca5c RunCurrentEventLoopInMode + 240
    22  com.apple.HIToolbox           	0x00007fffb498c891 ReceiveNextEventCommon + 432
    23  com.apple.HIToolbox           	0x00007fffb498c6c6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
    24  com.apple.AppKit              	0x00007fffb2f325b4 _DPSNextEvent + 1120
    25  com.apple.AppKit              	0x00007fffb36acd6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
    26  com.apple.AppKit              	0x00007fffb2f26f35 -[NSApplication run] + 926
    27  libqcocoa.dylib               	0x000000011764d6bf QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2143
    28  org.qt-project.QtCore         	0x000000010fef89d1 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 401
    29  org.qt-project.QtCore         	0x000000010fefcc35 QCoreApplication::exec() + 341
    30  paperspace.Paperspace         	0x000000010f87f290 main + 11760
    31  libdyld.dylib                 	0x00007fffca958255 start + 1
    
    
    A 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      It could be usefull to know what your application is doing when that happens.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • B benPaperspace

        qt crashing on mac with the following stack trace:
        looks like non of our application code is involved. any chance someone could shed more light on this please?

        
        Thread 0 Crashed:: CrBrowserMain  Dispatch queue: com.apple.main-thread
        0   libobjc.A.dylib               	0x00007fffca066b5d objc_msgSend + 29
        1   libqcocoa.dylib               	0x00000001176431af -[QNSView drawRect:] + 383
        2   com.apple.AppKit              	0x00007fffb308aaf9 -[NSView _drawRect:clip:] + 2276
        3   com.apple.AppKit              	0x00007fffb30daaab -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753
        4   com.apple.AppKit              	0x00007fffb30daf16 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884
        5   com.apple.AppKit              	0x00007fffb3088632 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837
        6   com.apple.AppKit              	0x00007fffb3089231 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
        7   com.apple.AppKit              	0x00007fffb3087e0f -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334
        8   com.apple.AppKit              	0x00007fffb3086238 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452
        9   com.apple.AppKit              	0x00007fffb3081b25 -[NSView displayIfNeeded] + 1748
        10  com.apple.AppKit              	0x00007fffb3081437 -[NSWindow displayIfNeeded] + 230
        11  com.apple.AppKit              	0x00007fffb37dff3f ___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277
        12  com.apple.AppKit              	0x00007fffb3080f15 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454
        13  com.apple.QuartzCore          	0x00007fffbb12fa96 CA::Transaction::run_commit_handlers(CATransactionPhase) + 46
        14  com.apple.QuartzCore          	0x00007fffbb237800 CA::Context::commit_transaction(CA::Transaction*) + 160
        15  com.apple.QuartzCore          	0x00007fffbb12e631 CA::Transaction::commit() + 475
        16  com.apple.AppKit              	0x00007fffb3363f1d __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323
        17  com.apple.CoreFoundation      	0x00007fffb5420397 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
        18  com.apple.CoreFoundation      	0x00007fffb5420307 __CFRunLoopDoObservers + 391
        19  com.apple.CoreFoundation      	0x00007fffb5400f39 __CFRunLoopRun + 873
        20  com.apple.CoreFoundation      	0x00007fffb5400974 CFRunLoopRunSpecific + 420
        21  com.apple.HIToolbox           	0x00007fffb498ca5c RunCurrentEventLoopInMode + 240
        22  com.apple.HIToolbox           	0x00007fffb498c891 ReceiveNextEventCommon + 432
        23  com.apple.HIToolbox           	0x00007fffb498c6c6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
        24  com.apple.AppKit              	0x00007fffb2f325b4 _DPSNextEvent + 1120
        25  com.apple.AppKit              	0x00007fffb36acd6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
        26  com.apple.AppKit              	0x00007fffb2f26f35 -[NSApplication run] + 926
        27  libqcocoa.dylib               	0x000000011764d6bf QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2143
        28  org.qt-project.QtCore         	0x000000010fef89d1 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 401
        29  org.qt-project.QtCore         	0x000000010fefcc35 QCoreApplication::exec() + 341
        30  paperspace.Paperspace         	0x000000010f87f290 main + 11760
        31  libdyld.dylib                 	0x00007fffca958255 start + 1
        
        
        A Offline
        A Offline
        ambershark
        wrote on last edited by
        #3

        @benPaperspace Can we see your main.cpp?

        Also do you perchance have multiple versions of Qt installed on your system?

        And finally, how did you build your app?

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        1
        • B Offline
          B Offline
          benPaperspace
          wrote on last edited by
          #4

          Thanks for replying!

          let me try to answer you questions.

          i got the crash report from a user so i can not tell exactly what he/she was doing before the crash.
          non of the functions in the stack trace except main ofc are from my application so its especially hard to figure out what lead to the crash.

          i was hoping this might be some sort of known problem.

          @ambershark i will ask if i can publish our main.cpp here. stand by pls

          i highly doubt that the user had any sort of qt installed. on my build system i recently switched from 5.7.0 to 5.7.1.
          i uninstalled the old version before installing the new version. i also have a runtime check in the program that would complain if it was not running with qt 5.7.1

          i build the app via command line script
          here is a snippet from the script:

          ~/Qt5.7.1/5.7/clang_64/bin/qmake -o ./build/ PS_QTNativeApp.pro
          cd build
          make
          cd Paperspace
          ~/Qt5.7.1/5.7/clang_64/bin/macdeployqt Paperspace.app
          
          
          A 1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by SGaist
            #5

            Do you have any custom plugin ? Dependency ?

            By the way, what version of macOS does your customer run ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • B benPaperspace

              Thanks for replying!

              let me try to answer you questions.

              i got the crash report from a user so i can not tell exactly what he/she was doing before the crash.
              non of the functions in the stack trace except main ofc are from my application so its especially hard to figure out what lead to the crash.

              i was hoping this might be some sort of known problem.

              @ambershark i will ask if i can publish our main.cpp here. stand by pls

              i highly doubt that the user had any sort of qt installed. on my build system i recently switched from 5.7.0 to 5.7.1.
              i uninstalled the old version before installing the new version. i also have a runtime check in the program that would complain if it was not running with qt 5.7.1

              i build the app via command line script
              here is a snippet from the script:

              ~/Qt5.7.1/5.7/clang_64/bin/qmake -o ./build/ PS_QTNativeApp.pro
              cd build
              make
              cd Paperspace
              ~/Qt5.7.1/5.7/clang_64/bin/macdeployqt Paperspace.app
              
              
              A Offline
              A Offline
              ambershark
              wrote on last edited by
              #6

              @benPaperspace Oh it's on a user's system... That means I have an idea.

              Did you make sure you distributed your application properly? I.e. does it have the platform plugins? This is a crash that could potentially be related to not having or being able to execute the platform plugin.

              Especially since it seems to be crashing in a draw routine.

              If it's a proprietary system for a company it's ok if you don't show your main.cpp. I don't think it will help with the problem that much anyway.

              What happens if you run the same distribution (the one that is crashing) on a fresh OSX install? I use virtual machines for this. If it's a plugin issue it will crash on that machine as well. I assume your company has testing in place and this is part of their testing but just in case it's not, that's a common problem. :)

              My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

              1 Reply Last reply
              0
              • B Offline
                B Offline
                benPaperspace
                wrote on last edited by
                #7

                @SGaist

                QT       += core gui network multimedia webenginewidgets
                macx: LIBS += -framework VideoDecodeAcceleration -framework CoreVideo -framework CoreFoundation -framework Carbon -framework AppKit
                
                

                not sure if that answers all your questions but thats pretty much all the custom stuff we use.
                i have a piece of mac specific code that removes the emoticons entry from the edit menu but that was added so recent that i am pretty sure the customer doesnt have that code yet.

                i am working on getting more detailed crash reports with version info but for now thats all i have

                @ambershark i am distributing the software in a mac dmg file after building it the way described above. it runs without crashes on most of our macs and customer computers
                i can ask my coworkers to try running it on a fresh mac. i am not a mac guy and i only have one system to test on.
                but i am pretty sure we would have noticed if its not running on a fresh mac installation
                anyway i will report back once i have more info about this

                A 1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Carbon ? It's a bit surprising, out of curiosity why do you need it for ?

                  In between, what version of macOS and Xcode are you using to build your application ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • B benPaperspace

                    @SGaist

                    QT       += core gui network multimedia webenginewidgets
                    macx: LIBS += -framework VideoDecodeAcceleration -framework CoreVideo -framework CoreFoundation -framework Carbon -framework AppKit
                    
                    

                    not sure if that answers all your questions but thats pretty much all the custom stuff we use.
                    i have a piece of mac specific code that removes the emoticons entry from the edit menu but that was added so recent that i am pretty sure the customer doesnt have that code yet.

                    i am working on getting more detailed crash reports with version info but for now thats all i have

                    @ambershark i am distributing the software in a mac dmg file after building it the way described above. it runs without crashes on most of our macs and customer computers
                    i can ask my coworkers to try running it on a fresh mac. i am not a mac guy and i only have one system to test on.
                    but i am pretty sure we would have noticed if its not running on a fresh mac installation
                    anyway i will report back once i have more info about this

                    A Offline
                    A Offline
                    ambershark
                    wrote on last edited by
                    #9

                    @benPaperspace said in qt app crashing without any application code involved:

                    i can ask my coworkers to try running it on a fresh mac. i am not a mac guy and i only have one system to test on.

                    This could be the problem. If you have a test system you have setup or fixed the problem (even inadvertently) on then you would miss the crash.

                    But if it's working on most customer's systems, then that is kind of weird. That would make it specific to the customer that is crashing which means it's some kind of configuration conflict with that system and not necessarily a bug in your code. That will be pretty tough for us to help you solve and you'll probably need to work with that specific customer to get more crash logs and try to figure out what is causing it on their system.

                    My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                    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