CINXE.COM
gdk: Make using displays before init a critical instead of error (#7151) 路 Issues 路 GNOME / gtk 路 GitLab
<!DOCTYPE html> <html class="gl-light ui-gray with-top-bar with-header " lang="en"> <head prefix="og: http://ogp.me/ns#"> <meta charset="utf-8"> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta content="width=device-width, initial-scale=1" name="viewport"> <title>gdk: Make using displays before init a critical instead of error (#7151) 路 Issues 路 GNOME / gtk 路 GitLab</title> <script> //<![CDATA[ window.gon={};gon.math_rendering_limits_enabled=true;gon.features={"preserveMarkdown":false,"issuesGridView":false,"serviceDeskTicket":false,"issuesListDrawer":false,"notificationsTodosButtons":false,"commentTooltips":false,"glqlIntegration":false,"workItems":true,"workItemsBeta":false,"workItemsAlpha":false,"epicWidgetEditConfirmation":false,"namespaceLevelWorkItems":false}; //]]> </script> <script> //<![CDATA[ var gl = window.gl || {}; gl.startup_calls = {"/GNOME/gtk/-/issues/7151/related_branches":{},"/GNOME/gtk/-/issues/7151/discussions.json?per_page=20":{},"/GNOME/gtk/-/issues/7151.json?serializer=sidebar_extras":{}}; gl.startup_graphql_calls = [{"query":"query getDesignList($fullPath: ID!, $iid: String!, $atVersion: DesignManagementVersionID) {\n project(fullPath: $fullPath) {\n __typename\n id\n issue(iid: $iid) {\n __typename\n id\n designCollection {\n __typename\n copyState\n designs(atVersion: $atVersion) {\n __typename\n nodes {\n __typename\n id\n event\n filename\n notesCount\n image\n imageV432x230\n currentUserTodos(state: pending) {\n __typename\n nodes {\n __typename\n id\n }\n }\n }\n }\n versions {\n __typename\n nodes {\n __typename\n id\n sha\n createdAt\n author {\n __typename\n id\n name\n avatarUrl\n }\n }\n }\n }\n }\n }\n}\n","variables":{"fullPath":"GNOME/gtk","iid":"7151","atVersion":null}},{"query":"query permissions($fullPath: ID!, $iid: String!) {\n project(fullPath: $fullPath) {\n __typename\n id\n issue(iid: $iid) {\n __typename\n id\n userPermissions {\n __typename\n createDesign\n }\n }\n }\n}\n","variables":{"fullPath":"GNOME/gtk","iid":"7151"}}]; if (gl.startup_calls && window.fetch) { Object.keys(gl.startup_calls).forEach(apiCall => { gl.startup_calls[apiCall] = { fetchCall: fetch(apiCall, { // Emulate XHR for Rails AJAX request checks headers: { 'X-Requested-With': 'XMLHttpRequest' }, // fetch won鈥檛 send cookies in older browsers, unless you set the credentials init option. // We set to `same-origin` which is default value in modern browsers. // See https://github.com/whatwg/fetch/pull/585 for more information. credentials: 'same-origin' }) }; }); } if (gl.startup_graphql_calls && window.fetch) { const headers = {"X-CSRF-Token":"dFBra86bmCLdhNaYc4BH4C4bAVgJoPh8OsZmwQJJWiv2oSLA8FDG6IxZqPKrf6e0DEhk4tWUvkNzMv3xY0eSDg","x-gitlab-feature-category":"team_planning"}; const url = `https://gitlab.gnome.org/api/graphql` const opts = { method: "POST", headers: { "Content-Type": "application/json", ...headers, } }; gl.startup_graphql_calls = gl.startup_graphql_calls.map(call => ({ ...call, fetchCall: fetch(url, { ...opts, credentials: 'same-origin', body: JSON.stringify(call) }) })) } //]]> </script> <link rel="stylesheet" href="/assets/application-857280eb2c5ebf3a21350a6acc823e0b28bf87da97bda46f8d475bab7806dc71.css" /> <link rel="stylesheet" href="/assets/page_bundles/design_management-38eeb89c44d64b0e406ea0114b532dfd6c91c8945c9590b19896686b2c3d0a8b.css" /><link rel="stylesheet" href="/assets/page_bundles/incidents-a28e7ac0d0660fbb48ca53e90897d7a18dd01ad8c35edcbb1cab9cb49d0ec2a5.css" /><link rel="stylesheet" href="/assets/page_bundles/issuable-2e09fee199209239900843dd3eec6e9d4579f73faa13cdd7b4a516d148bf923f.css" /><link rel="stylesheet" href="/assets/page_bundles/notes_shared-bb04929b630340c7b337fb6bfa30ea2d10fcfe6334e1c2e804a3159fc888c146.css" /><link rel="stylesheet" href="/assets/page_bundles/issues_show-fd3baa53e9fda5bbe0b94b00cf272ceba8acd199fcd75b292edd164d4d4ca478.css" /><link rel="stylesheet" href="/assets/page_bundles/work_items-1df2eea09269b0096c89bcdeba7f775c344c607599d35c3e540bd969463a3bd4.css" /><link rel="stylesheet" href="/assets/page_bundles/labels-0f18a2d2511451c18725538b430fefa8e9a17c177c1b5451b64776c1142571bf.css" /><link rel="stylesheet" href="/assets/page_bundles/commit_description-065c52911d70ac846b47cc0f64e7a6e0d3daadd0cd34f5788259712569dc0dc3.css" /> <link rel="stylesheet" href="/assets/application_utilities-0f64530bdd1cd7f39aa00294ccb76cb9a4a8a8d4fbe2f0f3479997820877adc1.css" /> <link rel="stylesheet" href="/assets/tailwind-df73256c46d660e287677379ab8d61af8585b74ed0a6d7a788608afecccfd1fb.css" /> <link rel="stylesheet" href="/assets/fonts-fae5d3f79948bd85f18b6513a025f863b19636e85b09a1492907eb4b1bb0557b.css" /> <link rel="stylesheet" href="/assets/highlight/themes/white-4e077f818d11286ef63d2c38533b4af8666edc48a0ac7f20d4892136e219f873.css" /> <link rel="preload" href="/assets/application_utilities-0f64530bdd1cd7f39aa00294ccb76cb9a4a8a8d4fbe2f0f3479997820877adc1.css" as="style" type="text/css"> <link rel="preload" href="/assets/application-857280eb2c5ebf3a21350a6acc823e0b28bf87da97bda46f8d475bab7806dc71.css" as="style" type="text/css"> <link rel="preload" href="/assets/highlight/themes/white-4e077f818d11286ef63d2c38533b4af8666edc48a0ac7f20d4892136e219f873.css" as="style" type="text/css"> <script src="/assets/webpack/runtime.aff105bf.bundle.js" defer="defer"></script> <script src="/assets/webpack/main.018e6284.chunk.js" defer="defer"></script> <script src="/assets/webpack/graphql.e1f11a07.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.dashboard.milestones.show-pages.-13e11bbf.94a09ab2.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.groups.boards-pages.groups.infra-bae5b164.e1eb380e.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.groups.boards-pages.groups.issue-8dfa5f96.74f9ae83.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.groups.boards-pages.groups.issue-f804d6c2.35419d5c.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.groups.harbor.repositories-pages.groups.new-pages.groups.packages-pages.groups.registr-c21f1c50.0fbb41f2.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.search.show-super_sidebar.599796f4.chunk.js" defer="defer"></script> <script src="/assets/webpack/super_sidebar.a1cd5f8e.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.projects-pages.projects.activity-pages.projects.alert_management.details-pages.project-ee413973.db11e848.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.runners.show-pages.clusters.agents.dashboard-pages.dashboard.groups.index-pages.-d17ea602.9eaa870f.chunk.js" defer="defer"></script> <script src="/assets/webpack/7.911aa7f8.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports-pages.admin.abuse_reports.show-pages.admin.runners.index-pages.das-74a7a8e7.d4ba5034.chunk.js" defer="defer"></script> <script src="/assets/webpack/9.7ee51643.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports-pages.admin.abuse_reports.show-pages.admin.runners.index-pages.das-261a5dc2.d3883d67.chunk.js" defer="defer"></script> <script src="/assets/webpack/11.0cdd90a6.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports-pages.admin.abuse_reports.show-pages.admin.runners.index-pages.das-0f444519.b8f00edc.chunk.js" defer="defer"></script> <script src="/assets/webpack/13.7a5cc9b1.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.milestones.edit-pages.groups.mil-d4098e09.632d5f46.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.milestones.show-pages.groups.merge_requests-p-c386761a.d8be6651.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.dashboard.milestones.show-pages.groups.merge_requests-pages.groups.milestones.edit-pag-479676bc.fe19f001.chunk.js" defer="defer"></script> <script src="/assets/webpack/commons-pages.dashboard.issues-pages.groups.issues-pages.groups.merge_requests-pages.projects.featur-f689e40b.9c86b1ed.chunk.js" defer="defer"></script> <script src="/assets/webpack/pages.projects.issues.show.50d23d45.chunk.js" defer="defer"></script> <meta content="object" property="og:type"> <meta content="GitLab" property="og:site_name"> <meta content="gdk: Make using displays before init a critical instead of error (#7151) 路 Issues 路 GNOME / gtk 路 GitLab" property="og:title"> <meta content="We have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return..." property="og:description"> <meta content="https://gitlab.gnome.org/uploads/-/system/project/avatar/665/gtk-logo.png" property="og:image"> <meta content="64" property="og:image:width"> <meta content="64" property="og:image:height"> <meta content="https://gitlab.gnome.org/GNOME/gtk/-/issues/7151" property="og:url"> <meta content="summary" property="twitter:card"> <meta content="gdk: Make using displays before init a critical instead of error (#7151) 路 Issues 路 GNOME / gtk 路 GitLab" property="twitter:title"> <meta content="We have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return..." property="twitter:description"> <meta content="https://gitlab.gnome.org/uploads/-/system/project/avatar/665/gtk-logo.png" property="twitter:image"> <meta property="twitter:label1" content="Author"><meta property="twitter:data1" content="Sophie Herold"> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="4dvUNlu33T4Kv-XEmr5qssxMZEV-m2-LFxVqjxP90VljKp2dZXyD9Ftim65CQYrm7h8B_6KvKbRe4fG_cvMZfA" /> <meta name="csp-nonce" /> <meta name="action-cable-url" content="/-/cable" /> <link href="/-/manifest.json" rel="manifest"> <link rel="icon" type="image/png" href="/uploads/-/system/appearance/favicon/1/GnomeLogoVertical.svg.png" id="favicon" data-original-href="/uploads/-/system/appearance/favicon/1/GnomeLogoVertical.svg.png" /> <link rel="apple-touch-icon" type="image/x-icon" href="/assets/apple-touch-icon-b049d4bc0dd9626f31db825d61880737befc7835982586d015bded10b4435460.png" /> <link href="/search/opensearch.xml" rel="search" title="Search GitLab" type="application/opensearchdescription+xml"> <meta content="We have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return..." name="description"> <meta content="#28272d" name="theme-color"> </head> <body class="tab-width-8 gl-browser-ie gl-platform-windows" data-find-file="/GNOME/gtk/-/find_file/main" data-group="GNOME" data-group-full-path="GNOME" data-namespace-id="8" data-page="projects:issues:show" data-page-type-id="7151" data-project="gtk" data-project-full-path="GNOME/gtk" data-project-id="665"> <script> //<![CDATA[ gl = window.gl || {}; gl.GfmAutoComplete = gl.GfmAutoComplete || {}; gl.GfmAutoComplete.dataSources = {"members":"/GNOME/gtk/-/autocomplete_sources/members?type=Issue\u0026type_id=7151","issues":"/GNOME/gtk/-/autocomplete_sources/issues","mergeRequests":"/GNOME/gtk/-/autocomplete_sources/merge_requests","labels":"/GNOME/gtk/-/autocomplete_sources/labels?type=Issue\u0026type_id=7151","milestones":"/GNOME/gtk/-/autocomplete_sources/milestones","commands":"/GNOME/gtk/-/autocomplete_sources/commands?type=Issue\u0026type_id=7151","snippets":"/GNOME/gtk/-/autocomplete_sources/snippets","contacts":"/GNOME/gtk/-/autocomplete_sources/contacts?type=Issue\u0026type_id=7151","wikis":"/GNOME/gtk/-/autocomplete_sources/wikis"}; //]]> </script> <script> //<![CDATA[ gl = window.gl || {}; gl.client = {"isIe":true,"isWindows":true}; //]]> </script> <header class="header-logged-out" data-testid="navbar"> <a class="gl-sr-only gl-accessibility" href="#content-body">Skip to content</a> <div class="container-fluid"> <nav aria-label="Explore GitLab" class="header-logged-out-nav gl-flex gl-gap-3 gl-justify-between"> <div class="gl-flex gl-items-center gl-gap-1"> <span class="gl-sr-only">GitLab</span> <a title="Homepage" id="logo" class="header-logged-out-logo has-tooltip" aria-label="Homepage" href="/"><img class="brand-header-logo lazy" alt="" data-src="/uploads/-/system/appearance/header_logo/1/GnomeLogoHorizontal.svg" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" /> </a></div> <ul class="gl-list-none gl-p-0 gl-m-0 gl-flex gl-gap-3 gl-items-center gl-grow"> <li class="header-logged-out-nav-item"> <a class="" href="/explore">Explore</a> </li> </ul> <ul class="gl-list-none gl-p-0 gl-m-0 gl-flex gl-gap-3 gl-items-center gl-justify-end"> <li class="header-logged-out-nav-item"> <a href="/users/sign_in?redirect_to_referer=yes">Sign in</a> </li> </ul> </nav> </div> </header> <div class="layout-page page-gutter right-sidebar-expanded page-with-super-sidebar"> <aside class="js-super-sidebar super-sidebar super-sidebar-loading" data-command-palette="{"project_files_url":"/GNOME/gtk/-/files/main?format=json","project_blob_url":"/GNOME/gtk/-/blob/main"}" data-force-desktop-expanded-sidebar="" data-is-saas="false" data-root-path="/" data-sidebar="{"is_logged_in":false,"context_switcher_links":[{"title":"Explore","link":"/explore","icon":"compass"}],"current_menu_items":[{"id":"project_overview","title":"gtk","icon":null,"avatar":"/uploads/-/system/project/avatar/665/gtk-logo.png","entity_id":665,"link":"/GNOME/gtk","pill_count":null,"link_classes":"shortcuts-project","is_active":false},{"id":"manage_menu","title":"Manage","icon":"users","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/activity","is_active":false,"pill_count":null,"items":[{"id":"activity","title":"Activity","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/activity","pill_count":null,"link_classes":"shortcuts-project-activity","is_active":false},{"id":"members","title":"Members","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/project_members","pill_count":null,"link_classes":null,"is_active":false},{"id":"labels","title":"Labels","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/labels","pill_count":null,"link_classes":null,"is_active":false}],"separated":false},{"id":"plan_menu","title":"Plan","icon":"planning","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/issues","is_active":true,"pill_count":null,"items":[{"id":"project_issue_list","title":"Issues","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/issues","pill_count":"1.8k","link_classes":"shortcuts-issues has-sub-items","is_active":true},{"id":"boards","title":"Issue boards","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/boards","pill_count":null,"link_classes":"shortcuts-issue-boards","is_active":false},{"id":"milestones","title":"Milestones","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/milestones","pill_count":null,"link_classes":null,"is_active":false},{"id":"project_wiki","title":"Wiki","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/wikis/home","pill_count":null,"link_classes":"shortcuts-wiki","is_active":false}],"separated":false},{"id":"code_menu","title":"Code","icon":"code","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/merge_requests","is_active":false,"pill_count":null,"items":[{"id":"project_merge_request_list","title":"Merge requests","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/merge_requests","pill_count":"345","link_classes":"shortcuts-merge_requests","is_active":false},{"id":"files","title":"Repository","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/tree/main","pill_count":null,"link_classes":"shortcuts-tree","is_active":false},{"id":"branches","title":"Branches","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/branches","pill_count":null,"link_classes":null,"is_active":false},{"id":"commits","title":"Commits","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/commits/main?ref_type=heads","pill_count":null,"link_classes":"shortcuts-commits","is_active":false},{"id":"tags","title":"Tags","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/tags","pill_count":null,"link_classes":null,"is_active":false},{"id":"graphs","title":"Repository graph","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/network/main?ref_type=heads","pill_count":null,"link_classes":"shortcuts-network","is_active":false},{"id":"compare","title":"Compare revisions","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/compare?from=main\u0026to=main","pill_count":null,"link_classes":null,"is_active":false},{"id":"project_snippets","title":"Snippets","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/snippets","pill_count":null,"link_classes":"shortcuts-snippets","is_active":false}],"separated":false},{"id":"build_menu","title":"Build","icon":"rocket","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/pipelines","is_active":false,"pill_count":null,"items":[{"id":"pipelines","title":"Pipelines","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/pipelines","pill_count":null,"link_classes":"shortcuts-pipelines","is_active":false},{"id":"jobs","title":"Jobs","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/jobs","pill_count":null,"link_classes":"shortcuts-builds","is_active":false},{"id":"pipeline_schedules","title":"Pipeline schedules","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/pipeline_schedules","pill_count":null,"link_classes":"shortcuts-builds","is_active":false},{"id":"artifacts","title":"Artifacts","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/artifacts","pill_count":null,"link_classes":"shortcuts-builds","is_active":false}],"separated":false},{"id":"deploy_menu","title":"Deploy","icon":"deployments","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/releases","is_active":false,"pill_count":null,"items":[{"id":"releases","title":"Releases","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/releases","pill_count":null,"link_classes":"shortcuts-deployments-releases","is_active":false},{"id":"container_registry","title":"Container Registry","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/container_registry","pill_count":null,"link_classes":null,"is_active":false}],"separated":false},{"id":"operations_menu","title":"Operate","icon":"cloud-pod","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/environments","is_active":false,"pill_count":null,"items":[{"id":"environments","title":"Environments","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/environments","pill_count":null,"link_classes":"shortcuts-environments","is_active":false}],"separated":false},{"id":"monitor_menu","title":"Monitor","icon":"monitor","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/incidents","is_active":false,"pill_count":null,"items":[{"id":"incidents","title":"Incidents","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/incidents","pill_count":null,"link_classes":null,"is_active":false},{"id":"service_desk","title":"Service Desk","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/issues/service_desk","pill_count":null,"link_classes":null,"is_active":false}],"separated":false},{"id":"analyze_menu","title":"Analyze","icon":"chart","avatar":null,"avatar_shape":"rect","entity_id":null,"link":"/GNOME/gtk/-/value_stream_analytics","is_active":false,"pill_count":null,"items":[{"id":"cycle_analytics","title":"Value stream analytics","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/value_stream_analytics","pill_count":null,"link_classes":"shortcuts-project-cycle-analytics","is_active":false},{"id":"contributors","title":"Contributor analytics","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/graphs/main?ref_type=heads","pill_count":null,"link_classes":null,"is_active":false},{"id":"ci_cd_analytics","title":"CI/CD analytics","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/pipelines/charts","pill_count":null,"link_classes":null,"is_active":false},{"id":"repository_analytics","title":"Repository analytics","icon":null,"avatar":null,"entity_id":null,"link":"/GNOME/gtk/-/graphs/main/charts","pill_count":null,"link_classes":"shortcuts-repository-charts","is_active":false}],"separated":false}],"current_context_header":"Project","support_path":"https://about.gitlab.com/get-help/","docs_path":"/help/docs","display_whats_new":false,"show_version_check":null,"search":{"search_path":"/search","issues_path":"/dashboard/issues","mr_path":"/dashboard/merge_requests","autocomplete_path":"/search/autocomplete","settings_path":"/search/settings","search_context":{"group":{"id":8,"name":"GNOME","full_name":"GNOME"},"group_metadata":{"issues_path":"/groups/GNOME/-/issues","mr_path":"/groups/GNOME/-/merge_requests"},"project":{"id":665,"name":"gtk"},"project_metadata":{"mr_path":"/GNOME/gtk/-/merge_requests","issues_path":"/GNOME/gtk/-/issues"},"code_search":false,"scope":"issues","for_snippets":null}},"panel_type":"project","shortcut_links":[{"title":"Snippets","href":"/explore/snippets","css_class":"dashboard-shortcuts-snippets"},{"title":"Groups","href":"/explore/groups","css_class":"dashboard-shortcuts-groups"},{"title":"Projects","href":"/explore/projects/starred","css_class":"dashboard-shortcuts-projects"}],"terms":"/-/users/terms"}"></aside> <div class="content-wrapper"> <div class="broadcast-wrapper"> </div> <div class="alert-wrapper gl-flex gl-flex-col gl-gap-3 container-fluid container-limited"> <div class="gl-alert gl-alert-danger gl-alert-not-dismissible" role="alert"> <div class="gl-alert-icon-container"> <svg class="s16 gl-alert-icon gl-alert-icon-no-title" data-testid="error-icon"><use href="/assets/icons-50888ef7fb46c3a1fb53bc67cfc1085be59395f0d49dd55cdd8a8e269dede05b.svg#error"></use></svg> </div> <div class="gl-alert-content" role="alert"> <div class="gl-alert-body"> GitLab may not work properly, because you are using an outdated web browser. <br> Please install a <a target="_blank" rel="noopener noreferrer" href="/help/install/requirements#supported-web-browsers">supported web browser</a> for a better experience. </div> </div> </div> <div class="flash-container flash-container-page sticky" data-testid="flash-container"> <div id="js-global-alerts"></div> </div> </div> <div class="top-bar-fixed container-fluid" data-testid="top-bar"> <div class="top-bar-container gl-flex gl-items-center gl-gap-2"> <button class="gl-button btn btn-icon btn-md btn-default btn-default-tertiary js-super-sidebar-toggle-expand super-sidebar-toggle -gl-ml-3" aria-controls="super-sidebar" aria-expanded="false" aria-label="Primary navigation sidebar" type="button"><svg class="s16 gl-icon gl-button-icon " data-testid="sidebar-icon"><use href="/assets/icons-50888ef7fb46c3a1fb53bc67cfc1085be59395f0d49dd55cdd8a8e269dede05b.svg#sidebar"></use></svg> </button> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"GNOME","item":"https://gitlab.gnome.org/GNOME"},{"@type":"ListItem","position":2,"name":"gtk","item":"https://gitlab.gnome.org/GNOME/gtk"},{"@type":"ListItem","position":3,"name":"Issues","item":"https://gitlab.gnome.org/GNOME/gtk/-/issues"},{"@type":"ListItem","position":4,"name":"#7151","item":"https://gitlab.gnome.org/GNOME/gtk/-/issues/7151"}]} </script> <div data-testid="breadcrumb-links" id="js-vue-page-breadcrumbs-wrapper"> <div data-breadcrumbs-json="[{"text":"GNOME","href":"/GNOME","avatarPath":"/uploads/-/system/group/avatar/8/gnomelogo.png"},{"text":"gtk","href":"/GNOME/gtk","avatarPath":"/uploads/-/system/project/avatar/665/gtk-logo.png"},{"text":"Issues","href":"/GNOME/gtk/-/issues","avatarPath":null},{"text":"#7151","href":"/GNOME/gtk/-/issues/7151","avatarPath":null}]" id="js-vue-page-breadcrumbs"></div> <div id="js-injected-page-breadcrumbs"></div> </div> <div id="js-work-item-feedback"></div> </div> </div> <div class="container-fluid container-limited limit-container-width project-highlight-puc"> <main class="content" id="content-body" itemscope itemtype="http://schema.org/SoftwareSourceCode"> <div class="issue-details issuable-details js-issue-details"> <div class="detail-page-description content-block js-detail-page-description gl-pt-3 gl-pb-0 gl-border-none"> <div data-header-actions-data="{"can_create_issue":"true","can_create_incident":"false","can_destroy_issue":"false","can_reopen_issue":"false","can_report_spam":"","can_update_issue":"false","is_issue_author":"false","issue_path":"/GNOME/gtk/-/issues/7151","new_issue_path":"/GNOME/gtk/-/issues/new?add_related_issue=7151","project_path":"GNOME/gtk","report_abuse_path":"/-/abuse_reports/add_category","reported_user_id":468,"reported_from_url":"https://gitlab.gnome.org/GNOME/gtk/-/issues/7151","submit_as_spam_path":"/GNOME/gtk/-/issues/7151/mark_as_spam","issuable_email_address":null}" data-initial="{"endpoint":"/GNOME/gtk/-/issues/7151","updateEndpoint":"/GNOME/gtk/-/issues/7151.json","canUpdate":false,"canDestroy":false,"issuableRef":"#7151","imported":false,"markdownPreviewPath":"/GNOME/gtk/-/preview_markdown?target_id=7151\u0026target_type=Issue","markdownDocsPath":"/help/user/markdown","lockVersion":0,"issuableTemplateNamesPath":"/GNOME/gtk/description_templates/names/issue","initialTitleHtml":"gdk: Make using displays before init a critical instead of error","initialTitleText":"gdk: Make using displays before init a critical instead of error","initialDescriptionHtml":"\u003cp data-sourcepos=\"1:1-1:159\" dir=\"auto\"\u003eWe have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return NULL.\u003c/p\u003e\u0026#x000A;\u003cp data-sourcepos=\"3:1-3:156\" dir=\"auto\"\u003eUnfortunately, a bunch of our core software use displays before init like Loupe, Nautilus, xdg-desktop-portal-gnome, Console, libshumate, and Initial Setup.\u003c/p\u003e\u0026#x000A;\u003cp data-sourcepos=\"5:1-5:217\" dir=\"auto\"\u003eIf a distro updates to GTK 4.18 but failes to update one of these components, we will end up with unnecessary crashes. I would therefore suggest to make \u003ca href=\"/GNOME/gtk/-/merge_requests/7836\" data-reference-type=\"merge_request\" data-original=\"!7836\" data-link=\"false\" data-link-reference=\"false\" data-merge-request=\"100259\" data-project=\"665\" data-project-path=\"GNOME/gtk\" data-iid=\"7836\" data-container=\"body\" data-placement=\"top\" title=\"gdk: No displays before init\" class=\"gfm gfm-merge_request\"\u003e!7836 (merged)\u003c/a\u003e a critical like it is the case for many similar behaviors.\u003c/p\u003e","initialDescriptionText":"We have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return NULL.\n\nUnfortunately, a bunch of our core software use displays before init like Loupe, Nautilus, xdg-desktop-portal-gnome, Console, libshumate, and Initial Setup.\n\nIf a distro updates to GTK 4.18 but failes to update one of these components, we will end up with unnecessary crashes. I would therefore suggest to make !7836 a critical like it is the case for many similar behaviors.","initialTaskCompletionStatus":{"count":0,"completed_count":0},"canCreateIncident":false,"fullPath":"GNOME/gtk","iid":7151,"issuableId":210244,"issueType":"issue","isHidden":false,"zoomMeetingUrl":null,"authorId":468,"authorName":"Sophie Herold","authorUsername":"sophie-h","authorWebUrl":"/sophie-h","createdAt":"2024-11-11T15:56:08+00:00","isFirstContribution":false,"serviceDeskReplyTo":null,"registerPath":"/users/sign_up?redirect_to_referer=yes","signInPath":"/users/sign_in?redirect_to_referer=yes","projectPath":"gtk","projectId":665,"projectNamespace":"GNOME"}" id="js-issuable-app"> <div class="title-container"> <h1 class="gl-heading-1 !gl-m-0">gdk: Make using displays before init a critical instead of error</h1> </div> <div class="description"> <div class="md"><p data-sourcepos="1:1-1:159" dir="auto">We have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return NULL.</p>
<p data-sourcepos="3:1-3:156" dir="auto">Unfortunately, a bunch of our core software use displays before init like Loupe, Nautilus, xdg-desktop-portal-gnome, Console, libshumate, and Initial Setup.</p>
<p data-sourcepos="5:1-5:217" dir="auto">If a distro updates to GTK 4.18 but failes to update one of these components, we will end up with unnecessary crashes. I would therefore suggest to make <a href="/GNOME/gtk/-/merge_requests/7836" data-reference-type="merge_request" data-original="!7836" data-link="false" data-link-reference="false" data-merge-request="100259" data-project="665" data-project-path="GNOME/gtk" data-iid="7836" data-container="body" data-placement="top" title="gdk: No displays before init" class="gfm gfm-merge_request">!7836 (merged)</a> a critical like it is the case for many similar behaviors.</p></div> </div> </div> <div class="js-issue-widgets"> <div class="emoji-block emoji-block-sticky"> <div class="row gl-m-0 gl-justify-between"> <div class="js-noteable-awards"> <div class="gl-flex gl-flex-wrap gl-justify-between gl-pt-3"> <div data-can-award-emoji="false" data-path="/api/v4/projects/665/issues/7151/award_emoji" data-show-default-award-emojis="true" id="js-vue-awards-block"></div> </div> </div> <div class="new-branch-col gl-font-size-0 gl-my-2"> </div> </div> </div> </div> </div> <div class="js-issue-widgets"> <div class="js-design-management" data-issue-iid="7151" data-issue-path="/GNOME/gtk/-/issues/7151" data-new-comment-template-paths="[{"text":"Your comment templates","href":"/-/profile/comment_templates"}]" data-project-path="GNOME/gtk" data-register-path="/users/sign_up?redirect_to_referer=yes" data-sign-in-path="/users/sign_in?redirect_to_referer=yes"></div> <div class="js-work-item-links-root" data-full-path="GNOME/gtk" data-issuable-id="210244" data-issuable-iid="7151" data-register-path="/users/sign_up?redirect_to_referer=yes" data-sign-in-path="/users/sign_in?redirect_to_referer=yes" data-wi-autocomplete-award-emojis-path="/-/autocomplete/award_emojis" data-wi-can-admin-label="false" data-wi-default-branch="main" data-wi-full-path="GNOME/gtk" data-wi-group-path="GNOME" data-wi-is-signed-in="false" data-wi-issues-list-path="/GNOME/gtk/-/issues" data-wi-labels-manage-path="/GNOME/gtk/-/labels" data-wi-new-comment-template-paths="[{"text":"Your comment templates","href":"/-/profile/comment_templates"}]" data-wi-register-path="/users/sign_up?redirect_to_referer=yes" data-wi-report-abuse-path="/-/abuse_reports/add_category" data-wi-show-new-issue-link="false" data-wi-sign-in-path="/users/sign_in?redirect_to_referer=yes"></div> <div class="js-related-issues-root" data-can-add-related-issues="false" data-endpoint="/GNOME/gtk/-/issues/7151/links" data-full-path="GNOME/gtk" data-has-issue-weights-feature="false" data-has-iterations-feature="false" data-help-path="/help/user/project/issues/related_issues" data-is-group="false" data-issuable-type="issue" data-show-categorized-issues="false" data-wi-autocomplete-award-emojis-path="/-/autocomplete/award_emojis" data-wi-can-admin-label="false" data-wi-default-branch="main" data-wi-full-path="GNOME/gtk" data-wi-group-path="GNOME" data-wi-is-signed-in="false" data-wi-issues-list-path="/GNOME/gtk/-/issues" data-wi-labels-manage-path="/GNOME/gtk/-/labels" data-wi-new-comment-template-paths="[{"text":"Your comment templates","href":"/-/profile/comment_templates"}]" data-wi-register-path="/users/sign_up?redirect_to_referer=yes" data-wi-report-abuse-path="/-/abuse_reports/add_category" data-wi-show-new-issue-link="false" data-wi-sign-in-path="/users/sign_in?redirect_to_referer=yes"></div> <div data-has-closing-merge-request="true" data-iid="7151" data-project-path="GNOME/gtk" id="js-related-merge-requests"></div> <div data-url="/GNOME/gtk/-/issues/7151/related_branches" id="related-branches"> </div> </div> <div class="js-issue-widgets"> <section class="issuable-discussion js-vue-notes-event"> <div data-can-add-timeline-events="false" data-current-user-data="null" data-new-comment-template-paths="[{"text":"Your comment templates","href":"/-/profile/comment_templates"}]" data-noteable-data="{"id":210244,"iid":7151,"description":"We have a lot of checks that do critical in cases there could be undefined behavior. Like all the cases where wrong types are passed and functions return NULL.\n\nUnfortunately, a bunch of our core software use displays before init like Loupe, Nautilus, xdg-desktop-portal-gnome, Console, libshumate, and Initial Setup.\n\nIf a distro updates to GTK 4.18 but failes to update one of these components, we will end up with unnecessary crashes. I would therefore suggest to make !7836 a critical like it is the case for many similar behaviors.","title":"gdk: Make using displays before init a critical instead of error","time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null,"state":"opened","milestone_id":null,"updated_by_id":null,"created_at":"2024-11-11T15:56:08Z","updated_at":"2024-11-11T18:01:43Z","milestone":null,"labels":[],"lock_version":0,"author_id":468,"confidential":false,"discussion_locked":null,"assignees":[],"due_date":null,"project_id":665,"moved_to_id":null,"duplicated_to_id":null,"web_url":"/GNOME/gtk/-/issues/7151","current_user":{"can_create_note":false,"can_create_confidential_note":false,"can_update":false,"can_set_issue_metadata":false,"can_award_emoji":false},"create_note_path":"/GNOME/gtk/notes?target_id=210244\u0026target_type=issue","preview_note_path":"/GNOME/gtk/-/preview_markdown?target_id=7151\u0026target_type=Issue","is_project_archived":false,"issue_email_participants":[],"type":"ISSUE"}" data-noteable-type="Issue" data-notes-data="{"noteableType":"issue","noteableId":210244,"projectId":665,"groupId":null,"discussionsPath":"/GNOME/gtk/-/issues/7151/discussions.json","registerPath":"/users/sign_up?redirect_to_referer=yes","newSessionPath":"/users/sign_in?redirect_to_referer=yes","markdownDocsPath":"/help/user/markdown","quickActionsDocsPath":"/help/user/project/quick_actions","closePath":"/GNOME/gtk/-/issues/7151.json?issue%5Bstate_event%5D=close","reopenPath":"/GNOME/gtk/-/issues/7151.json?issue%5Bstate_event%5D=reopen","notesPath":"/GNOME/gtk/noteable/issue/210244/notes","prerenderedNotesCount":7,"lastFetchedAt":1732440844000000,"notesFilter":null}" data-notes-filters="{"Show all activity":0,"Show comments only":1,"Show history only":2}" data-report-abuse-path="/-/abuse_reports/add_category" data-show-timeline-view-toggle="false" data-target-type="issue" id="js-vue-notes"></div> </section> </div> </div> <aside aria-label="issue" aria-live="polite" class="right-sidebar js-right-sidebar js-issuable-sidebar right-sidebar-expanded" data-always-show-toggle data-auto-collapse data-issuable-type="issue"> <div class="issuable-sidebar"> <div class="issuable-sidebar-header"> <button class="gl-button btn btn-md btn-default gutter-toggle gl-float-right js-sidebar-toggle has-tooltip !gl-shadow-none gl-block " type="button" aria-label="Toggle sidebar" title="Collapse sidebar" data-container="body" data-placement="left" data-boundary="viewport" type="button"><span class="gl-button-text"> <span class="js-sidebar-toggle-container gl-button-text" data-is-expanded="true"><svg class="s16 js-sidebar-expand hidden" data-testid="chevron-double-lg-left-icon"><use href="/assets/icons-50888ef7fb46c3a1fb53bc67cfc1085be59395f0d49dd55cdd8a8e269dede05b.svg#chevron-double-lg-left"></use></svg><svg class="s16 js-sidebar-collapse " data-testid="chevron-double-lg-right-icon"><use href="/assets/icons-50888ef7fb46c3a1fb53bc67cfc1085be59395f0d49dd55cdd8a8e269dede05b.svg#chevron-double-lg-right"></use></svg></span> </span> </button></div> <form class="issuable-context-form inline-update js-issuable-update " action="/GNOME/gtk/-/issues/7151.json" accept-charset="UTF-8" data-remote="true" method="post"><div class="block assignee gl-mt-3" data-testid="assignee-block-container"> <div class="js-sidebar-assignees-root" data-field="issue" data-max-assignees="1"> <div class="title hide-collapsed gl-flex gl-justify-between gl-items-center !gl-mb-0"> <span class="gl-font-bold">Assignee</span> <span class="gl-spinner-container" role="status"><span aria-label="Loading" class="gl-spinner gl-spinner-sm gl-spinner-dark !gl-align-text-bottom"></span></span> </div> </div> </div> <div class="js-sidebar-labels-widget-root" data-allow-label-create="" data-allow-scoped-labels="" data-can-edit="" data-iid="7151" data-issuable-type="issue" data-labels-fetch-path="/GNOME/gtk/-/labels.json?include_ancestor_groups=true" data-labels-manage-path="/GNOME/gtk/-/labels" data-project-issues-path="/GNOME/gtk/-/issues" data-project-path="GNOME/gtk" data-selected-labels="[]"></div> <div class="block milestone" data-testid="sidebar-milestones"> <div class="js-sidebar-milestone-widget-root" data-can-edit="" data-issue-iid="7151" data-project-path="GNOME/gtk"></div> </div> <div class="js-sidebar-due-date-widget-root"></div> <div class="js-sidebar-time-tracking-root block"> <!-- / Fallback while content is loading --> <div class="title hide-collapsed gl-flex gl-justify-between gl-items-center !gl-mb-0"> <span class="gl-font-bold">Time tracking</span> <span class="gl-spinner-container" role="status"><span aria-label="Loading" class="gl-spinner gl-spinner-sm gl-spinner-dark !gl-align-text-bottom"></span></span> </div> </div> <script id="js-confidential-issue-data" type="application/json">{"is_confidential":false,"is_editable":null}</script> <div class="js-sidebar-confidential-widget-root"></div> <div class="js-sidebar-participants-widget-root"></div> </form><script class="js-sidebar-options" type="application/json">{"endpoint":"/GNOME/gtk/-/issues/7151.json?serializer=sidebar_extras","toggleSubscriptionEndpoint":"/GNOME/gtk/-/issues/7151/toggle_subscription","moveIssueEndpoint":"/GNOME/gtk/-/issues/7151/move","projectsAutocompleteEndpoint":"/-/autocomplete/projects?project_id=665","editable":"","currentUser":{},"rootPath":"/","fullPath":"GNOME/gtk","iid":7151,"id":210244,"severity":"unknown","timeTrackingLimitToHours":false,"canCreateTimelogs":null,"createNoteEmail":null,"issuableType":"issue","directlyInviteMembers":"false"}</script> </div> </aside> </main> </div> </div> </div> <script> //<![CDATA[ if ('loading' in HTMLImageElement.prototype) { document.querySelectorAll('img.lazy').forEach(img => { img.loading = 'lazy'; let imgUrl = img.dataset.src; // Only adding width + height for avatars for now if (imgUrl.indexOf('/avatar/') > -1 && imgUrl.indexOf('?') === -1) { const targetWidth = img.getAttribute('width') || img.width; imgUrl += `?width=${targetWidth}`; } img.src = imgUrl; img.removeAttribute('data-src'); img.classList.remove('lazy'); img.classList.add('js-lazy-loaded'); img.dataset.testid = 'js-lazy-loaded-content'; }); } //]]> </script> <script> //<![CDATA[ gl = window.gl || {}; gl.experiments = {}; //]]> </script> </body> </html>