Hello @brendanduncan_u3d! I’ve run into a couple of crashes in WebGPU builds that would be interesting to get some insight on. The traces are attached below.
Uncaught TypeError: Failed to execute 'writeBuffer' on 'GPUQueue': Value is outside the 'unsigned long long' value range.
at _wgpu_queue_write_buffer (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:14800:28)
at BufferWebGPU::EndWrite(unsigned long) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[9128]:0x3a4064)
at GfxDeviceWebGPU::EndBufferWrite(GfxBuffer*, unsigned long) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[8967]:0x395d3c)
at GeometryJobTasks::ScheduleSharedGeometryJobs(GfxDevice&, GeometryJobFence, void (*)(SharedGeometryJobData*, unsigned int), void (*)(SharedGeometryJobData*), void (*)(JobFence const&), SharedGeometryJobData*, unsigned int, DynamicVBOBuffer const*, DynamicVBOBuffer const*, bool) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[44478]:0x1265eae)
at GfxDevice::ScheduleSharedGeometryJobsInternal(GeometryJobFence, void (*)(SharedGeometryJobData*, unsigned int), void (*)(SharedGeometryJobData*), void (*)(JobFence const&), SharedGeometryJobData*, unsigned int, DynamicVBOBuffer const*, DynamicVBOBuffer const*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[44538]:0x1267fc2)
at LineRenderer::RendererCullingOutputReady(BaseRenderer**, unsigned long, RendererCullingCallbackProperties const&) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10380]:0x4294ae)
at CallbackArray3<BaseRenderer**, unsigned long, RendererCullingCallbackProperties const&>::Invoke(BaseRenderer**, unsigned long, RendererCullingCallbackProperties const&) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[5894]:0x2426e6)
at SendShadowCullingCallbacks(CullingOutput const&, ShadowCullData const&, SharedLightData const&, bool&) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[6058]:0x259305)
at PrepareDrawShadowsCommandStep1(ShadowDrawingSettings const**, unsigned int, JobBatchDispatcher&, bool&) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[6343]:0x27ebea)
at ScriptableRenderContext::ExecuteScriptableRenderLoop() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[6391]:0x28450f)
at ScriptableRenderContext::Submit() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[6401]:0x28611f)
at ScriptableRenderContext_CUSTOM_Submit_Internal(ScriptableRenderContextManaged*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[51862]:0x1395e55)
at ScriptableRenderContext_Submit_Internal_mAE1E99BDF4C4E5A0FD9A0147E460E25ABB84BF14 (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[61244]:0x14ed026)
at ScriptableRenderContext_Submit_mF417223097ECEB2768EE736BE00A7F94DA3BDD26 (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[61297]:0x14ef9ea)
at UniversalRenderPipeline_RenderSingleCamera_m2BED2535B52183757555545A51CE20C9330FC5C6 (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[125967]:0x26bba95)
at UniversalRenderPipeline_RenderCameraStack_m47BBC0B4111D83BB6EE3275C9572BFBF2F5451B9 (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[125948]:0x26b6b9d)
at UniversalRenderPipeline_Render_m15A42AB44C14AB4DCA7EF0B915964D46B643D50E (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[125940]:0x26b480f)
at RenderPipeline_InternalRender_mCB77395158F4572F348D8227BA9127ABF1C9C5BE (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[61082]:0x14e2e5f)
at RenderPipelineManager_DoRenderLoop_Internal_mB646C8738F4A9859101F3BE94809E2E10BBDB1FB (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[61145]:0x14e7150)
at RuntimeInvoker_FalseVoid_t4861ACF8F4594C3437BB48B6E56783494B843915_RuntimeObject_IntPtr_t_RuntimeObject(void (*)(), MethodInfo const*, void*, void**, void*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[229410]:0x4bfdfab)
at il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[233197]:0x4c4e057)
at il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[233166]:0x4c4ba32)
at il2cpp_runtime_invoke (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[233352]:0x4c4ff5c)
at scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[56813]:0x13dcef9)
at ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[48047]:0x134b06d)
at void ScriptingInvocation::Invoke<void>(ScriptingExceptionPtr*, bool) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[48051]:0x134b1a1)
at Scripting::UnityEngine::Rendering::RenderPipelineManagerProxy::DoRenderLoop_Internal(ScriptingObjectPtr, void*, Scripting::UnityEngine::ObjectProxy, ScriptingExceptionPtr*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[48147]:0x134e468)
at ScriptableRenderContext::ExtractAndExecuteRenderPipeline(core::vector<Camera*, core::allocator<Camera*, 0ul>> const&, void (*)(SceneNode const*, AABB const*, IndexList&, SceneCullingParameters const*), void*, ScriptingObjectPtr) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[6408]:0x2867b4)
at RenderManager::RenderCamerasWithScriptableRenderLoop(int) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[7782]:0x3255eb)
at RenderManager::RenderCameras(int, void (*)(), void (*)()) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[7787]:0x325dd9)
at PlayerRender(bool) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[11534]:0x47ef9f)
at InitPlayerLoopCallbacks()::PostLateUpdateFinishFrameRenderingRegistrator::Forward() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[11565]:0x480372)
at ExecutePlayerLoop(NativePlayerLoopSystem*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10774]:0x44ccb9)
at ExecutePlayerLoop(NativePlayerLoopSystem*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10774]:0x44cd84)
at PlayerLoop() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10775]:0x44d0c6)
at MainLoop() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[47668]:0x132fe72)
at _JS_CallAsLongAsNoExceptionsSeen (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:1668:25)
at UpdateUnityFrame() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[47667]:0x132fc8b)
at callUserCallback (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:5091:3)
at Object.runIter (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:5154:4)
at Browser_mainLoop_runner (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:5706:20)
And
Uncaught TypeError: Failed to execute 'writeTexture' on 'GPUQueue': Failed to read the 'offset' property from 'GPUImageDataLayout': Value is outside the 'unsigned long long' value range.
at _wgpu_queue_write_texture (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:14808:29)
at TextureWebGPU::UploadTexture(int, unsigned char const*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[8997]:0x3999db)
at GfxDeviceWebGPU::UploadTexture2D(TextureID, TextureDimension, unsigned char const*, unsigned long, int, int, GraphicsFormat, int, TextureUploadFlags) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[8996]:0x3997bd)
at GraphicsTexture::Upload(TextureRawData const&, TexturePlatformMetaData const*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[40194]:0x105002c)
at UploadTexture2DGraphicsTexture(UploadTextureDataParams const&, core::SharedObjectPtr<GraphicsTexture>) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[43737]:0x11b9f49)
at Texture2D::UploadTexture(int, bool) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10290]:0x41de2c)
at Texture2D::AwakeFromLoad(AwakeFromLoadMode) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10271]:0x41bcb6)
at AwakeFromLoadQueue::PersistentManagerAwakeSingleObject(Object&, AwakeFromLoadMode) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[46792]:0x12f0e9e)
at PersistentManager::IntegrateObjectAndUnlockIntegrationMutexInternal(int) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[46936]:0x12ffdcf)
at TimeSliceAwakeFromLoadQueue::IntegrateTimeSliced(int) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[45392]:0x128d607)
at LoadOperation::IntegrateTimeSliced(int) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[6971]:0x2e96b1)
at PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[7016]:0x2ecd9c)
at PreloadManager::UpdatePreloading() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[7018]:0x2ed1b9)
at InitPlayerLoopCallbacks()::EarlyUpdateUpdatePreloadingRegistrator::Forward() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[11553]:0x47fd96)
at ExecutePlayerLoop(NativePlayerLoopSystem*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10774]:0x44ccb9)
at ExecutePlayerLoop(NativePlayerLoopSystem*) (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10774]:0x44cd84)
at PlayerLoop() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[10775]:0x44d0c6)
at MainLoop() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[47668]:0x132fe72)
at _JS_CallAsLongAsNoExceptionsSeen (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:1668:25)
at UpdateUnityFrame() (https://localhost:8141/Build/[REMOVED]_BUILDS.wasm:wasm-function[47667]:0x132fc8b)
at callUserCallback (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:5091:3)
at Object.runIter (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:5154:4)
at Browser_mainLoop_runner (https://localhost:8141/Build/[REMOVED]_BUILDS.framework.js:5706:20)
Ive also seen some traces that reference text rendering but didn’t attach those as I seem to have misplaced them.
I’ve also tried in vain to gather more information using the WebGPU Inspector, this gave me no information, no validation errors or anything showing there. But let me know if I can supply any additional information to help crack this one!
And I also wanted to extend my thanks and appreciations for all the hard work put into making WebGPU a reality in Unity. Really great work with everything you do!