<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Inspector crashes if LANG env var specifies encoding"
href="https://bugs.webkit.org/show_bug.cgi?id=167991">167991</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Inspector crashes if LANG env var specifies encoding
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Other
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Web Inspector
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mod-wkbz@mt2015.com
</td>
</tr>
<tr>
<th>CC</th>
<td>inspector-bugzilla-changes@group.apple.com
</td>
</tr></table>
<p>
<div>
<pre>I'm using WebKit2GTK+ 2.14.3 on Arch Linux, but this bug has been around for some time.
The only locale-related {LC_*, LOCALE, LANG} environment variable set on my system is "LANG=es_ES.utf8". In this configuration, opening the WebKit2 inspector results in a "Web Inspector encountered an internal error." page instead of a working inspector.
If I set LANG to "es_ES" or "en_US" or "C", the inspector works. If I set LANG to the (invalid) "es_ES.", the C library complains about an invalid locale as it should:
(process:15144): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
The browser then runs in English, but the inspector still crashes in the same way.
Given that no other software complains about "LANG=es_ES.utf8", the inspector should be fixed to also support such "locale.encoding" values.
The JS exception stack is attached below; it looks like IntlDateTimeFormat::initializeDateTimeFormat is really the problem here but I couldn't figure out how specifically.
-------
Inspected URL: (unknown)
Loading completed: false
Frontend User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/603.1 (KHTML, like Gecko) Version/10.0 Safari/603.1
Uncaught Exceptions:
- TypeError: failed to initialize DateTimeFormat due to invalid locale (at LogTreeElement.js:32:107)
DateTimeFormat @ [native code]
toLocaleTimeString @ [native code]
LogTreeElement @ LogTreeElement.js:32:107
contentLoaded @ Main.js:247:63
? @ [native code]
- TypeError: undefined is not an object (evaluating 'this.tabBrowser.updateLayout') (at Main.js:1512:20)
_tabBrowserSizeDidChange @ Main.js:1512:20
_windowResized @ Main.js:1401:34
? @ [native code]</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>