Closed Bug 1674592 Opened 4 years ago Closed 4 years ago

[Windows 32-bit && webgl-oop] unity based game fails to load with: TypeError: WebGL2RenderingContext.shaderSource: Argument 1 is not an object.

Categories

(Core :: Graphics: CanvasWebGL, defect, P1)

x86
Windows
defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- unaffected
firefox83 --- wontfix
firefox84 --- fixed

People

(Reporter: aryx, Assigned: jgilbert)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(3 files)

On Windows (tested and reproduced with 10 & 8.1), 32-bit Nightly builds (cannot reproduce with 64-bit), playing https://teambeanloop.itch.io/six-cats-under fails after one clicks on the 'Play' button.

The following error message is provided:

An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
TypeError: WebGL2RenderingContext.shaderSource: Argument 1 is not an object.

Flags: needinfo?(jgilbert)
Summary: [Windows 32-bit && webgl-oop]unity based game fails to load with: TypeError: WebGL2RenderingContext.shaderSource: Argument 1 is not an object. → [Windows 32-bit && webgl-oop] unity based game fails to load with: TypeError: WebGL2RenderingContext.shaderSource: Argument 1 is not an object.
Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)
Attachment #9185004 - Attachment description: aboutsupport-information.txt → defect aboutsupport-information.txt

Reloading causes WASM allocation OOM failures though

failed to asynchronously prepare wasm: out of memory UnityLoader.js:4:11145
out of memory UnityLoader.js:4:11108
out of memory UnityLoader.js:4:11145
Uncaught (in promise) abort("out of memory") at jsStackTrace@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:22295
stackTrace@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:22466
onAbort@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:11047
abort@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:451963
instantiateArrayBuffer/<@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:31321
promise callback*instantiateArrayBuffer@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:31238
doNativeWasm@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:31788
integrateWasmJS/Module.asm@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:33168
UnityModule@blob:https://v6p9d9t4.ssl.hwcdn.net/7e0ccffa-e6ff-4c1c-adc1-13e25cc0f664:8:376601
processWasmFrameworkJob/<@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:3856
loadCode/i.onload@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:3160
EventHandlerNonNull*loadCode@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:3097
processWasmFrameworkJob@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:3745
schedule/i.callback@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:3:19246
setTimeout handler*schedule/i.complete@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:3:19613
downloadJob/r.onload/<@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:5777
decompress/r.worker.onmessage@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:3:9216
EventHandlerNonNull*decompress@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:3:9111
downloadJob/r.onload@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:5725
EventHandlerNonNull*set@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:18683
downloadJob@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:5681
schedule/i.callback@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:3:19246
setTimeout handler*schedule@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:3:19826
scheduleBuildDownloadJob@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:6040
loadModule@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:6766
instantiate/n/</t.onload/<@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:10201
buildCompatibilityCheck@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:2439
instantiate/n/</t.onload@https://v6p9d9t4.ssl.hwcdn.net/html/2267583/Build/UnityLoader.js:4:9993
UnityLoader.js:4:11047

Can you reproduce on 83? I see your about:support is for 84.

Severity: -- → S4
Flags: needinfo?(aryx.bugmail)

Yes, also reproduces with 83 after flipping webgl.out-of-process on.

Flags: needinfo?(aryx.bugmail)

Ah it's a shmem allocation failure.
From the web console:

Failed to allocate internal command buffer. c4c48e06-d983-49fe-8477-b0280583ca0d:8:274284
WebGL context was lost. c4c48e06-d983-49fe-8477-b0280583ca0d:8:274284

I really need more info about what command failed and how big the allocation was supposed to be.
What I'm expecting is that this app has a monolithic WebGLBuffer and sending either data or calloc'd zeros fails.

Severity: S4 → S3
Priority: -- → P1
OS: Unspecified → Windows
Hardware: Unspecified → x86

Since this is 32-bit, I checked and it looks like we're still at 10% 32-on-32 and 10% 32-on-64 so at 20%, we can't push this config towards reduced support to ignore this.

For example uploads from WASM heaps would previously copy most of the
heap into shmem.

Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4a679b76e51b Shrink uploads based on byte size estimates. r=lsalzman
Flags: needinfo?(jgilbert)
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6701e0a37598 Shrink uploads based on byte size estimates. r=lsalzman
Flags: needinfo?(jgilbert)
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/217b92a7892b Shrink uploads based on byte size estimates. r=lsalzman

Backed out for assertion failures on ClientWebGLContext.cpp

backout: https://hg.mozilla.org/integration/autoland/rev/6fcbd6772a19b9b7ef67f62b063c7f58106645e7

push: https://treeherder.mozilla.org/jobs?repo=autoland&searchStr=os%2Cx%2C10.14%2Cwebrender%2Cdebug%2Cmochitests%2Ctest-macosx1014-64-qr%2Fdebug-mochitest-webgl1-core-e10s%2Cgl1c&revision=217b92a7892bc35e04880c1da86f0b99c765b24d&selectedTaskRun=b7JifOffR6-QhCZoBJAWsw.0

failure log: https://treeherder.mozilla.org/logviewer?job_id=321529720&repo=autoland&lineNumber=4331

[task 2020-11-12T03:03:39.041Z] 03:03:39 INFO - GECKO(1338) | Assertion failure: unpacking.mUnpackRowLength, at /builds/worker/checkouts/gecko/dom/canvas/ClientWebGLContext.cpp:3881
[task 2020-11-12T03:03:39.041Z] 03:03:39 INFO - Initializing stack-fixing for the first stack frame, this may take a while...
[task 2020-11-12T03:03:48.717Z] 03:03:48 INFO - GECKO(1338) | #01: mozilla::ClientWebGLContext::TexImage(unsigned char, unsigned int, int, unsigned int, mozilla::avec3<int> const&, mozilla::avec3<int> const&, int, mozilla::webgl::PackingInfo const&, mozilla::TexImageSource const&) const [dom/canvas/ClientWebGLContext.cpp:4038]
[task 2020-11-12T03:03:48.718Z] 03:03:48 INFO - GECKO(1338) | #02: mozilla::dom::WebGLRenderingContext_Binding::texSubImage2D(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) [s3:gecko-generated-sources:6c796a5afd100af8883da6d8fe7c9fb267ad0e88f96d2bd699395f7796a76e0225c0fa825c60ac00df43711a5174c99e5bda4f7a1ce5a8728c67ed44ac2cf660/dom/bindings/WebGLRenderingContextBinding.cpp::15486]
[task 2020-11-12T03:03:48.718Z] 03:03:48 INFO - GECKO(1338) | #03: bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) [dom/bindings/BindingUtils.cpp:3231]
[task 2020-11-12T03:03:48.718Z] 03:03:48 INFO - GECKO(1338) | #04: CallJSNative(JSContext*, bool ()(JSContext, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [js/src/vm/Interpreter.cpp:507]
[task 2020-11-12T03:03:48.718Z] 03:03:48 INFO - GECKO(1338) | #05: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp:599]
[task 2020-11-12T03:03:48.718Z] 03:03:48 INFO - GECKO(1338) | #06: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp:664]
[task 2020-11-12T03:03:48.720Z] 03:03:48 INFO - GECKO(1338) | #07: js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [js/src/vm/Interpreter.cpp:681]
[task 2020-11-12T03:03:48.720Z] 03:03:48 INFO - GECKO(1338) | #08: js::fun_apply(JSContext*, unsigned int, JS::Value*) [js/src/vm/JSFunction.cpp:1210]
[task 2020-11-12T03:03:48.721Z] 03:03:48 INFO - GECKO(1338) | #09: CallJSNative(JSContext*, bool ()(JSContext, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [js/src/vm/Interpreter.cpp:507]
[task 2020-11-12T03:03:48.721Z] 03:03:48 INFO - GECKO(1338) | #10: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp:599]
[task 2020-11-12T03:03:48.721Z] 03:03:48 INFO - GECKO(1338) | #11: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp:664]
[task 2020-11-12T03:03:48.721Z] 03:03:48 INFO - GECKO(1338) | #12: js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) [js/src/jit/BaselineIC.cpp:3010]
[task 2020-11-12T03:03:48.721Z] 03:03:48 INFO - GECKO(1338) | [Parent 1338, Unnamed thread 10fd4e7a0] WARNING: Resource acquired is being released in non-LIFO order; why?
[task 2020-11-12T03:03:48.721Z] 03:03:48 INFO - GECKO(1338) | : file /builds/worker/checkouts/gecko/xpcom/threads/BlockingResourceBase.cpp:292
[task 2020-11-12T03:03:48.722Z] 03:03:48 INFO - GECKO(1338) | --- Mutex : dumpSafetyLock (currently acquired)
[task 2020-11-12T03:03:48.722Z] 03:03:48 INFO - GECKO(1338) | calling context
[task 2020-11-12T03:03:48.722Z] 03:03:48 INFO - GECKO(1338) | [stack trace unavailable]

Flags: needinfo?(jgilbert)
Blocks: 1673217
Flags: needinfo?(jgilbert)
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/64a7ab181b3a Shrink uploads based on byte size estimates. r=lsalzman
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: