Skip to content
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

GetIsLineOfSightClear: origin of nan(ind) values causes infinite loop #526

Open
Pirulax opened this issue Feb 18, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Pirulax
Copy link
Collaborator

Pirulax commented Feb 18, 2023

Expected and current behavior

For whatever reason origin consists of nan(ind) values, probably caused by some overflow.

Additional information

I've had this same issue once already, just can't remember if it came from the same caller (In this case that's CTaskComplexKillPedOnFootArmed::LineOfSightClearForAttack @ 0x621724)
I doubt it's a memory corruption issue of some kind.

Steps to reproduce

  1. Get chased by cops
  2. ???? - There's no consistent way to cause this sadly
  3. Profit

Screenshots/Videos

image

@Pirulax Pirulax added the bug Something isn't working label Feb 18, 2023
@Pirulax
Copy link
Collaborator Author

Pirulax commented Jan 2, 2024

Notice how CJs chest disappeared.
Might be related to the animation quaternions corruption.
image

Callstack:
image

Bone matrices:
image

Pirulax added a commit that referenced this issue Feb 24, 2024
* Fix `ManageTasks`
* Flush all loggers in `unreachable`
* Flush loggers every 100ms
* Fix random nan bug + add more asserts to anim code
* Fix `CAnimBlendAssociation::UpdateTime`
* fix `CAnimBlendAssociation::UpdateBlend`
* CMatix: Add `bKeepPos` to `RotateX/Y/Z`
* Fix `CVehicle::SetComponentRotation`
* FxManager_c: Add note
* Refactor `CStreaming::AddEntity`
* Refactor `CCollision::CalculateTrianglePlanes`
* Refactor `CCollision::RemoveTrianglePlanes`
* Fix anim flag function names
* Proper fix of `RtAnimInterpolatorSetCurrentAnim` (UV anims need original interpolator code) (Fixes #602 #526)
* Add missing `case TASK_NONE` in `CTaskComplexEnterCar::CreateNextSubTask`
* Fix `CPathFind::SetLinksBridgeLights`
* Template wrapper instead of 1000+ lines of copy paste
* Verious smaller fixes
@Pirulax
Copy link
Collaborator Author

Pirulax commented Jun 22, 2024

Okay, seems like this isn't happening as frequently as it used to... Actually I haven't encountered it for a while now.
Most likely fixed by the reversed anim functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant