Closed Bug 585502 Opened 14 years ago Closed 14 years ago

Crash [@ @0x0 strlen | nsICanvasRenderingContextWebGL_CompileShader] [@ strlen | nsICanvasRenderingContextWebGL_CompileShader ]

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: katestarbird, Assigned: vlad)

References

()

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0b4pre) Gecko/20100808 Minefield/4.0b4pre Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0b4pre) Gecko/20100808 Minefield/4.0b4pre This webgl o3d development site, which has been functioning pretty well, now crashes every time. All you have to do is navigate there. Though I'm getting lots of crashes with today's build - so this may be a more general issue than o3d webgl. Reproducible: Always Steps to Reproduce: 1. http://www.cs.colorado.edu/~starbird/avatar_code/avatar_webgl.html 2. 3. Actual Results: crash Expected Results: functional o3d demo
Repro on Mozilla/5.0 (Windows NT 6.0; WOW64; rv:2.0b4pre) Gecko/20100809 bp-f65872a4-a7e2-4b5d-966c-584082100809
Status: UNCONFIRMED → NEW
Component: General → Canvas: WebGL
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → canvas.webgl
Version: unspecified → Trunk
I've been crashing whenever I load a page using WebGL, here's one stack. bp-585b45ab-2524-4f52-b291-48d0e2100808
No crash on linux x86-64 / nvidia driver / mozilla-central from today
Strange, the back-trace looks a lot like bug 579191 which was fixed 2 weeks ago.
ok, this crash is on ANGLE-using code, so I guess the reason why I'm not getting it is that ANGLE is not enabled on linux x86-64. See bug 578877. if anyone wants to help debug this: at WebGLContextGL.cpp:2867, please print the value of |ShGetInfoLog(compiler)|. I would guess that it returns a null pointer for some reason...
Attached patch Patch v1 (obsolete) — Splinter Review
The retval from ShGetInfoLog needs to be checked since nsDependentCString does not accept NULL buffers - we end up calling strlen(NULL). ShGetInfoLog appears to be failing because the process hasn't been initialized...
Assignee: nobody → wesongathedeveloper
Status: NEW → ASSIGNED
So, do you confirm it was actually returning NULL? Next question: if the reason why it's returning NULL is that something earlier hasn't been initialized, perhaps *this* is what should be fixed?
adding Vlad in CC.
OS: Mac OS X → Windows 7
Summary: formerly functional webgl-o3d example crashes → Crash [@ @0x0 strlen | nsICanvasRenderingContextWebGL_CompileShader]
(In reply to comment #8) > So, do you confirm it was actually returning NULL? > Yes, it was actually returning NULL. > Next question: if the reason why it's returning NULL is that something earlier > hasn't been initialized, perhaps *this* is what should be fixed? The problem here is that http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContextValidate.cpp#450 checks the mShaderValidation while it is still false and therefore doesn't call ShInitialize before returning to http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContext.cpp#299 which then proceeds to set mShaderValidation to true (from the pref in http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContext.cpp#350). This needs to be fixed, but it's probably better to leave the null check in as well.
Attached patch PatchSplinter Review
Attachment #464099 - Attachment is obsolete: true
Attachment #464123 - Flags: review?(vladimir)
Attached patch fixSplinter Review
So, we really want validation enabled everywhere, even on mobile (because mobile might accept a more liberal syntax due to extensions). This simplifies things a bit, and we check the pref in Initialize etc.
Assignee: wesongathedeveloper → vladimir
Attachment #464148 - Flags: review?(bjacob)
Attachment #464148 - Flags: review?(bjacob) → review+
Adding the other stack so it gets picked up in crash stats.
Summary: Crash [@ @0x0 strlen | nsICanvasRenderingContextWebGL_CompileShader] → Crash [@ @0x0 strlen | nsICanvasRenderingContextWebGL_CompileShader] [@ strlen | nsICanvasRenderingContextWebGL_CompileShader ]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 586588
No longer depends on: 586588
Blocks: 593106
No longer blocks: 593106
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: