libgee issueshttps://gitlab.gnome.org/GNOME/libgee/-/issues2021-03-18T22:24:35Zhttps://gitlab.gnome.org/GNOME/libgee/-/issues/27PriorityQueue iterators sometimes return null values, causes segfaults when r...2021-03-18T22:24:35ZBugzillaPriorityQueue iterators sometimes return null values, causes segfaults when removing elementsThe iterators used by PriorityQueue will sometimes return null, even when no null elements have been added to it. This amongst other things causes segfaults in its `remove` method, which uses the iterator and (rightfully) assumes they wi...The iterators used by PriorityQueue will sometimes return null, even when no null elements have been added to it. This amongst other things causes segfaults in its `remove` method, which uses the iterator and (rightfully) assumes they will not be null.
---
## Submitted by Michael Gratton `@mjog`
**[Link to original bug (#793438)](https://bugzilla.gnome.org/show_bug.cgi?id=793438)**
## Description
Ubuntu and Fedora are both getting traces where Geary is crashing in a call to Gee.PriorityQueue.remove on a queue. The only thing particularly interesting about the queue is that it has a custom CompareDataFunc function.
E.g.: https://bugzilla.redhat.com/show_bug.cgi?id=1484620 and https://bugs.launchpad.net/ubuntu/+source/geary/+bug/1622065
The crash is intermittent - so maybe it depends on the ordering in which items are removed? At the time of the crash, Geary is removing all elements from the queue, one by one. I'm not sure at what point it's crashing however - removing last one or some other element in the queue.
Version: 0.20.x
### Blocking
* [Bug 793566](https://bugzilla.gnome.org/show_bug.cgi?id=793566)