-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix an avatar crash. #1326
Fix an avatar crash. #1326
Conversation
The following links are available: build (macOS-latest, full) build (ubuntu-18.04, full)
build (windows-latest, full) |
Works exactly as intended. Avatar no longer causes insta-crash. |
} | ||
} | ||
if (radiuses.size() == 0) { | ||
radiuses.push_back(0.0f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting…is there a way we could instead detect lower down in the callstack (in calculateChamferBox, or lower) that radiuses (radii??) is empty? I worry someone else will call it and crash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no obvious fix that I can see. To handle an empty radiuses
further down the call stack would be a matter of working through the code to see how to avoid calculating and displaying a sphere, and handle possible assumptions that there is in fact a sphere to display.
I could either add a "FIXME" comment to the proposed change, or pursue things further down the stack sometime "soon".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just early exit out of calculateChamferBox at the top if radiuses.size() == 0? does that crash somewhere else in the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That alternative change also fixes the crash, though I don't know what side-effects not doing the chamfer box calculations may have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we ever really know the side-effects of doing or not doing things
The following links are available: build (macOS-latest, full) build (ubuntu-18.04, full)
build (windows-latest, full) |
The following links are available: build (macOS-latest, full) build (ubuntu-18.04, full)
build (windows-latest, full) |
Update seems to be working. |
Some avatar geometries trigger this crash:
Aitolda encounteered this recently. Appears to be the same crash as in the following issues:
QA should include checking avatar debug rendering.