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. Segmentation fault while open a text file
Forum Updated to NodeBB v4.3 + New Features

Segmentation fault while open a text file

Scheduled Pinned Locked Moved Solved General and Desktop
38 Posts 6 Posters 11.9k Views 5 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #25

    I don't think so because I saved the file with 'Application Example' and wanted to load that...

    Yes, with Qt Creater.

    In the error stands something like Dllnowunload
    Is there a DLL missing?

    I am using Windows 10 Insider. Is that the problem maybe?

    K 1 Reply Last reply
    0
    • ? A Former User

      I don't think so because I saved the file with 'Application Example' and wanted to load that...

      Yes, with Qt Creater.

      In the error stands something like Dllnowunload
      Is there a DLL missing?

      I am using Windows 10 Insider. Is that the problem maybe?

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #26

      @HenrikSt. said in Segmentation fault while open a text file:

      I am using Windows 10 Insider. Is that the problem maybe?

      Perhaps.

      I thought you may have started directly and dlls are missing. However, you started from creator. There should be all in place.
      AFAIK the normal file dialog from windows is started from Qt. Therefore, the dialog looks always the same as with other application on your windows.
      Perhaps there is a change of the interface causing the crash. However, I know idea if this is really the case, but it looks like.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #27

        What is your idea?

        K kshegunovK 2 Replies Last reply
        0
        • ? A Former User

          What is your idea?

          K Offline
          K Offline
          koahnig
          wrote on last edited by koahnig
          #28

          @HenrikSt.

          The only idea I have is trying with an official standard version of Windows 10.
          I guess that MS has messed around with their dlls and something is broken for Qt and possibly other apps.

          As a last resort you may try to update Qt to latest 5.8.0 version. If you are lucky it may work there.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • ? A Former User

            What is your idea?

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by
            #29

            I already suggested to use the non-native dialog. Additionally your crash is probably related to you holding a QObject in a QSharedPointer, get us the whole stack trace so we can investigate further. I advise against using QSharedPointer with QObjects exactly for this very same reason - object lifetime is uncontrollable.

            Read and abide by the Qt Code of Conduct

            K 1 Reply Last reply
            1
            • kshegunovK kshegunov

              I already suggested to use the non-native dialog. Additionally your crash is probably related to you holding a QObject in a QSharedPointer, get us the whole stack trace so we can investigate further. I advise against using QSharedPointer with QObjects exactly for this very same reason - object lifetime is uncontrollable.

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #30

              @kshegunov

              He has the same effect with one of the Qt examples.

              However, you are certainly right about non-native dialog.

              Vote the answer(s) that helped you to solve your issue(s)

              kshegunovK 1 Reply Last reply
              0
              • K koahnig

                @kshegunov

                He has the same effect with one of the Qt examples.

                However, you are certainly right about non-native dialog.

                kshegunovK Offline
                kshegunovK Offline
                kshegunov
                Moderators
                wrote on last edited by kshegunov
                #31

                @koahnig said in Segmentation fault while open a text file:

                However, you are certainly right about non-native dialog.

                Perhaps, but my prime culprit is the shared pointer (notice line 11 in the call stack from his screenshot).

                Read and abide by the Qt Code of Conduct

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #32

                  So, have you an open file example with non native dialog?

                  kshegunovK 1 Reply Last reply
                  0
                  • ? A Former User

                    So, have you an open file example with non native dialog?

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by kshegunov
                    #33

                    @HenrikSt. said in Segmentation fault while open a text file:

                    So, have you an open file example with non native dialog?

                    Again, I ask you post the stack trace before digging into that. I don't think your segafault is related to the actual dialog at all, especially since you said you get it with a class from the examples. And I will raise the point again, do you use QSharedPointer and if yes how?

                    Read and abide by the Qt Code of Conduct

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #34

                      I don't think so that I used that

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #35

                        I will reset my PC. I think that the error is there. After that I will inform you!

                        1 Reply Last reply
                        0
                        • ? A Former User

                          I will get this error. And i removed the line @jsulm .

                          Here's a picture:
                          https://1drv.ms/i/s!AqaeHLtTIsoIhOofMu8aGwHVDcerHA

                          K Offline
                          K Offline
                          koahnig
                          wrote on last edited by
                          #36

                          @HenrikSt. said in Segmentation fault while open a text file:

                          Here's a picture:
                          https://1drv.ms/i/s!AqaeHLtTIsoIhOofMu8aGwHVDcerHA

                          @HenrikSt. @kshegunov is referring to the QSharedPointer referenced in the stack trace (line 11) you posted further above.

                          Within the debugger you can go back to a place where the mess actually started with the line in your code.

                          @kshegunov it is not conclusive at the moment that @HenrikSt is actually using QSharedPointer himself. It is probably somewhere deeper in other code. The next lines of the trace would be important to see.

                          Vote the answer(s) that helped you to solve your issue(s)

                          kshegunovK 1 Reply Last reply
                          0
                          • K koahnig

                            @HenrikSt. said in Segmentation fault while open a text file:

                            Here's a picture:
                            https://1drv.ms/i/s!AqaeHLtTIsoIhOofMu8aGwHVDcerHA

                            @HenrikSt. @kshegunov is referring to the QSharedPointer referenced in the stack trace (line 11) you posted further above.

                            Within the debugger you can go back to a place where the mess actually started with the line in your code.

                            @kshegunov it is not conclusive at the moment that @HenrikSt is actually using QSharedPointer himself. It is probably somewhere deeper in other code. The next lines of the trace would be important to see.

                            kshegunovK Offline
                            kshegunovK Offline
                            kshegunov
                            Moderators
                            wrote on last edited by
                            #37

                            @koahnig said in Segmentation fault while open a text file:

                            it is not conclusive at the moment

                            It is not, I agree, that's why I insisted on the stack trace.

                            The next lines of the trace would be important to see.

                            I couldn't agree more, but I'm almost ready to bet my head it's a double deletion because of a QSharedPointer instance. ;)

                            Read and abide by the Qt Code of Conduct

                            1 Reply Last reply
                            1
                            • ? Offline
                              ? Offline
                              A Former User
                              wrote on last edited by
                              #38

                              It works now!

                              I reinstalled Windows 10 clean. So i think there was a problem with Qt and Windows 10 Insider Version.

                              Thanks a lot to all!

                              THis topic is now solved

                              1 Reply Last reply
                              1

                              • Login

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