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. axis setRange causes read acces violation
Qt 6.11 is out! See what's new in the release blog

axis setRange causes read acces violation

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 566 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.
  • W Offline
    W Offline
    wasawi2
    wrote on last edited by
    #1

    Hi everyone,

    I have a signal triggering a slot (every 100ms) with the following code:

        axisY->setRange(-1, 1);
    

    which causes: Exception thrown: read access violation.

    In the slot there is some 'heavy' processing code to compute and draw some QChart (with some thousands of datapoints). I am wondering why it crashes when calling axis setRange which didn't ever crash in my previous tests (a lighter example drawing charts and remaping axis based on QLineSeries data...). It feels like a threading issue but I have no clue why it crashes now but didn't crash in previous tests...

    Any idea on how to properly debug this?

    All I know is that if i put this line of code at the end of the slot function it crashes. And in a similar example with less processing involved it does not crash.

    Any help is very appreciated!

    Best,
    w

    Christian EhrlicherC 1 Reply Last reply
    0
    • W wasawi2

      Hi everyone,

      I have a signal triggering a slot (every 100ms) with the following code:

          axisY->setRange(-1, 1);
      

      which causes: Exception thrown: read access violation.

      In the slot there is some 'heavy' processing code to compute and draw some QChart (with some thousands of datapoints). I am wondering why it crashes when calling axis setRange which didn't ever crash in my previous tests (a lighter example drawing charts and remaping axis based on QLineSeries data...). It feels like a threading issue but I have no clue why it crashes now but didn't crash in previous tests...

      Any idea on how to properly debug this?

      All I know is that if i put this line of code at the end of the slot function it crashes. And in a similar example with less processing involved it does not crash.

      Any help is very appreciated!

      Best,
      w

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @wasawi2 said in axis setRange causes read acces violation:

      axisY

      I would guess it's an invalid pointer - use a debugger and see where it points to or why exactly the crash is happening.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      W 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        @wasawi2 said in axis setRange causes read acces violation:

        axisY

        I would guess it's an invalid pointer - use a debugger and see where it points to or why exactly the crash is happening.

        W Offline
        W Offline
        wasawi2
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        Exactly. You are right!
        Thank you for your help!

        1 Reply Last reply
        0
        • W wasawi2 has marked this topic as solved on

        • Login

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