<?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>256641</bug_id>
          
          <creation_ts>2023-05-11 05:50:38 -0700</creation_ts>
          <short_desc>[GStreamer] Crash when destroying GstGLContext</short_desc>
          <delta_ts>2023-05-12 13:24:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>255721</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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1954679</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-05-11 05:50:38 -0700</bug_when>
    <thetext>I&apos;ve hit this SIGSEGV crash three times in the past two days:

(gdb) bt
#0  0x00007effb5dd9e7d in gst_object_unref (object=0x100000010) at ../gst/gstobject.c:260
#1  0x00007effbbaca8fa in WTF::GRefPtr&lt;_GstGLContext&gt;::operator=(_GstGLContext*)
    (this=0x7effa9010650, optr=0x0 [_GstGLContext]) at WTF/Headers/wtf/glib/GRefPtr.h:162
#2  WebCore::PlatformDisplay::terminateEGLDisplay() (this=0x7effa90105e0)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/platform/graphics/PlatformDisplay.cpp:347
#3  0x00007effbbacb848 in WebCore::PlatformDisplay::initializeEGLDisplay()::$_4::operator()() const
    (this=&lt;optimized out&gt;)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/platform/graphics/PlatformDisplay.cpp:336
#4  WebCore::PlatformDisplay::initializeEGLDisplay()::$_4::__invoke() ()
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/platform/graphics/PlatformDisplay.cpp:333
#5  0x00007effb90418e6 in __run_exit_handlers
    (status=0, listp=0x7effb91fe658 &lt;__exit_funcs&gt;, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:113
#6  0x00007effb9041a4e in __GI_exit (status=&lt;optimized out&gt;) at exit.c:143
#7  0x00007effb9029551 in __libc_start_call_main
     (main=main@entry=0x558f84428150 &lt;main&gt;, argc=argc@entry=3, argv=argv@entry=0x7fffb0798598)
    at ../sysdeps/nptl/libc_start_call_main.h:74
#8  0x00007effb902960b in __libc_start_main_impl
     (main=0x558f84428150 &lt;main&gt;, argc=3, argv=0x7fffb0798598, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=&lt;optimized out&gt;) at ../csu/libc-start.c:389
#9  0x0000558f84428085 in _start ()

This backtrace is using 2.41.3 (Epiphany Tech Preview). The crash occurs when setting m_gstGLContext = nullptr; at the top of PlatformDisplay::terminateEGLDisplay. Notice that m_gstGLContext contains 0x100000010 which is suspicious and probably garbage?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1954984</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-05-12 08:11:55 -0700</bug_when>
    <thetext>Any steps to reproduce would be welcome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1954987</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-05-12 08:26:53 -0700</bug_when>
    <thetext>It&apos;s very unlikely that I&apos;ll figure out how to reproduce this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955068</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-05-12 13:24:28 -0700</bug_when>
    <thetext>

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

    </bug>

</bugzilla>