Commit 578fa2d
Fix triangle splitting crash where FP error causes binning differences
Ultimately the root problem here is that when we do the binning stage we use a
different method to test the first stage and the second. In the first stage we
use bin() to get an integer bin associated with a point in space. In the second
we get the floating point division point on the axis we have chosen to bin on
and do FP comparisons instead. Under most circumstances this is fine.
Occasionally these binning differences will result in unprofitable splits
happening but still building a usable tree.
In the test case I've given, the unprofitable splits we erroneously choose
fill up the split limit and we don't end up splitting the triangles the
previous stage had intended to choose. As a result, we can't split those
triangles. Then when we do the real bifurcation, everything is on the same
side. This resulted in an assertion failure in production (1).
(1) We never noticed that the RelWithDebInfo build in MSVC still has assertions
enabled. I can provide another change disabling these since I think it's
unintentional.1 parent e4b1a6c commit 578fa2d
2 files changed
Lines changed: 65 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
291 | 289 | | |
292 | 290 | | |
293 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1776 | 1776 | | |
1777 | 1777 | | |
1778 | 1778 | | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
1779 | 1837 | | |
1780 | 1838 | | |
1781 | 1839 | | |
| |||
6210 | 6268 | | |
6211 | 6269 | | |
6212 | 6270 | | |
| 6271 | + | |
| 6272 | + | |
| 6273 | + | |
| 6274 | + | |
6213 | 6275 | | |
6214 | 6276 | | |
6215 | 6277 | | |
| |||
0 commit comments