Assertion failed on expression: std::abs > FLT_MIN

These errors keep popping up every frame, as does a MouseEvent error. But I’m not even using mouse events… “Screen position out of view of frustum” each time I hover over the Game View on Play Mode.

It just started doing this this afternoon.

In a Development Build, this also happens: Both errors flood the console thingy. It’s a tad irritating searching through that for actual errors in MY scripting.

Any idea what could cause this? And can I send anything over to help?

Hi,

did you get any solution?
I have the same problem.

Thanks,
Greetings Matthias

Sadly I didn’t. This has been going on for a few different Unity builds now.

Any news on this issue?

I’m having this issue as well and cannot find a solution for it

Struggling with it, too

"
Assertion failed on expression:‘std::abs(det) >FLT_MIN’
UnityEngine.GUIUtility:ProcessEvent(int, intptr, bool&)
"

Even don’t know what happened…

In my case, appeared when I put a canvas just in front of the near clipping plane (but inside the fustrum)

In my case:

I had my pause script set timeScale to 0
And when I reload the scene it didn’t automatically reset to default, so that it confused trails, lerp, smoothdamp, etc. functions
So I had to manually set it to default in Start() or right before reloading

Thats strange. The only place I can see an assert like that is in the shadow culling code.
If you have a project producing this error please file a bug report so we can look into it. Asserts are things that should never happen.

I ran into this bug today too. Thanks to the above replies I was able to track it down. I had a SmoothDamp controlling my cameras orthographic size every frame. If I changed the orthographic size value while Time.timeScale was zero the error messages appeared. (21 errors in my case). The solution was to simply put a check to ensure the smoothdamp code didn’t run unless timeScale was non-zero.

For future reference I was seeing this assertion when setting a camera’s aspect to zero and calling Render() on it. Fixing the aspect value made it go away.

Disappeared when I turned off the Render Shadow option in the VR camera.

I am using Now Unity 2021.2.19f1, OpenXR plugin 1.3.1, OpenVR XR plugin 1.1.4

Same issue in 2022.2.14. No shadow from my directional light, ever, but other lights work ok. The only shadow i get is a thin strip in the global Y plane. The assert is intermittent.

Same issue in 2020.3.18. I found that the mutilpass would make this issue happen.But i do need mutilpass to render ui in both my vr cameras.

I just stumbled upon this same issue, and it seems that it happens when there is a cinemachine brain active on the camera and a script that is working on the aspect or viewport rect like the autoletterboxing script.

Was using unity 6000.0.24f1

using UnityEngine;

[ExecuteInEditMode, RequireComponent(typeof(Camera))]
public class AutoLetterboxer : MonoBehaviour
{
	public enum CameraType
	{
		MaintainAspectRatio = 0,
		BestPixelPerfectFit = 1
	}

	[SerializeField]
	private Vector2Int referenceScreenResolution = new(1920,1080);

	[SerializeField]
	private CameraType type = CameraType.MaintainAspectRatio;

	private Vector2Int currentScreenResolution = new();
	private new Camera camera;
	private Camera Camera
	{
		get { return camera != null ? camera : (camera = GetComponent<Camera>()); }
	}

	private void OnValidate()
	{
		InitLetterbox();
	}

	private void Awake()
	{
		InitLetterbox();
	}

	private void Update()
	{
		if (IsLetterboxUpdateRequired())
			UpdateLetterbox();
	}

	private void InitLetterbox()
	{
		referenceScreenResolution.x = Mathf.Max(1, referenceScreenResolution.x);
		referenceScreenResolution.y = Mathf.Max(1, referenceScreenResolution.y);

		UpdateLetterbox();
	}

	private void UpdateLetterbox()
	{
		currentScreenResolution = new(Screen.width, Screen.height);

		if (type == CameraType.MaintainAspectRatio)
			HandleMaintainAspectRatio();
		else
			HandleBestFit();
	}

	private void HandleMaintainAspectRatio()
	{
		float targetAspect = referenceScreenResolution.x / (float)referenceScreenResolution.y;
		float windowAspect = currentScreenResolution.x / (float)currentScreenResolution.y;
		float scaleHeight = windowAspect / targetAspect;

		Camera.rect = scaleHeight < 1.0f ? GetLetterboxRect(scaleHeight) : GetPillarboxRect(scaleHeight);
	}

	private void HandleBestFit()
	{
		int nearestWidth = currentScreenResolution.x / referenceScreenResolution.x * referenceScreenResolution.x;
		int nearestHeight = currentScreenResolution.y / referenceScreenResolution.y * referenceScreenResolution.y;

		int scaleFactor = GetScaleFactor(nearestWidth, nearestHeight);
		float xWidthFactor = referenceScreenResolution.x * scaleFactor / (float)currentScreenResolution.x;
		float yHeightFactor = referenceScreenResolution.y * scaleFactor / (float)currentScreenResolution.y;

		Camera.rect = new Rect(GetRectPosition(xWidthFactor, currentScreenResolution.x), GetRectPosition(yHeightFactor, currentScreenResolution.y), xWidthFactor, yHeightFactor);
	}

	private int GetScaleFactor(int nearestWidth, int nearestHeight)
	{
		int xScaleFactor = nearestWidth / referenceScreenResolution.x;
		int yScaleFactor = nearestHeight / referenceScreenResolution.y;

		return yScaleFactor < xScaleFactor ? yScaleFactor : xScaleFactor;
	}

	private float GetRectPosition(float factor, int screenSize)
	{
		return (1 - factor) / 2f + GetOffset(screenSize);
	}

	private float GetOffset(int size)
	{
		return size % 2 == 0 ? 0 : 1f / size;
	}

	private Rect GetLetterboxRect(float scaleHeight)
	{
		return new Rect(0, (1f - scaleHeight) / 2f, 1f, scaleHeight);
	}

	private Rect GetPillarboxRect(float scaleHeight)
	{
		float scalewidth = 1.0f / scaleHeight;

		return new Rect((1f - scalewidth) / 2f, 0, scalewidth, 1f);
	}

	private bool IsLetterboxUpdateRequired()
	{
		return Screen.width != currentScreenResolution.x || Screen.height != currentScreenResolution.y;
	}
}