ispyisail
39ac5716c7
Fix crash on cancelling the open-element dialog before collection load finishes
...
Bugtracker #291 : clicking Cancel on the open/save-element dialog before
the user collection finishes loading crashes the whole application with
an unhandled pointer exception.
ElementsCollectionModel::loadCollections() loads collections in the
background via QtConcurrent::map(m_items_list_to_setUp, setUpData) -
worker threads call setUpData() on each ElementCollectionItem
(a QStandardItem), which does setFlags()/setData() on it.
ElementDialog::execConfiguredDialog() deletes the dialog immediately
after exec() returns:
element_dialog->exec();
...
delete element_dialog;
That destroys the tree view and its ElementsCollectionModel, which as
a QStandardItemModel frees all its items in its destructor. Nothing
waited for the QtConcurrent::map() to finish first, so on Cancel before
loading completes, background threads were still calling setUpData()
on items the main thread had just freed - a use-after-free race.
Add an ElementsCollectionModel destructor that waits for the future
before QStandardItemModel's destructor runs. QFuture::waitForFinished()
on a default-constructed (never-started) future returns immediately, so
this is a no-op whenever loading already completed - the crash path is
the only one affected.
2026-08-14 13:08:45 +12:00
..
2026-08-09 12:30:15 +02:00
2026-08-01 20:20:51 +02:00
2026-08-09 09:11:40 +02:00
2026-01-16 15:24:35 +01:00
2026-01-26 18:47:43 +01:00
2026-08-12 15:53:30 +12:00
2026-08-14 13:08:45 +12:00
2026-07-31 10:30:49 +02:00
2026-07-26 21:04:25 +12:00
2026-08-06 23:05:05 +12:00
2026-07-11 21:47:04 +02:00
2026-08-12 10:31:04 +12:00
2026-07-31 09:52:32 +12:00
2026-08-11 10:27:52 +12:00
2026-08-11 11:48:58 +12:00
2025-05-22 21:33:32 +02:00
2026-08-09 21:09:19 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-08 23:13:42 +02:00
2026-08-10 21:19:56 +12:00
2026-01-16 15:24:35 +01:00
2026-07-17 10:26:43 +02:00
2026-08-11 12:36:31 +12:00
2026-08-10 21:24:04 +02:00
2026-08-09 19:03:29 +02:00
2026-08-01 11:41:55 +02:00
2026-01-16 15:24:35 +01:00
2026-08-09 09:11:40 +02:00
2026-08-09 09:11:40 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-07-30 18:32:54 +12:00
2026-01-16 15:24:35 +01:00
2026-07-14 19:27:18 +02:00
2026-06-12 05:25:44 +12:00
2026-08-03 13:19:51 +12:00
2026-01-16 15:24:35 +01:00
2026-06-16 17:41:03 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-08 00:32:31 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-06 21:37:40 +02:00
2026-08-07 13:48:40 +02:00
2026-08-09 09:11:40 +02:00
2026-08-08 22:10:47 +02:00
2026-07-14 19:27:16 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-09 01:34:22 +02:00
2026-04-26 10:48:47 +02:00
2026-08-08 21:53:20 +12:00
2026-04-26 10:48:47 +02:00
2026-07-14 19:27:16 +02:00
2026-01-16 15:24:35 +01:00
2026-08-08 00:32:31 +02:00
2026-01-16 15:24:35 +01:00
2026-07-14 19:27:17 +02:00
2026-01-16 15:24:35 +01:00
2026-08-09 09:11:40 +02:00
2026-01-16 15:24:35 +01:00
2026-08-09 11:51:23 +02:00
2026-05-13 19:42:11 +02:00
2026-08-09 19:25:56 +02:00
2026-08-04 16:36:23 +12:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-09 01:34:22 +02:00
2026-01-16 15:24:35 +01:00
2026-08-08 08:09:45 +02:00
2026-08-06 21:37:40 +02:00
2026-08-09 19:25:56 +02:00
2026-08-06 21:37:40 +02:00
2026-08-09 12:30:15 +02:00
2026-04-19 10:44:52 +02:00
2026-08-04 10:32:25 +12:00
2026-08-04 10:32:25 +12:00
2026-07-17 10:25:49 +02:00
2026-06-20 22:31:06 +12:00
2026-08-06 23:05:05 +12:00
2026-08-11 11:33:28 +12:00
2026-01-16 15:24:35 +01:00
2026-06-11 23:48:14 +12:00
2026-06-11 23:48:14 +12:00
2026-08-11 12:01:24 +12:00
2026-08-01 17:03:39 +12:00
2026-08-01 01:35:51 +12:00
2026-01-16 15:24:35 +01:00
2026-08-09 11:51:23 +02:00
2026-08-06 23:04:27 +12:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-09 19:03:29 +02:00
2026-08-09 12:51:37 +02:00
2026-02-02 14:44:10 +01:00
2026-02-02 14:44:10 +01:00
2026-07-27 22:16:52 +02:00
2026-07-31 21:02:07 +02:00
2026-08-11 14:11:00 +02:00
2026-08-06 23:04:27 +12:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-08 23:13:42 +02:00
2026-08-08 15:16:48 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-07-19 13:26:34 +02:00
2026-01-16 15:24:35 +01:00
2026-07-31 08:10:34 +02:00
2026-07-17 10:25:49 +02:00
2026-08-08 00:32:31 +02:00
2026-01-16 15:24:35 +01:00
2026-07-17 21:01:26 +02:00
2026-07-17 21:01:26 +02:00
2026-08-09 01:34:22 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-07-17 10:29:13 +02:00
2026-07-17 10:29:13 +02:00
2026-08-01 01:35:51 +12:00
2026-08-01 01:35:51 +12:00
2020-09-07 22:03:40 +02:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-08-08 12:31:45 +02:00
2026-08-08 12:31:45 +02:00
2020-09-07 22:03:40 +02:00
2026-01-16 15:24:35 +01:00
2026-06-11 12:39:43 +12:00
2026-06-11 12:39:43 +12:00