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. Strange access violation exception with qt charts

Strange access violation exception with qt charts

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 3.3k 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.
  • TheTugaOneT Offline
    TheTugaOneT Offline
    TheTugaOne
    wrote on last edited by
    #1

    Hello , i am having trouble compiling in visual studio 2017 any examples involving a QChart :
    Unhandled exception at 0x00007FF90DBDCB4C (Qt5Gui.dll) in myproj.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
    The weird part is that this error occurs whenever i create a QChart object (it doesn't matter where or when) so if i delete the line QChart *chart = new QChart(); from the example and add it in a separate class nothing changes . I have also created a new Qt project and added just the QChart module and the same thing happens.
    I have found a way to run the code and i believe it has something to do with the files generated by QtCreator : open qt creator -> build the project -> run it -> now that the program is running in qt creator i can run it in visual studio too until i make any modifications in visual studio then the same problem happens.
    Has anyone had this problem ? any help is welcome!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Any chance you would have other Qt dlls in path ?
      Creator sets up path to the Qt used to build the exe.
      If VS do not use exact same paths , odd stuff can happen.

      TheTugaOneT 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi
        Any chance you would have other Qt dlls in path ?
        Creator sets up path to the Qt used to build the exe.
        If VS do not use exact same paths , odd stuff can happen.

        TheTugaOneT Offline
        TheTugaOneT Offline
        TheTugaOne
        wrote on last edited by
        #3

        @mrjj Hi and thank you for the reply , I'm not sure which path you're referring to .
        "C:\Qt\5.10.1\msvc2017_64" this is the path that i have selected in the qt vs tools -> qt options so yes this path contains the dlls for the other modules

        mrjjM 1 Reply Last reply
        0
        • TheTugaOneT TheTugaOne

          @mrjj Hi and thank you for the reply , I'm not sure which path you're referring to .
          "C:\Qt\5.10.1\msvc2017_64" this is the path that i have selected in the qt vs tools -> qt options so yes this path contains the dlls for the other modules

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @TheTugaOne
          Hi
          I mean from some other Qt application or multiple version of Qt etc.
          It sounds like you/the app might find wrong version sometimes.
          Else im not sure how it can work sometimes and sometimes not.

          TheTugaOneT 1 Reply Last reply
          2
          • mrjjM mrjj

            @TheTugaOne
            Hi
            I mean from some other Qt application or multiple version of Qt etc.
            It sounds like you/the app might find wrong version sometimes.
            Else im not sure how it can work sometimes and sometimes not.

            TheTugaOneT Offline
            TheTugaOneT Offline
            TheTugaOne
            wrote on last edited by
            #5

            @mrjj The application doesn't work constantly , as i mentioned every time i create a QChart object and i try to run it i get the access violation exception . What i wrote in the last paragraph is a workaround i found.
            My problem is very similar to the one posted on this thread https://forum.qt.io/topic/84500/qt-charts-access-violation-exception which was also unresolved.

            1 Reply Last reply
            0
            • TheTugaOneT Offline
              TheTugaOneT Offline
              TheTugaOne
              wrote on last edited by
              #6

              If anyone is reading this in the future i managed to resolve the problem by removing qt5charts.dll from the additional dependencies ,leaving only qt5chartsd.dll . Steps: right click on project -> properties -> configuration properties ->linker -> input -> modify additional dependencies and remove Qt5Charts.dll
              I'm not sure what the problem was so if anyone has any idea what caused the errors then please leave a reply.

              mrjjM 1 Reply Last reply
              3
              • TheTugaOneT TheTugaOne

                If anyone is reading this in the future i managed to resolve the problem by removing qt5charts.dll from the additional dependencies ,leaving only qt5chartsd.dll . Steps: right click on project -> properties -> configuration properties ->linker -> input -> modify additional dependencies and remove Qt5Charts.dll
                I'm not sure what the problem was so if anyone has any idea what caused the errors then please leave a reply.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @TheTugaOne
                Hi
                The DLLS with d in name are debug version of the dll.

                Mixing release code and debug code can also crash.

                1 Reply Last reply
                4

                • Login

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