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. QtConcurrent::run -> crash after a while during read from a HID device - SOLVED
Forum Updated to NodeBB v4.3 + New Features

QtConcurrent::run -> crash after a while during read from a HID device - SOLVED

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

    Dear all,
    I looked on the forum about my issue but I didn't find something similar.
    So, I'm developing a small application that works with a USB microcontroller and I'm reading data as HID in order to save actual firmware from the device to PC/MAC.
    I launch the reading using QtConcurrent::run method, exactly
    @future = QtConcurrent::run (this, &MainWindow::ReadDevice);@

    On ReadDevice method I call a class comm that perform USB read commands from start_Addr up to end_Addr, 56 bytes at time:

    @result = comm->GetData(start_Addr,end_Addr, 56, device->BytesPerAddr, device->pData);@

    It works perfectly but after 40 seconds (always @ the same address) the program crash.... and during debug process I receive a message box that tells:

    "The inferior stopped because it received a signal from the Operating System"

    • Signal name: SIGSEGV
    • Signal meaning: Segmentation fault

    Anyone could help me to solve this problem?

    Thanks in advance,
    Placido

    1 Reply Last reply
    0
    • P Offline
      P Offline
      placido
      wrote on last edited by
      #2

      Problem found: the fault was generated during write on buffer. Not enough buffer was been allocated.

      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