Skip to content

Fix crashes on idle

Michael Catanzaro requested to merge mcatanzaro/#2985 into main

Currently whenever GNOME reaches its idle timeout and attempts to lock the screen, it crashes. The problem occurs in meta_onscreen_native_invalidate(), which calls meta_output_is_privacy_screen_supported(), meta_output_is_color_space_supported(), and meta_output_is_hdr_metadata_supported(). For the KMS backend, all three functions assume that meta_kms_connector_get_current_state() returns a non-NULL pointer. This assumption is wrong.

This fixes the problem just enough to avoid the crashes that users are encountering in practice. The problem is not comprehensively fixed. E.g. even MetaKmsConnector itself often assumes that the current_state is non-NULL without any evidence or assertions that it's true. Further investigation is required; either it should be NULL-checked everywhere, or it should be prevented from ever becoming NULL, or some more precise invariant should be enforced.

Fixes #2985 (closed)

Merge request reports