elementary / calendar

Desktop calendar app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
130 stars 39 forks source link

Concurrency: can ref registry before initialized #749

Open mcclurgm opened 2 years ago

mcclurgm commented 2 years ago

See https://github.com/elementary/calendar/issues/742#issuecomment-1095716346:

I believe I've tracked down the issue, and I don't think it's your fault, so I won't consider it a blocker for this PR. It looks like you uncovered a race condition. It appears that on constructing a CalendarChooser from a cold start, the registry property of the EventStore is null. From my testing, it seems like the error occurs before the registry is initialized in the async open method.

This causes a segfault because you're trying to call a method on a null object. To test, install a version that includes the updates in #742, which did something to reveal this issue.