(In reply to Andrew McCreight [:mccr8] from comment #3) > But it stills seems to me like the most likely cause here is that `nsWindow::mShell` is pointing at a freed object in nsWindow::GetToplevelGdkWindow(), because it is a weak pointer. We explicitly clear mShell on init and also on nsWindow::Destroy() here: https://searchfox.org/mozilla-central/rev/18f09bdf36a62ea7079c018301f1d257f71f655b/widget/gtk/nsWindow.cpp#655 the only way how mShell can get a5a5 signature is that whole nsWindow is released. gtk_widget_get_window() looks like: ``` GdkWindow* gtk_widget_get_window (GtkWidget *widget) { g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); return widget->priv->window; } ``` so it may be possible that widget->priv is 5a5a5a but that means the widget is deleted somehow without our notice but I have no idea how that can happens as we own it. But okay, I'll try to add destroy handler listener to it so we know for sure.
Bug 1924108 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Andrew McCreight [:mccr8] from comment #3) > But it stills seems to me like the most likely cause here is that `nsWindow::mShell` is pointing at a freed object in nsWindow::GetToplevelGdkWindow(), because it is a weak pointer. We explicitly clear mShell on init and also on nsWindow::Destroy() here: https://searchfox.org/mozilla-central/rev/18f09bdf36a62ea7079c018301f1d257f71f655b/widget/gtk/nsWindow.cpp#655 the only way how mShell can get a5a5 signature is that whole nsWindow is released. gtk_widget_get_window() looks like: ``` GdkWindow* gtk_widget_get_window (GtkWidget *widget) { g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); return widget->priv->window; } ``` so it may be possible that widget->priv is 5a5a5a but that means the widget is deleted somehow without our notice but I have no idea how that can happen as we own it. But okay, I'll try to add destroy handler listener to it so we know for sure.