Den 26 okt. 2017 10:11 em skrev "Jason H" <jh...@gmx.com>:

This is the first time I'm trying to use QMap with QtConcurrent, and
blockingMapped().

It sometimes works, sometimes doesn't. I've created a minimal test case
that seems to crash in the same way. It seems to crash in varying places.
namely:
qmap.h:
template <class Key> inline bool qMapLessThanKey(const Key &key1, const Key
&key2)
{
    return key1 < key2;
}

But in my software it seems to come from line 42:
QList<QVector3D> hp = haystack_points[haystack_item];

I've already haystack_points to a 1001 item map, I think something else has
deleted it?

Maybe my use of a class with mapped() is wrong?


Not sure if this is your problem here, but it looks like you're using the
same QMap from multiple threads (the one stored in your function).

QMap isn't thread safe, so I don't think your use is guaranteed to be safe,
even if you're only reading.

Could be wrong of course and on my phone atm so awkward to check.

Elvis



Any help is appreciated.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to