[Qt-interest] Problems with threads and explicitely shared data
Stephen Jackson
spjackson42 at gmail.com
Fri Oct 2 01:09:11 CEST 2009
On Thu, Oct 1, 2009 at 9:27 PM, Arnold Krille wrote:
> Hi all,
>
> Attached you can find a small mini-project which reproduces the problem. (All
> the data-handling functions are stripped, only the bare necessities are left.)
>
> Maybe you can run it on your machine and tell me whether it works with your
> setup?
> Maybe you can look at the problem and tell me whether there is a problem in
> the source?
>
> Or is this a known problem in Qt?
>
> Thanks in advance,
>
> Arnold, who has been banging his head on several walls for several months
> now...
>
I built your project and it crashes for me. I ran it under valgrind
and the first problem this threw up was this. In
ChainMemberThread::run() you have
NSCore::AcqisitionDataSet data = _queue.first();
This breaks when _queue is empty. When protected by
if (!_queue.isEmpty())
it no longer crashes and valgrind reports no problems.
--
HTH,
Stephen Jackson
More information about the Qt-interest-old
mailing list