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. Debugging a crash in libQtDeclarative (Qt 4.8.1)
Forum Updated to NodeBB v4.3 + New Features

Debugging a crash in libQtDeclarative (Qt 4.8.1)

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

    Dear all,

    I'm in a desperate situation currently, trying to debug a crash of my application which is seemingly caused within the qt declarative module.
    The crash always happens at the same point, when relatively many C++-Models (ListModels, QList's and single property) trigger an update. Unfortunately I can not reliably trigger the crash, as it seems to happen after some initial interaction, often followed by some time (10-30mins) of inactivity.

    It would be fantastic if someone who had a similar problem could give my some hints on debugging the problem.

    At the moment, all I got is the following backtrace which seems useless:

    #0 0x00007f8f3ca38f1e in ?? () from [...]/libQtDeclarative.so.4
    #1 0x00007f8f3ca3a48c in ?? () from [...]/libQtDeclarative.so.4
    #2 0x00007f8f3ca3b48c in ?? () from [...]/libQtDeclarative.so.4
    #3 0x00007f8f3ca3bdbb in ?? () from [...]/libQtDeclarative.so.4
    #4 0x00007f8f3c05bc7e in ?? () from [...]/libQtScript.so.4
    #5 0x00007f8f3bf528e0 in ?? () from [...]/libQtScript.so.4
    #6 0x00007f8f3bf2cb17 in ?? () from [...]/libQtScript.so.4
    #7 0x00007f8f3433e330 in ?? ()
    #8 0x0000000000000002 in ?? () at gtest-1.6.0/include/gtest/gtest.h:172
    #9 0x00007f8f2e5f2d40 in ?? ()
    #10 0x00007f8f0000000b in ?? ()
    #11 0x00007f8f00000002 in ?? ()
    #12 0x000000000644c430 in ?? ()
    #13 0x000000000000000f in ?? () at gtest-1.6.0/include/gtest/internal/gtest-port.h:1350
    #14 0x0000000000000005 in ?? () at gtest-1.6.0/include/gtest/internal/gtest-port.h:1288
    #15 0x0000000000000000 in ?? ()

    Thanks in advance
    Sandro

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sgiessl
      wrote on last edited by
      #2

      I just wanted to inform you guys about the solution to my problem.

      In summary, the problem seemed to be a C++ / QML-engine interfacing and memory management issue:

      I was lucky enough to identify a small set of candidate revisions of the software which potentially caused the described behavior. In these changes, there was noticeable that in the QML/Javascript code there was a lot of manual fiddling with list models. For example, specific list-model entries (provided by the C++ core) were accessed via ListModel.get(), and they were in turn stored as static property values. I assumed that this is dangerous because as soon as the C++ core deletes the list model entries, it is not guaranteed that the references stored within the QML engine are properly cleared.

      Therefore, I modified this part of the implementation, and suddenly the application was running perfectly stable again.

      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