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 crashes
Forum Updated to NodeBB v4.3 + New Features

Qt app crashes

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 3 Posters 909 Views 1 Watching
  • 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.
  • H HenkCoder

    Hello everyone, I'm currently making an app in Qt and now, I have updated to Qt 6.2.0 version and when I try to run it, it crashes immediatly.
    I tried to debug it and this is what it showed:
    67c147b0-cb1d-4132-a9c7-ed2c6163b59d-image.png
    and it opens the qstring.h file:
    ab652ba8-1e44-404d-9890-cbbf8c881482-image.png
    do you guys know why it's telling this?

    artwawA Offline
    artwawA Offline
    artwaw
    wrote on last edited by
    #2

    @HenkCoder Without seeing your code my crystal ball tells me you do operations on the QString that went out of scope or something. Do you try to assign the value to the object/member of who has already been deleted or not initialised?

    For more information please re-read.

    Kind Regards,
    Artur

    H 2 Replies Last reply
    0
    • artwawA artwaw

      @HenkCoder Without seeing your code my crystal ball tells me you do operations on the QString that went out of scope or something. Do you try to assign the value to the object/member of who has already been deleted or not initialised?

      H Offline
      H Offline
      HenkCoder
      wrote on last edited by
      #3

      @artwaw Hello, I can send the code if you want but it's really long, more than 2000 lines in only one file.

      1 Reply Last reply
      0
      • artwawA artwaw

        @HenkCoder Without seeing your code my crystal ball tells me you do operations on the QString that went out of scope or something. Do you try to assign the value to the object/member of who has already been deleted or not initialised?

        H Offline
        H Offline
        HenkCoder
        wrote on last edited by
        #4

        @artwaw I don't know tho, with Qt 6.1.3 version it all worked properly, but now i don't even know where the problem is.

        JonBJ 1 Reply Last reply
        0
        • H HenkCoder

          @artwaw I don't know tho, with Qt 6.1.3 version it all worked properly, but now i don't even know where the problem is.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #5

          @HenkCoder
          Your screenshot shows the final source code line of the crash. What you/we need to see is the stack trace window in the debugger, which should show a list of calls leading back from that to somewhere in your code.

          H 1 Reply Last reply
          0
          • JonBJ JonB

            @HenkCoder
            Your screenshot shows the final source code line of the crash. What you/we need to see is the stack trace window in the debugger, which should show a list of calls leading back from that to somewhere in your code.

            H Offline
            H Offline
            HenkCoder
            wrote on last edited by HenkCoder
            #6

            @JonB
            ae8d718c-9db4-448e-bf05-ade78f3210b0-image.png
            Here's the full window

            JonBJ 1 Reply Last reply
            0
            • H HenkCoder

              @JonB
              ae8d718c-9db4-448e-bf05-ade78f3210b0-image.png
              Here's the full window

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #7

              @HenkCoder
              The bottom-left pane is what we are interested in. It shows the crash is coming in some QFontComboBox, apparently in response to some QComboBox's QLineEdit's text being changed. You do not show the full stack trace, scroll down in that pane to see where it ultimately emanates from in your code, e.g. in main() or whatever. You might check whether your code uses a QFontComboBox anywhere.

              As for why, or what has changed when maybe it worked in a previous Qt version, I do not know. Somebody else may comment....

              H 3 Replies Last reply
              0
              • JonBJ JonB

                @HenkCoder
                The bottom-left pane is what we are interested in. It shows the crash is coming in some QFontComboBox, apparently in response to some QComboBox's QLineEdit's text being changed. You do not show the full stack trace, scroll down in that pane to see where it ultimately emanates from in your code, e.g. in main() or whatever. You might check whether your code uses a QFontComboBox anywhere.

                As for why, or what has changed when maybe it worked in a previous Qt version, I do not know. Somebody else may comment....

                H Offline
                H Offline
                HenkCoder
                wrote on last edited by
                #8

                @JonB Mhh let me search.

                1 Reply Last reply
                0
                • JonBJ JonB

                  @HenkCoder
                  The bottom-left pane is what we are interested in. It shows the crash is coming in some QFontComboBox, apparently in response to some QComboBox's QLineEdit's text being changed. You do not show the full stack trace, scroll down in that pane to see where it ultimately emanates from in your code, e.g. in main() or whatever. You might check whether your code uses a QFontComboBox anywhere.

                  As for why, or what has changed when maybe it worked in a previous Qt version, I do not know. Somebody else may comment....

                  H Offline
                  H Offline
                  HenkCoder
                  wrote on last edited by
                  #9

                  @JonB
                  001705bf-f377-4ba0-9cc7-da329b96b759-image.png
                  here it is the full thing

                  1 Reply Last reply
                  0
                  • JonBJ JonB

                    @HenkCoder
                    The bottom-left pane is what we are interested in. It shows the crash is coming in some QFontComboBox, apparently in response to some QComboBox's QLineEdit's text being changed. You do not show the full stack trace, scroll down in that pane to see where it ultimately emanates from in your code, e.g. in main() or whatever. You might check whether your code uses a QFontComboBox anywhere.

                    As for why, or what has changed when maybe it worked in a previous Qt version, I do not know. Somebody else may comment....

                    H Offline
                    H Offline
                    HenkCoder
                    wrote on last edited by
                    #10

                    @JonB Hello, found out the problem was in here
                    fabbccd6-2d21-488e-a076-69ff507bca82-image.png
                    But i still don't know how to resolve this.
                    In Qt 6.1.3 the code worked fine but now it doesn't.
                    This is the JSON file:

                    {
                        "font": {
                            "family": "Calibri", 
                            "pointSize": 11,
                            "bold": false,
                            "italics": false,
                            "underline": false,
                            "foregroundColor": {
                                "red": 0,
                                "green": 0,
                                "blue": 0
                            },
                            "backgroundColor": {
                                "red": 255,
                                "green": 255,
                                "blue": 255
                            }
                        },
                    
                        "toolBarColor": {
                            "red": 154,
                            "green": 244,
                            "blue": 230
                        },
                        "defaultSavingLocation": "Documents",
                        "defaultOpenLocation": "Documents",
                        "defaultPictureLocation": "Pictures",
                        "darkTheme": false
                    }
                    
                    H 1 Reply Last reply
                    0
                    • H HenkCoder

                      @JonB Hello, found out the problem was in here
                      fabbccd6-2d21-488e-a076-69ff507bca82-image.png
                      But i still don't know how to resolve this.
                      In Qt 6.1.3 the code worked fine but now it doesn't.
                      This is the JSON file:

                      {
                          "font": {
                              "family": "Calibri", 
                              "pointSize": 11,
                              "bold": false,
                              "italics": false,
                              "underline": false,
                              "foregroundColor": {
                                  "red": 0,
                                  "green": 0,
                                  "blue": 0
                              },
                              "backgroundColor": {
                                  "red": 255,
                                  "green": 255,
                                  "blue": 255
                              }
                          },
                      
                          "toolBarColor": {
                              "red": 154,
                              "green": 244,
                              "blue": 230
                          },
                          "defaultSavingLocation": "Documents",
                          "defaultOpenLocation": "Documents",
                          "defaultPictureLocation": "Pictures",
                          "darkTheme": false
                      }
                      
                      H Offline
                      H Offline
                      HenkCoder
                      wrote on last edited by
                      #11

                      @HenkCoder Oh wait, i know the error, I opened a JSON file in the location of the exe + /settings.json but now that I have updated it, it changed.
                      Thank you guys for the help tho.
                      Sorry for my misunderstanding and for wasting your time.

                      artwawA 1 Reply Last reply
                      0
                      • H HenkCoder

                        @HenkCoder Oh wait, i know the error, I opened a JSON file in the location of the exe + /settings.json but now that I have updated it, it changed.
                        Thank you guys for the help tho.
                        Sorry for my misunderstanding and for wasting your time.

                        artwawA Offline
                        artwawA Offline
                        artwaw
                        wrote on last edited by
                        #12

                        @HenkCoder learning opportunity, even if you have to go round in circles for some time, is a time never wasted. Happy you got around to fix it!

                        For more information please re-read.

                        Kind Regards,
                        Artur

                        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