Results 1 to 8 of 8

Thread: Chrome crashing...

  1. #1
    Member Coolcat's Avatar
    Join Date
    Oct 2009
    Location
    NRW, Germany
    Posts
    75

    Chrome crashing...

    My current WebGL-App does run fine under Firefox. Currently I'm trying to get it to run on Chrome/Webkit. For some strange reason it's just crashing the JS-Tread:
    http://www-users.rwth-aachen.de/martin. ... quest.html

    I have absolute no idea what's causing this. Chrome seems to have some kind of build in JS-Debugger which could be useful here. The problem is: Either it does not work or I'm to stupid to use it. Breakpoints do not have any effect? Could anyone help me trying to find the line causing the problem? (The sourcecode is generated by GoogleWebToolkit with style "PRETTY")

    Actually there is NO demo I get to run with the current Chrome build I got here. In all demos I tried I got an error that function getShaderi does not exist. That's why I'm executing the following compatibility code:
    Code :
    if (!gl.getShaderi) {
    	gl.getShaderi = gl.getShaderParameter;
    }
    if (!gl.getProgrami) {
    	gl.getProgrami = gl.getProgramParameter;
    }

  2. #2
    Junior Member
    Join Date
    Nov 2009
    Location
    Berlin, Germany
    Posts
    3

    Re: Chrome crashing...

    Yeah, bit me too

    Is Mozilla also adapting this API?

  3. #3
    Member Coolcat's Avatar
    Join Date
    Oct 2009
    Location
    NRW, Germany
    Posts
    75

    Re: Chrome crashing...

    Is Mozilla also adapting this API?
    I don't know why Chrome has now getShaderParameter and getProgramParameter. Thats out of OpenGL ES 2.0 specification. However, Firefox has both methods and it seems they are identical to getShaderi respectively getProgrami.

    But, that does not explain why Chrome is crashing. I think I will have to insert log messages everywhere in my code to get a hint where this crash happens. The problem is I'm developing on Linux and Chrome with WebGL does only run on Windows for me. I have to reboot every time I want to change something in the code. That makes debugging using log messages really hard. A working Chrome debugger would be much easier...

  4. #4
    Member Coolcat's Avatar
    Join Date
    Oct 2009
    Location
    NRW, Germany
    Posts
    75

    Re: Chrome crashing...

    Smash head on keyboard to continue....I was using the wrong Chrome version, that was also the reason why nothing else worked. When using the DevChannel-Version it work's fine.

  5. #5
    Junior Member
    Join Date
    Nov 2009
    Posts
    7

    Re: Chrome crashing...

    Re: get*i -> get*Parameter, it seems to be a recent rename http://twitter.com/ohunt/status/6066422106

    I think Firefox is going there as well (if isn't there already, IIRC Firefox was using the get*Parameter stuff to begin with, then added the get*i aliases at some point.) But yeah, joys of in-development APIs.

  6. #6
    Member
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    90

    Re: Chrome crashing...

    It looks like it was WebKit checkin #51348 that made the change -- the message says:

    Change get... calls to latest spec
    https://bugs.webkit.org/show_bug.cgi?id=30091

    Removed old versions of get calls on WebGLRenderingContext and
    added new ones per spec returning "any". New code simplifies
    GraphicsContext3D and fixes previously unimplemented routines.
    Added custom JS and V8 bindings. Added exhaustive test case
    exercising all new code paths. Updated preexisting test cases for
    new APIs. Fixed preexisting bugs in WebKit's and Chrome's WebGL
    implementations.

    Ran WebGL layout tests in WebKit (clean) and Chrome (couple of
    preexisting known failures) and manual WebGL tests in both
    browsers.
    It's a huge change, but the relevant bits (I think) are the ones in WebCore/html/canvas/WebGLRenderingContext.cpp and its associated header, and as far as I can make out from the diffs, they are:

    • A few bits of improved error handling[/*:m:dhgt0vrt]
    • getBoolean, getBooleanv, getFloat, getFloatv, getInteger, getIntegerv merged to getParameter[/*:m:dhgt0vrt]
    • getBufferParameteri, getBufferParameteriv merged to getBufferParameter[/*:m:dhgt0vrt]
    • getFramebufferAttachmentParameteri, getFramebufferAttachmentParameteriv merged to getFramebufferAttachmentParameter[/*:m:dhgt0vrt]
    • getProgrami, getProgramiv merged to getProgramParameter[/*:m:dhgt0vrt]
    • getRenderbufferParameteri, getRenderbufferParameteriv merged to getRenderbufferParameter[/*:m:dhgt0vrt]
    • getShaderi, getShaderiv merged to getShaderParameter[/*:m:dhgt0vrt]
    • getTexParameterf, getTexParameterfv, getTexParameteri, getTexParameteriv merged to getTexParameter[/*:m:dhgt0vrt]
    • getUniformf, getUniformfv, getUniformi, getUniformiv merged to getUniform[/*:m:dhgt0vrt]
    • getVertexAttribf, getVertexAttribfv, getVertexAttribi, getVertexAttribiv merged to getVertexAttrib[/*:m:dhgt0vrt]


    I think I prefer the new names; they seem more appropriate for a dynamic language like JavaScript, while the older ones were much better designed for the statically-typed C/C++. Of course, this does mean that WebGL is becoming less and less of just a set of JavaScript bindings for OpenGL ES 2.0, but that may be a good thing.

    Does anyone (Ilmari?) know where the equivalent file to WebGLRenderingContext.cpp, defining the public interface for the WebGL context, exists in the Firefox source tree? I did have a link to an IDL file that seemed to perform the same function, but I've lost it. It'd be great if I could put together a compatibility patch to put at the start of my lessons (and for other people to use) that would allow us to use the new API while retaining Firefox compatibility, but that'll be tricky if the untyped get.. methods don't all exist there. (Of course, I could just try them and see if they work, but it would be nice to see the source

  7. #7

  8. #8
    Member
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    90

    Re: Chrome crashing...

    Thanks, Ilmari -- that's the one!

    So, from the diffs there it looks like Mark Steele checked an equivalent change in to Firefox on 18 November, but was kind enough to leave the --i versions there (flagged "// XXX remove") for the time being.

    Given that both browsers are moving toward the new system, Firefox supports both the old and the new names, and WebKit supports only the new ones, I guess it's time to change our demos.

    Looking forward to the draft spec...

Similar Threads

  1. Chrome 9 to Chrome 10 Problems
    By p0pes in forum WebGL - General
    Replies: 8
    Last Post: 03-14-2011, 10:00 AM
  2. Crashing after 64 textures
    By Freakjob in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 07-20-2009, 05:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •