QtConcurrentRun calls non-qt function
-
wrote on 23 Feb 2015, 23:05 last edited by
[quote author="SGaist" date="1424727828"]You are trying to write on the same file descriptor from several thread at once ?[/quote]
No, BRC is a class, and each BRC object has its own file descriptor.
-
Can you also show your call to QtConcurrentRun ?
-
wrote on 23 Feb 2015, 23:28 last edited by
Device manager contains two spectrometers,
@bool DeviceManager::scan()
{
_meter0->scan(); // scan in parallel
_meter1->scan(); // scan in parallel
return true;
}@
@bool Spectrometer::scan()
{
_progress = 0;
emit reportProgress(_progress);
// this will run parallel
QtConcurrent::run(this,&Spectrometer::doScanning);
_isWorking=true;
return true;
}@ -
Then are you sure that _brc is properly allocated ? That both are no trying to access the same resources at the same time ?
-
wrote on 24 Feb 2015, 01:51 last edited by
_brc is a pointer in Spectrometer class.
and I use new BRC() in Spectrometer's constructor.
Works most of time.and during my app starts up, each _brc did communicate with their corresponding hardware successfully.
Is it possible to allocate differently with same code but different runs?
-
What does the backtrace of a crash tell you ?
-
wrote on 26 Feb 2015, 00:10 last edited by
you mean stack trace?
two lines of ??
[quote author="SGaist" date="1424896978"]What does the backtrace of a crash tell you ?[/quote]
-
Are you running a debug build ?
-
wrote on 27 Feb 2015, 00:20 last edited by
[quote author="SGaist" date="1424993803"]Are you running a debug build ?
[/quote]Yes
-
Ok, then what does the debugger tell you ?
14/14