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



  • 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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.