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. Qt Application crashes if it remains idle for some time with attached call stack.
Forum Updated to NodeBB v4.3 + New Features

Qt Application crashes if it remains idle for some time with attached call stack.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 494 Views 2 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.
  • H Offline
    H Offline
    Hetal
    wrote on last edited by
    #1

    Hi There,

    I am working on a QT application, which crashes if it remains idle for sometime with attached call stack.![alt text](image url0_1541499217491_idleCrash.png ). Also, it creates around 3260+ threads while we run it from Visual Studio. But if we run the application by double clicking its icon it generates around 100 threads (as displayed in task manager).
    Does Qt creates many threads while running from Visual Studio. Also, mostly all threads are waiting in event loop, as displayed in following screen shot0_1541499640020_idleThreads.png

    How can we prevent this crashing of application? As from call stack there is no hint that which part of code is causing crash? Please suggest.

    jsulmJ Pablo J. RoginaP 2 Replies Last reply
    0
    • H Hetal

      Hi There,

      I am working on a QT application, which crashes if it remains idle for sometime with attached call stack.![alt text](image url0_1541499217491_idleCrash.png ). Also, it creates around 3260+ threads while we run it from Visual Studio. But if we run the application by double clicking its icon it generates around 100 threads (as displayed in task manager).
      Does Qt creates many threads while running from Visual Studio. Also, mostly all threads are waiting in event loop, as displayed in following screen shot0_1541499640020_idleThreads.png

      How can we prevent this crashing of application? As from call stack there is no hint that which part of code is causing crash? Please suggest.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Hetal Qt itself will for sure not create so many threads (if any). You should add some debug output to your code and see what happens (for example print something when you create a new thread).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      6
      • H Hetal

        Hi There,

        I am working on a QT application, which crashes if it remains idle for sometime with attached call stack.![alt text](image url0_1541499217491_idleCrash.png ). Also, it creates around 3260+ threads while we run it from Visual Studio. But if we run the application by double clicking its icon it generates around 100 threads (as displayed in task manager).
        Does Qt creates many threads while running from Visual Studio. Also, mostly all threads are waiting in event loop, as displayed in following screen shot0_1541499640020_idleThreads.png

        How can we prevent this crashing of application? As from call stack there is no hint that which part of code is causing crash? Please suggest.

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @Hetal could you describe the components of your application? is it threaded? are you handling the event loop yourself?

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        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