bladeRF
bladeRF copied to clipboard
libbladerf: Increase timeout for waiting on sync_worker_task thread during sync_worker_init.
Fixes #1015
The problem is that under certain conditions (this can also be reproduced when the app is unpacked from an archive for the first time—possibly due to antivirus interference?), the 1000 ms timeout is not enough for the thread to set SYNC_WORKER_STATE_IDLE.
As a result, the method returns BLADERF_ERR_TIMEOUT and calls free(s->worker). However, after this, the sync_worker_task thread still executes, leading to an access violation and ultimately causing the application to crash.