question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"IsValid" checks may produce false negatives

See original GitHub issue

In the project that I’m working on, the package SharpGLTF was updated from version 1.0.0-alpha0020 to 1.0.0-alpha0025, and I’m noticing failures now when calling AddSkinnedMesh. I could track those down to the IsValid check being performed, specifically the check for IdentityColumn4: https://github.com/vpenades/SharpGLTF/blob/3dc26e16ec4fe75a4a8aa5cfcd33082e965ba570/src/Shared/_Extensions.cs#L217-L223

As the warnings that I get in Rider, for example, already suggest, this comparison with 1 is not a great check in case the passed-in matrix has been transformed and a tiny floating-point error has been introduced (very likely, and precisely the failure condition in my case). See this link for more details on the warning.

Here’s an example of a matrix that fails this check, but should pass instead: image I would appreciate if you could take the time to go through and remove or loosen up these checks to prevent any false negatives.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vpenadescommented, Apr 2, 2022

@Morilli AddSkinnedMesh is part of the SceneBuilder framework, which is somewhat independent from the actual Skin object of the schema.

The fix is set in the method that runs when you convert a SceneBuilder into an actual glTF object, so it will run when you convert.

I’m going to add a check in the AddSkinnedMesh too, but the fix is in the right location.

0reactions
Morillicommented, Apr 2, 2022

Thanks, all works fine now with your latest changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

False Positives and False Negatives in Information Security
In the field of information security, false positives and false negatives can both occur. Therefore, anyone who works in information security ...
Read more >
Can detailed instructions and comprehension checks ...
While false positives can lead to an undesired overestimation, false negatives carry the risk of underestimating the prevalence of sensitive ...
Read more >
Read COVID-19 self-test's directions to avoid false negative
If both nostrils aren't swabbed or the sample isn't properly collected, that could cause a false negative test. After the sample is collected ......
Read more >
What is a False Negative on a Drug Test?
A false negative on a drug test is any result where the sample should be positive or is expected to be positive but...
Read more >
Guidelines Based on Fear of Type II (False-Negative) Errors
The new guidelines for CPR and ECC strongly emphasize evidence as the basis for all new clinical recommendations. The level of evidence may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found