ApplyScissorViewport with disjoint scissor and scissorViewport causes crash in debug, undefined behaviour in release
Author: JmanglesCreated Sep 8, 2026Updated Sep 8, 2026
Describe the bug When ApplyScissorViewport is called with disjoint rects, an assertion fails in debug builds and can cause underflow in release builds.
To Reproduce In our project we encountered this using FilaGui and ImPlot, dragging the application from one display to another of a different resolution would crash reliably in debug builds due to the assertion.
Expected behavior The issue is handled gracefully either through error propagation or ensuring the values are valid.
Source: google/filament