Closed Bug 1683980 Opened 4 years ago Closed 4 years ago

firefox: src/gl.cc:3791: int clip_side(int, Point3D *, glsl::Interpolants *, Point3D *, glsl::Interpolants *) [AXIS = glsl::Y]: Assertion `numClip < nump + 2' failed.

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox-esr78 --- disabled
firefox84 --- disabled
firefox85 --- disabled
firefox86 --- fixed

People

(Reporter: tsmith, Assigned: lsalzman)

References

(Blocks 3 open bugs)

Details

(Keywords: assertion)

Attachments

(2 files)

The test case is unreliable, I will attach a Pernosco session shortly.

firefox: src/gl.cc:3791: int clip_side(int, Point3D *, glsl::Interpolants *, Point3D *, glsl::Interpolants *) [AXIS = glsl::Y]: Assertion `numClip < nump + 2' failed.

#0 0x7fe48938df47 in gsignal /build/glibc-2ORdQG/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51
#1 0x7fe48938f8b0 in abort /build/glibc-2ORdQG/glibc-2.27/stdlib/abort.c:79
#2 0x7fe48937f429 in __assert_fail_base /build/glibc-2ORdQG/glibc-2.27/assert/assert.c:92
#3 0x7fe48937f4a1 in __assert_fail /build/glibc-2ORdQG/glibc-2.27/assert/assert.c:101
#4 0x7fe4754ce56c in clip_side<glsl::Y> src/gfx/wr/swgl/src/gl.cc:3791:7
#5 0x7fe4754ce56c in draw_perspective src/gfx/wr/swgl/src/gl.cc:3899:16
#6 0x7fe4754ce56c in draw_quad(int, Texture&, int, Texture&) src/gfx/wr/swgl/src/gl.cc:3931:5
#7 0x7fe4754c5fea in draw_elements<unsigned short> src/gfx/wr/swgl/src/gl.cc:4045:5
#8 0x7fe4754c5fea in DrawElementsInstanced src/gfx/wr/swgl/src/gl.cc:4115:7
#9 0x7fe4750d46c7 in _$LT$gleam..gl..ErrorReactingGl$LT$F$GT$$u20$as$u20$gleam..gl..Gl$GT$::draw_elements_instanced::hb3807718460c3427 src/third_party/rust/gleam/src/gl.rs:98:26
#10 0x7fe4752a295a in webrender::device::gl::Device::draw_indexed_triangles_instanced_u16::h7664ca5171a0845e src/gfx/wr/webrender/src/device/gl.rs:3415:9
#11 0x7fe4752a295a in webrender::renderer::Renderer::draw_instanced_batch::hc57026cb0079a7db src/gfx/wr/webrender/src/renderer.rs:4102:13
#12 0x7fe4752a550d in webrender::renderer::Renderer::draw_alpha_batch_container::h8079496167f1b5fb src/gfx/wr/webrender/src/renderer.rs:4544:17
#13 0x7fe4752b2c64 in webrender::renderer::Renderer::draw_picture_cache_target::hf216c8d97e6c8b5a src/gfx/wr/webrender/src/renderer.rs:4378:9
#14 0x7fe4752b2c64 in webrender::renderer::Renderer::draw_frame::h6f528e3c07dbbad1 src/gfx/wr/webrender/src/renderer.rs:6010:21
#15 0x7fe475291820 in webrender::renderer::Renderer::render_impl::h48c65e6588d36988 src/gfx/wr/webrender/src/renderer.rs:3442:17
#16 0x7fe47528ee96 in webrender::renderer::Renderer::render::h88046cfc33fc7fde src/gfx/wr/webrender/src/renderer.rs:3197:30
#17 0x7fe474fdb427 in wr_renderer_render src/gfx/webrender_bindings/src/bindings.rs:639:11
#18 0x7fe46eec359f in mozilla::wr::RendererOGL::UpdateAndRender(mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> > const&, mozilla::Maybe<mozilla::wr::ImageFormat> const&, mozilla::Maybe<mozilla::Range<unsigned char> > const&, bool*, mozilla::wr::RendererStats*) src/gfx/webrender_bindings/RendererOGL.cpp:186:8
#19 0x7fe46eec263f in mozilla::wr::RenderThread::UpdateAndRender(mozilla::wr::WrWindowId, mozilla::layers::BaseTransactionId<mozilla::VsyncIdType> const&, mozilla::TimeStamp const&, bool, mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> > const&, mozilla::Maybe<mozilla::wr::ImageFormat> const&, mozilla::Maybe<mozilla::Range<unsigned char> > const&, bool*) src/gfx/webrender_bindings/RenderThread.cpp:476:31
#20 0x7fe46eec20af in mozilla::wr::RenderThread::HandleFrameOneDoc(mozilla::wr::WrWindowId, bool) src/gfx/webrender_bindings/RenderThread.cpp:336:3
#21 0x7fe46eecb03e in applyImpl<mozilla::wr::RenderThread, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool), StoreCopyPassByConstLRef<mozilla::wr::WrWindowId>, StoreCopyPassByConstLRef<bool> , 0, 1> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1148:12
#22 0x7fe46eecb03e in apply<mozilla::wr::RenderThread, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool)> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1154:12
#23 0x7fe46eecb03e in mozilla::detail::RunnableMethodImpl<mozilla::wr::RenderThread*, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool), true, (mozilla::RunnableKind)0, mozilla::wr::WrWindowId, bool>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1201:13
#24 0x7fe46de59dcf in MessageLoop::RunTask(already_AddRefed<nsIRunnable>) src/ipc/chromium/src/base/message_loop.cc:465:9
#25 0x7fe46de5a915 in MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask&&) src/ipc/chromium/src/base/message_loop.cc:473:5
#26 0x7fe46de5abba in MessageLoop::DoWork() src/ipc/chromium/src/base/message_loop.cc:548:13
#27 0x7fe46de5b5a0 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) src/ipc/chromium/src/base/message_pump_default.cc:35:31
#28 0x7fe46de59a93 in MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:334:10
#29 0x7fe46de599ad in RunHandler src/ipc/chromium/src/base/message_loop.cc:327:3
#30 0x7fe46de599ad in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:309:3
#31 0x7fe46de67e37 in base::Thread::ThreadMain() src/ipc/chromium/src/base/thread.cc:191:16
#32 0x7fe46de633a9 in ThreadFunc(void*) src/ipc/chromium/src/base/platform_thread_posix.cc:40:13
#33 0x7fe48a4926da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
#34 0x7fe489470a3e in clone /build/glibc-2ORdQG/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95

A Pernosco session is available here: https://pernos.co/debug/TdzoRoh4CiX8bDZiHKmqyg/index.html

This ensures that in the worst case in a release build we don't accidentally overflow
any vertex buffers as a result of floating point precision. Instead, we trade off for
rendering correctness by choosing just not to render the perspective quad since we can't
properly clip it. This still leaves in an assert for debugging so that we can go back
and figure out potentially why some case is triggering this.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

A testcase, regardless of how reliable, would be appreciated. I haven't had much luck with using pernosco sessions myself (I don't have access apparently?).

I think you just need an @mozilla.com email associated to your Github account. After that it should work.

Keywords: leave-open
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d7b25f7e2eef avoid producing more clipped vertexes than we can support. r=jrmuizel
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ca5ca297508 handle clipping points with negative W that are considered to fall outside of either boundary. r=jrmuizel
Depends on: 1685419
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Blocks: 1685107
No longer depends on: 1685419
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: