picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.54k stars 320 forks source link

GTK crashes with libwebkit2gtk-5.0 #2361

Open Miepee opened 1 year ago

Miepee commented 1 year ago

Expected Behavior

The program should not crash

Actual Behavior

The program crashes

*****Stack Trace*****

   at Eto.GtkSharp.NativeMethods.NMLinux.webkit_web_view_new()
   at Eto.GtkSharp.NativeMethods.webkit_web_view_new()
   at Eto.GtkSharp.Forms.Controls.WebViewHandler..ctor()
   at Eto.GtkSharp.Platform.<>c.<AddTo>b__12_61()
   at Eto.Widget..ctor()
   at Eto.Forms.BindableWidget..ctor()
   at Eto.Forms.Control..ctor()
   at Eto.Forms.WebView..ctor()

Steps to Reproduce the Problem

  1. Download libwebkit2gtk-5.0
  2. Run a GTK Eto program which uses webkit

Specifications

Miepee commented 1 year ago

FWIW, i tried modifying eto to load webkit 5.0 and was greeted with this

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.637: specified class size for type 'WebKitWebViewBase' is smaller than the parent type's 'GtkWidget' class size

(Eto.Test.Gtk:270719): GLib-CRITICAL **: 23:53:43.637: g_once_init_leave: assertion 'result != 0' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.637: g_type_register_static: assertion 'parent_type > 0' failed

(Eto.Test.Gtk:270719): GLib-CRITICAL **: 23:53:43.637: g_once_init_leave: assertion 'result != 0' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.637: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(Eto.Test.Gtk:270719): Gtk-CRITICAL **: 23:53:43.637: gtk_container_add: assertion 'GTK_IS_WIDGET (widget)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.638: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.638: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.638: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.638: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Eto.Test.Gtk:270719): Gtk-CRITICAL **: 23:53:43.640: gtk_widget_add_events: assertion 'GTK_IS_WIDGET (widget)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: invalid (NULL) pointer instance

(Eto.Test.Gtk:270719): GLib-GObject-CRITICAL **: 23:53:43.640: g_signal_connect_closure: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

Goes way over my head, but thought it might be useful for someone as a starting point

Miepee commented 4 months ago

This now also affects webkit6