You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(This is partially duplicated from gtk-rs/gir#1590, because I think that's where the fix should ultimately go, even though the bug itself affects gtk4-rs)
Using some builders before initializing GTK can cause a segfault. Instead, the generated builder should check if GTK has been initialized, and panic if not.
use gtk4::prelude::*;use gtk4::{Application,ApplicationWindow, glib};constAPP_ID:&str = "me.annahope.gtk4-rs-segfault";fnbuild_ui(app:&Application){let window = ApplicationWindow::builder().application(app).title("Segfault").build();// Segfaults if GTK hasn't been initialized.
window.present();}fnmain() -> glib::ExitCode{let app = Application::builder().application_id(APP_ID).build();// app.connect_activate(build_ui); // Doesn't segfault, as expectedbuild_ui(&app);// Segfaults.
app.run()}
(This is partially duplicated from gtk-rs/gir#1590, because I think that's where the fix should ultimately go, even though the bug itself affects gtk4-rs)
Using some builders before initializing GTK can cause a segfault. Instead, the generated builder should check if GTK has been initialized, and panic if not.
Stacktrace
The text was updated successfully, but these errors were encountered: