Search Issue Tracker
Fixed in 2019.1.X
Votes
0
Found in
2018.3.0a10
Issue ID
1075194
Regression
No
DivideByZeroException: Division by zero error when changing the Constraint Count for a grid layout
DivideByZeroException: Division by zero error when changing the Constraint Count for a grid layout
Steps to Reproduce:
1. Create a new button or any other UI game object
2. Add Component Grid Layout Group to the Game Object
3. Change the Constraint to Fixed Row Count
4. Increase the count to more than 1000
Actual Result:
Exception is thrown in Console:" DivideByZeroException: Attempted to divide by zero"
Expected Result:
There should not be any error in the console
Reproducible On:
2018.3.0a10, 2018.2.0f1, 2018.1.0f1, 2017.4.0f1
Environment:
Windows 10 and mac 10.13
Stack Trace:
DivideByZeroException: Attempted to divide by zero.
UnityEngine.UI.GridLayoutGroup.SetCellsAlongAxis (System.Int32 axis) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/GridLayoutGroup.cs:296)
UnityEngine.UI.GridLayoutGroup.SetLayoutVertical () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/GridLayoutGroup.cs:206)
UnityEngine.UI.LayoutRebuilder.<Rebuild>m__5 (UnityEngine.Component e) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:87)
UnityEngine.UI.LayoutRebuilder.PerformLayoutControl (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction`1[T0] action) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:117)
UnityEngine.UI.LayoutRebuilder.Rebuild (UnityEngine.UI.CanvasUpdate executing) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:87)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:171)
UnityEngine.Canvas:SendWillRenderCanvases()
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment