<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>233997</bug_id>
          
          <creation_ts>2021-12-08 02:25:19 -0800</creation_ts>
          <short_desc>Connecting to context menu signal leads to segfault</short_desc>
          <delta_ts>2021-12-15 06:47:34 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>233785</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jan">EvilTwin1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>EvilTwin1</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1821492</commentid>
    <comment_count>0</comment_count>
    <who name="Jan">EvilTwin1</who>
    <bug_when>2021-12-08 02:25:19 -0800</bug_when>
    <thetext>I&apos;m using the rust bindings to the Gtk4 version of webkit2gtk. I used them with both a local build of webkit as well as with the version in the org.gnome.Sdk flatpak runtime.
Connecting to the context-menu signal leads to a segmentation fault.

&gt; GLib-GObject-WARNING **: 08:53:00.267: value_to_ffi_type: Unsupported fundamental type: GdkEvent Segmentation fault (core dumped)

Asking about it in the &quot;Rust &lt;3 Gnome&quot; Matrix channel it was explained to me that this is an issue with webkit itself:

&gt; slomo:
&gt; value_to_ffi_type() is the libffi signal marshaller thingy from glib, and that can&apos;t handle custom fundamental types (i mean, that&apos;s what it says there 🙂 )
&gt; the Rust code is probably correct but webkitgtk will have to use a customer marshaller for that signal
&gt; it needs to do things like here https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gdk/gdksurface.c#L647-660
&gt; important in that context is also the type annotation here https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gdk/gdksurface.c#L641


&gt; Emmanuele Bassi:
&gt; Correct. Events are instance types, and there’s no marshaller for those because GType is stupid
&gt; You need to provide a marshaller yourself
&gt; Though I’d recommend not passing around event instances to begin with

I don&apos;t feel confident to prepare a patch to webkit myself. But I hope this report provides enough information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1824339</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-12-15 06:47:34 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 233785 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>