Skip to content

55 of 125 functions in character.cpp have no TRY_BEGIN/TRY_END #8

Description

@jcant0n

character.cpp exports 125 functions. 70 are wrapped in TRY_BEGIN/TRY_END; 55 are not, and the unwrapped ones start around line 35.

The whole "Additional accessors" block is in the second group — GetCosMaxSlopeAngle, IsSlopeTooSteep, GetWorldTransform, GetShapeOffset, CancelVelocityTowardsSteepSlopes, GetNumActiveContacts, GetID and others. They check the handle for null and nothing else.

A C++ exception escaping through one of those crosses the extern "C" boundary, which is undefined behaviour rather than a JoltC_GetLastError a caller can read.

Relevant to the 5.6.0 bump specifically: if any of those upstream calls starts throwing, the failure mode is a crash instead of an error string, and it will look like it came from the bump.

The same block also erodes types — int where JoltC_Bool or JoltC_GroundState belongs, uint32_t where JoltC_BodyID does — and Character_SetPositionAndRotation takes a raw int activation cast unchecked to EActivation, while its neighbours take JoltC_Activation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions