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. std::thread crash on ubuntu 20.04
Forum Updated to NodeBB v4.3 + New Features

std::thread crash on ubuntu 20.04

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 225 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.
  • P Offline
    P Offline
    PPatel
    wrote on last edited by PPatel
    #1

    Hi,
    I have developed application to capture video frames from camera which is working good on ubuntu 16. When I moved from ubuntu 16 to ubuntu 20.04, the same application when compiled and built on ubuntu 20.04, it crash while starting capture thread on statement std::thread t1(this).
    Another observation is that application crash only when executed in 'Release' mode. While in 'Debug' mode there is no issue. However, on Ubuntu 16 it works good both in debug and release mode.
    Please suggest any pointers to debug the issue.

    QT version 5.13.2
    QT creator 4.10.2

    Thanks,
    Pradeep

    JonBJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      When something crashes only in release mode the first thing to check is whether all the pointers you are using a properly initialized especially if you have if statements that check whether they are null.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P PPatel

        Hi,
        I have developed application to capture video frames from camera which is working good on ubuntu 16. When I moved from ubuntu 16 to ubuntu 20.04, the same application when compiled and built on ubuntu 20.04, it crash while starting capture thread on statement std::thread t1(this).
        Another observation is that application crash only when executed in 'Release' mode. While in 'Debug' mode there is no issue. However, on Ubuntu 16 it works good both in debug and release mode.
        Please suggest any pointers to debug the issue.

        QT version 5.13.2
        QT creator 4.10.2

        Thanks,
        Pradeep

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by JonB
        #3

        @PPatel said in std::thread crash on ubuntu 20.04:

        statement std::thread t1(this).

        In addition to @SGaist suggestion, what is this here? Does it have anything to do with Qt? I am not a std::thread user but I must confess I do not understand which of its constructor overloads you are even invoking here (unless your this is an existing std::thread).

        1 Reply Last reply
        1

        • Login

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