Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] Exception when closing the program during an animation
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Exception when closing the program during an animation

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.4k 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.
  • C Offline
    C Offline
    CarolaC
    wrote on last edited by
    #1

    Hello,

    I'm working on a game and I use qml files / Qt Quick for the graphics. The problem is, that I always get an exception when closing the program and an animation is still running. It only happens in debug mode. But I cannot rely on that, so I want to know how to solve this problem. The exception doesn't happen in my code so I can't really find the solution with debugging.

    The exception says "Access violation reading location 0xfeeeff0e" so something must have been already deleted. This is the stack trace:

    Qt5Cored.dll!QCoreApplication::postEvent(QObject * receiver, QEvent * event, int priority) Line 1284 + 0x3 bytes C++

    Qt5Cored.dll!qt_fast_timer_proc(unsigned int timerId, unsigned int __formal, unsigned long user, unsigned int __formal, unsigned int __formal) Line 343 + 0x53 bytes C++

    I'm sorry that I can't provide more information. At first I thought a QTimer would cause it (because it says fast_timer_proc), and I use some timers in my program. But now I'm sure that it has nothing to do with it. I made a small test and added a NumberAnimation in one of my game screens, which was triggered when I clicked on a button. And when I closed the window during the animation, it crashed. So it definitely has to do with animations. It also crashes when I stop the animation before the window closes (I use a QQuickView and provide a slot for the windowClosing() signal).

    Does anyone know how to solve this? Is it a known problem?

    Thanks.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I suggest you run a valgrind (memory) session on this application: I've found it often provides better, more meaningful stack traces than gdb.

      Are you using the newest Qt version?

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        CarolaC
        wrote on last edited by
        #3

        Thanks for your answer. I was using the newest Qt version but I didn't find a solution until Qt 5.4 was released. When I updated to this version, the problem was gone. I still don't know what exactly caused it but now I'm glad that I don't need to fix it anymore :)

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          That is good news. Happy coding! :-)

          (Z(:^

          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