Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.6.1
-
None
-
Ubuntu 14.04 x64
Description
It looks like a race condition with QMimeData object in QDragEnterEvent.
If we wait some time in dragEnterEvent handler, or if our reimplemented handler takes much time, then we could face such crash.
void DragWidget::dragEnterEvent(QDragEnterEvent *event) { // mime data is checked if it has any urls if (event->mimeData()->hasUrls()) { sleep(1); // after sleep it crashes because QList with urls appears to be empty. auto url = event->mimeData()->urls().first(); } event->accept(); }
Stdout, then, has the following output:
ASSERT: "!isEmpty()" in file /opt/qt561-debug/include/QtCore/qlist.h, line 335
The program has unexpectedly finished.