Bug 50111 - WebGL interaction using WebGL-Inspector to examine textures crashes Safari
Summary: WebGL interaction using WebGL-Inspector to examine textures crashes Safari
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 116924
  Show dependency treegraph
 
Reported: 2010-11-26 06:48 PST by Stephen Bannasch
Modified: 2024-01-17 01:20 PST (History)
8 users (show)

See Also:


Attachments
Safari crash report (39.15 KB, text/plain)
2010-11-26 06:49 PST, Stephen Bannasch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Bannasch 2010-11-26 06:48:31 PST
24-Nov-2010 01:32 PM Stephen Bannasch:
Summary: 

Using WebGL-Inspector (http://benvanik.github.com/WebGL-Inspector/) to examine textures crashes WebKit nightly.

This also crashes Chromium.

See original bug report and comments here: https://github.com/benvanik/WebGL-Inspector/issues#issue/38

Whether or not WebGL-Inspector works Safari should not crash.

Steps to Reproduce:

Installed extension:
https://github.com/downloads/benvanik/WebGL-Inspector/WebGL-Inspector-v1.1.safariextz

Open this page: http://visual-demos.dev.concord.org/seasons/earth/index.html

click: GL (button in left of toolbar)
click: Capture
click: UI
click: Textures
click: Texture 23 4096x2048

Expected Results:

Safari doesn't crash.

Actual Results:

Safari crash.

Regression:

Whether or not WebGL-Inspector works Safari should not crash.

notes

This is also in Radar as 8699623.
Comment 1 Stephen Bannasch 2010-11-26 06:49:35 PST
Created attachment 74933 [details]
Safari crash report
Comment 2 Zhenyao Mo 2010-12-17 10:44:26 PST
I'll take a look.
Comment 3 Zhenyao Mo 2010-12-17 11:27:20 PST
ASSERTION failure in WebCore/loader/cache/MemoryCahce.cpp:revalidationSucceeded():

ASSERT(revalidatingResource->inCache());

Cc'd Nate on this.
Comment 4 Nate Chapin 2011-01-05 11:21:44 PST
(In reply to comment #3)
> ASSERTION failure in WebCore/loader/cache/MemoryCahce.cpp:revalidationSucceeded():
> 
> ASSERT(revalidatingResource->inCache());
> 
> Cc'd Nate on this.

I'm unable to repro this because I'm not able to see the WebGL inspector or interact with it.  When I click on the GL button on http://visual-demos.dev.concord.org/seasons/earth/index.html, it disables WebGL entirely.

Did something change, or am I doing something wrong?
Comment 5 Stephen Bannasch 2011-01-07 09:37:59 PST
I have just installed v1.4 of WebGL Inspector from this page: http://benvanik.github.com/WebGL-Inspector/ into 74228 and have replicated the same behavior you experienced.

I do not see this behavior when visiting this very simple test WebGL page: http://learningwebgl.com/lessons/lesson01/index.html.

I am using the JavaScript library modernizr v1.6 and the function Modernizr.webgl to test for the presence of WebGL functionality:

https://github.com/stepheneb/seasons/blob/master/earth/index.html#L48

Here's where modernizer tests for webgl:

https://github.com/Modernizr/Modernizr/blob/master/modernizr.js#L300

So it seems to be an unfortunate interaction between Modernzer and WebGL Inspector.

I am investigating and will update this ticket shortly.
Comment 6 Stephen Bannasch 2011-01-07 11:24:23 PST
I've updated the example code that shows the bug here:

http://visual-demos.dev.concord.org/seasons/earth/index.html

If *ALL* your caches are empty that relate to the resources on that page[1] you should be able to load that page and successfully start the WebGL inspector.

Once that is done open the WebGL Inspectors UI panel, select the Textures tab and select the first texture.

On my system this crashes Safari. I could attach and updated crash log if that is helpful.

[1]
Often I find when debugging WebGL that reloading the page doesn't clear all the caches
Sometimes  cmd-opt-E and restarting the browser fixes the stale cache issues.

In this particular case even after doing thatSafari itself was crashing when I opened the WebKit Inspector after loading the page. Looking into this problem it seemed that multiple old breakpoints were being cached improperly. Sometime when the inspector didn't crash Safari It would see the the breakpoints Inpspector panel continually fill up with duplicates of the same breakpoint.
Comment 7 Stephen Bannasch 2011-01-07 11:41:15 PST
I just tried opening the WebGL Inspector again after loading the page and now the behavior is back to indicating that WebGL is not enabled after clicking the "GL" button.

Very confusing ...
Comment 8 Stephen Bannasch 2011-01-07 12:35:03 PST
OK ...this time I used Jing to make a screencast and posted it to screencast.com here: http://www.screencast.com/t/QtyFM5NG77T

The screencast shows the problem I  experience with The WebKit Inspector breakpoint panel continuously filling with duplicate breakpoints. For most of the screencast I was unable to get the page to display the WebGL content after starting WebGL Inspector.

However at the very end I was able to open WebGL Inspector with the WebGL content and replicate the crash when viewing a texture using WebGL Inspector.