<?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>171207</bug_id>
          
          <creation_ts>2017-04-23 17:09:35 -0700</creation_ts>
          <short_desc>[GTK] Web Inspector: crashes on every page</short_desc>
          <delta_ts>2018-07-25 13:47:01 -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>JavaScriptCore</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>167991</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>dirk.fizzlebeef</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>sergey</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1300381</commentid>
    <comment_count>0</comment_count>
    <who name="">dirk.fizzlebeef</who>
    <bug_when>2017-04-23 17:09:35 -0700</bug_when>
    <thetext>Every time I attempt to open the web inspector on any page, it shows an error page that begins with &quot;Web Inspector encountered an internal error&quot; and throws this error in the console: 

    (midori4:27162): Gtk-WARNING **: Allocating size to WebKitWebViewBase 0x10f8700 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? 

I asked about this in the #midori channel on Freenode and was told it&apos;s a regression in WebKit GTK, so I&apos;m opening the bug here instead of there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300382</commentid>
    <comment_count>1</comment_count>
    <who name="">dirk.fizzlebeef</who>
    <bug_when>2017-04-23 17:10:18 -0700</bug_when>
    <thetext>Oh yeah, this is in version 2.16.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300386</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-04-23 17:52:16 -0700</bug_when>
    <thetext>Note that GTK+ warning is irrelevant and not causing this problem.

The web inspector is working fine here with 2.16.1. I&apos;m actually not sure how to debug this, considering it probably can&apos;t inspect itself if it&apos;s always failing like this....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1376751</commentid>
    <comment_count>3</comment_count>
    <who name="Sergey Mende">sergey</who>
    <bug_when>2017-12-01 01:15:06 -0800</bug_when>
    <thetext>The problem lies in the discrepancy between LANG environment variable format and  https://www.rfc-editor.org/rfc/bcp/bcp47.txt spec.

The Web Inspector does not cause an internal error if LANG is set to a simple two characters language code, i.e.:

    env LANG=&quot;en&quot; midori

works just fine. 

As soon as LANG is set to a full spec, e.g. &quot;en_US.UTF-8&quot;, the Web Inspector fails to open with the following message in its pane:

TypeError:​ failed to initialize NumberFormat due to invalid locale (at Utilities.js:​801:​57)​
    NumberFormat @ [native code]​
    toLocaleString @ [native code]​
    d @ Utilities.js:​801:​57
    value @ Utilities.js:​881:​64
    value @ Utilities.js:​899:​29
    _loadNewRecording @ TimelineManager.js:​655:​108
    reset @ TimelineManager.js:​114:​31
    TimelineManager @ TimelineManager.js:​62:​19
    loaded @ Main.js:​130:​50
    global code @ Main.html:​808:​18


I am using stock FC26&apos;s package (webkitgtk4-2.18.3-1.fc26.x86_64)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1376802</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-01 07:15:06 -0800</bug_when>
    <thetext>Interesting. It works for me using en_US.UTF-8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1376936</commentid>
    <comment_count>5</comment_count>
    <who name="Sergey Mende">sergey</who>
    <bug_when>2017-12-01 11:24:21 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; Interesting. It works for me using en_US.UTF-8.

Michael,

If you give me a hint where the source requests process locale then I could trace the problem: the code is quite huge, so my quick attempt to locate it has failed.

Sergey</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1376987</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-01 12:49:53 -0800</bug_when>
    <thetext>I did some grepping and found Source/JavaScriptCore/runtime/IntlNumberFormat.cpp. The failure is occurring in IntlNumberFormat::initializeNumberFormat. I would look closely at resolveLocale in IntlObject.cpp. If you&apos;re able to rebuild WebKit, adding printfs is by far the easiest way to debug a problem like this. Good luck!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445145</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-07-25 13:47:01 -0700</bug_when>
    <thetext>

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

    </bug>

</bugzilla>