Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator hangs when deploying to a remote device if that device is rebooted.
Forum Updated to NodeBB v4.3 + New Features

Qt Creator hangs when deploying to a remote device if that device is rebooted.

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 44 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.
  • A Offline
    A Offline
    arhiv6
    wrote last edited by arhiv6
    #1

    Hello. I can use Qt Creator to deploy, run and debug programs on a remote Linux device (I usually use some embedded devices with embedded Linux). But if I reboot the device, the next deployment attempt causes Qt Creator to hang: I can only terminate Qt Creator via the task manager. But if I reboot Qt Creator at the same time as the board, the hang does not happen. I tried using different versions of Qt Creator (from 13.0 to 17.0) on different Xubuntu operating systems. I tried use different ssh servers on the boards (openssh and dropbear) - behaviour didn't chadnged.

    What could be the reason for this behavior?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      arhiv6
      wrote last edited by arhiv6
      #2

      I tested different versions of my projects. And I realized that this behavior is typical only for Cmake-based projects with subdirectories. This is the minimal project that causes the problem:

      ├── CMakeLists.txt
      ├── testapp1
      │   ├── CMakeLists.txt
      │   └── testapp1.c
      └── testapp2
          ├── CMakeLists.txt
          └── testapp2.c
      
      # ./CMakeLists.txt
      cmake_minimum_required(VERSION 3.5)
      project(test)
      add_subdirectory(testapp1)
      add_subdirectory(testapp2)
      
      # ./testapp1/CMakeLists.txt
      cmake_minimum_required(VERSION 3.5)
      project(testapp1 LANGUAGES C)
      add_executable(testapp1 testapp1.c)
      install(TARGETS testapp1 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
      
      // ./testapp1/testapp1.c
      #include <stdio.h>
      int main() { printf("Hello World!\n"); return 0; }
      
      # ./testapp2/CMakeLists.txt
      cmake_minimum_required(VERSION 3.5)
      project(testapp2 LANGUAGES C)
      add_executable(testapp2 testapp2.c)
      install(TARGETS testapp2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
      
      // ./testapp2/testapp2.c
      #include <stdio.h>
      int main() { printf("Hello World!\n"); return 0; }
      

      It is log of Qt Creator's. I made 3 attempt to deploying. I rebooted remote device after second deployment and it boke Qt Creator:

      21:11:08.039 qtc.utils.process: Process 0 starting (non blocking): /usr/bin/cmake --build /tmp/testapp/bin --target all install
      21:11:08.096 default: SOFT ASSERT [21:11:08.096]: "d->m_stdOut.keepRawData" in ./src/libs/utils/process.cpp:1733
      21:11:08.096 default: SOFT ASSERT [21:11:08.096]: "d->m_stdErr.keepRawData" in ./src/libs/utils/process.cpp:1739
      21:11:08.096 qtc.utils.process: Process 0 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 57 ms elapsed
      21:11:08.097 qtc.utils.process: Process 1 starting (non blocking): device://{0b29edf9-a387-4220-8a48-c84fd0a21b5f}/bin/sh -c 'cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -15 -$pid $pid;fi; done; cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -9 -$pid $pid;fi; done'
      21:11:08.097 qtc.utils.process: Process 2 starting (non blocking): /usr/bin/ssh -M -N -o ControlPersist=no -o ServerAliveInterval=10 -o PermitLocalCommand=yes -o LocalCommand=echo -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 -o ControlPath=/tmp/QtCreator-ySuyWK/cs 192.168.1.100
      21:11:08.247 qtc.utils.process: Process 3 starting (non blocking): /usr/bin/ssh -q -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 -o ControlPath=/tmp/QtCreator-ySuyWK/cs 192.168.1.100 'echo __qtc$$__qtc &&  exec /bin/sh -c '\''cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -15 -$pid $pid;fi; done; cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -9 -$pid $pid;fi; done'\'''
      21:11:08.947 qtc.utils.process: Process 3 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 700 ms elapsed
      21:11:08.947 qtc.utils.process: Process 1 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 850 ms elapsed
      21:11:08.965 qtc.utils.process: Process 4 starting (non blocking): /usr/bin/ssh -q -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 192.168.1.100 /bin/sh
      21:11:09.284 qtc.utils.process: Process 5 starting (non blocking): rsync -e '/usr/bin/ssh -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 -o ControlPath=/tmp/QtCreator-ySuyWK/cs' -av /tmp/QtCreator-jQGfKk/staging-18b0b9018464f6fb/usr/bin/testapp2 /tmp/QtCreator-jQGfKk/staging-18b0b9018464f6fb/usr/bin/testapp1 root@192.168.1.100:/usr/bin
      21:11:09.366 qtc.utils.process: Process 5 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 82 ms elapsed
      
      21:11:23.467 qtc.utils.process: Process 6 starting (non blocking): /usr/bin/cmake --build /tmp/testapp/bin --target all install
      21:11:23.523 default: SOFT ASSERT [21:11:23.523]: "d->m_stdOut.keepRawData" in ./src/libs/utils/process.cpp:1733
      21:11:23.523 default: SOFT ASSERT [21:11:23.523]: "d->m_stdErr.keepRawData" in ./src/libs/utils/process.cpp:1739
      21:11:23.523 qtc.utils.process: Process 6 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 56 ms elapsed
      21:11:23.524 qtc.utils.process: Process 7 starting (non blocking): device://{0b29edf9-a387-4220-8a48-c84fd0a21b5f}/bin/sh -c 'cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -15 -$pid $pid;fi; done; cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -9 -$pid $pid;fi; done'
      21:11:23.524 qtc.utils.process: Process 8 starting (non blocking): /usr/bin/ssh -q -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 -o ControlPath=/tmp/QtCreator-ySuyWK/cs 192.168.1.100 'echo __qtc$$__qtc &&  exec /bin/sh -c '\''cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -15 -$pid $pid;fi; done; cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -9 -$pid $pid;fi; done'\'''
      21:11:24.249 qtc.utils.process: Process 8 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 725 ms elapsed
      21:11:24.249 qtc.utils.process: Process 7 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 725 ms elapsed
      21:11:24.291 qtc.utils.process: Process 9 starting (non blocking): rsync -e '/usr/bin/ssh -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 -o ControlPath=/tmp/QtCreator-ySuyWK/cs' -av /tmp/QtCreator-jQGfKk/staging-18b0b9018464f6fb/usr/bin/testapp2 /tmp/QtCreator-jQGfKk/staging-18b0b9018464f6fb/usr/bin/testapp1 root@192.168.1.100:/usr/bin
      21:11:24.362 qtc.utils.process: Process 9 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 71 ms elapsed
      
      21:11:43.677 qtc.utils.process: Process 10 starting (non blocking): /usr/bin/cmake --build /tmp/testapp/bin --target all install
      21:11:43.733 default: SOFT ASSERT [21:11:43.733]: "d->m_stdOut.keepRawData" in ./src/libs/utils/process.cpp:1733
      21:11:43.733 default: SOFT ASSERT [21:11:43.733]: "d->m_stdErr.keepRawData" in ./src/libs/utils/process.cpp:1739
      21:11:43.733 qtc.utils.process: Process 10 finished: result=0, ex=0, 0 bytes stdout: "", 0 bytes stderr: "", 56 ms elapsed
      21:11:43.734 qtc.utils.process: Process 11 starting (non blocking): device://{0b29edf9-a387-4220-8a48-c84fd0a21b5f}/bin/sh -c 'cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -15 -$pid $pid;fi; done; cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -9 -$pid $pid;fi; done'
      21:11:43.734 qtc.utils.process: Process 12 starting (non blocking): /usr/bin/ssh -q -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 -o ControlPath=/tmp/QtCreator-ySuyWK/cs 192.168.1.100 'echo __qtc$$__qtc &&  exec /bin/sh -c '\''cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -15 -$pid $pid;fi; done; cd /proc; for pid in `ls -d [0123456789]*`; do if [ "`readlink /proc/$pid/exe`" = "/usr/bin/testapp1" ]; then     kill -9 -$pid $pid;fi; done'\'''
      21:11:43.740 qtc.utils.process: Process 2 finished: result=1, ex=255, 0 bytes stdout: "", 123 bytes stderr: "Warning: Permanently added '192.168.1.100' (ED25519) to the list of known hosts.\nclient_loop: send disconnect: Broken pipe\n", 35643 ms elapsed
      21:11:43.741 default: SOFT ASSERT [21:11:43.741]: "m_resultData.m_error == QProcess::FailedToStart" in ./src/libs/utils/process.cpp:2066
      21:11:43.741 qtc.utils.process: Process 11 finished: result=1, ex=255, 0 bytes stdout: "", 0 bytes stderr: "", 7 ms elapsed
      21:11:43.743 qtc.utils.process: Process 4 finished: result=1, ex=255, 0 bytes stdout: "", 0 bytes stderr: "", 34778 ms elapsed
      21:11:43.743 qtc.utils.deviceshell: Shell exited with error code: 255 ( "Command «/usr/bin/ssh -q -o StrictHostKeyChecking=no -o Port=22 -o User=root -o BatchMode=no -o ConnectTimeout=10 192.168.1.100 /bin/sh» exited with the code 255." )
      

      As you can see, after I rebooted the device, Qt Creator was unable to make deploy. It seems to be holding some running processes (№2 and №4) in the background, and this causes IDE to hang when the connection to the remote device is lost. It seems as bug :(

      1 Reply Last reply
      0
      • sbelaS Offline
        sbelaS Offline
        sbela
        wrote last edited by
        #3

        This happens to me too. I restart the creator and than it works fine,

        I would like!

        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