Bug 156688 - Javascript error, only when debugger is _not_ connected
Summary: Javascript error, only when debugger is _not_ connected
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-18 01:17 PDT by Markus Johnsson
Modified: 2016-04-25 13:59 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Johnsson 2016-04-18 01:17:42 PDT
I have encountered a bug in Safari/webkit that appears only when the developer tools are *not* open, which makes me think it is related to optimisation of javascript. 

The easiest way to confirm there is an issue is to use the following link (no interaction required):
http://res.statisticsstudio.com/app-v81/player.htm?app=b546db83-f6dd-4c0c-b266-9637265a08f9&v=v81

Opened with the developer tools / web inspector open, it loads correctly. If the developer tools are not open, it does not load.

It loads fine in Chrome, IE, Firefox

This link, for comparison (same javascript, less data), loads OK even without debugger in Safari:
http://res.statisticsstudio.com/app-v81/player.htm?app=cc22d264-322d-4cd4-819a-e1d5efbd7c21&v=v81


An interactive repro is also available (which actually outputs an error):
http://res.statisticsstudio.com/app-v81/default.htm?app=9650898a-0a88-49e6-b10d-b1ef68544a6d

1. Close developer tools / web inspector window
2. Click “Kom igång!”
3. Check “Utbildningsnivå” in the left panel
4. Click “Klar” at the bottom
5. Click the leftmost layout button
6. Click “Linjediagram”
7. In the far right panel, click “Län”
8. Click all items in the “Län” list (crashes towards the end of the list: “undefined is not an object”)

Try again with developer tools open, at it does not crash.
Comment 1 Alexey Proskuryakov 2016-04-18 20:59:12 PDT
Reproduced in Safari 9.1 (didn't try a nightly).
Comment 2 Radar WebKit Bug Importer 2016-04-22 12:44:18 PDT
<rdar://problem/25883047>
Comment 3 Geoffrey Garen 2016-04-22 13:09:18 PDT
This bug appears to be fixed in trunk.

Can you re-test with a WebKit Nightly Build or Safari Technology Preview?
Comment 4 Markus Johnsson 2016-04-24 23:23:01 PDT
Yes. The problem is gone in Safari Technology Preview. Any hints for what goes wrong and any workarounds I can use to fix the issue in our app?
Comment 5 Geoffrey Garen 2016-04-25 13:59:30 PDT
(In reply to comment #4)
> Yes. The problem is gone in Safari Technology Preview. Any hints for what
> goes wrong and any workarounds I can use to fix the issue in our app?

That's great news. Unfortunately, we don't have a clear diagnosis of the bug, so I don't have a workaround to recommend.