apply a few critical fixes backported from the next major release

This commit is contained in:
Mamadou Babaei
2024-02-03 04:31:58 +01:00
parent 3062d0b9ef
commit b98710bd53
3 changed files with 36 additions and 22 deletions
+10
View File
@@ -7,8 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
This is a hotfix release addressing a few critical issues that might result in crashes or malfunctions for users of the low-level SenseGlove API, backported from the next major release of the plugin as documented below.
# Fixed
- Fixed a potential memory corruption inside one of the SGBasicHandModel constructors where the StartPositions parameter gets passed as the StartRotations parameter to lower levels of the API.
- Fixed a potential memory corruption inside one of the SGSenseGloveInfo constructors where the StartPositions parameter gets passed as the Functions parameter to lower levels of the API.
- Fixed a potential memory corruption where inside the SGHapticGloveCalibrationSequence::GetCurrentInstruction method, the return statement of the function is getting assigned to the const parameter NextStepKey, thus the return statement of the function will always be empty as well.
- Fixed a potential memory corruption where inside one of the overloads of the SGSenseGloveImpl::GetGlovePose method, the out parameter of the method is getting passed as the SensorData parameter to the lower levels of the API.
- Fixed multiple Equals methods for a few classes such as SGInterpolationSet, SGNovaGloveHandProfile, SGNovaGloveInfo, SGSenseGloveHandProfile, SenseGloveInfo, SenseGlovePose, where the Equal method compares the current instance against itself instead of the other instance passed to as the parameter to the method.
- Removed a redundant code statement inside the SGNovaGloveImpl::GetSubFirmwareVersion method.
- Some minor const correctness fixes.
- Some other minor code fixes and improvements.
- Minor changelog fix.
## [1.9.2] - 2023-11-03
@@ -324,7 +324,7 @@ void SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_S
bRightHanded,
StaticCast<FSGIC_TArray_TArray_float*>(Lengths)->Array,
StaticCast<FSGIC_TArray_FVector*>(StartPositions)->Array,
StaticCast<FSGIC_TArray_FQuat*>(StartPositions)->Array);
StaticCast<FSGIC_TArray_FQuat*>(StartRotations)->Array);
}
void SGCoreImpl_FSGBasicHandModelImpl_ctor_copy(
@@ -1155,7 +1155,7 @@ void SGCoreImpl_FSGDeviceListImpl_GetDevices(
}
bool SGCoreImpl_FSGDeviceListImpl_GetSensorDataString(
int32 IpcIndex,
const int32 IpcIndex,
void* IpcAddress,
void* OutString)
{
@@ -1166,7 +1166,7 @@ bool SGCoreImpl_FSGDeviceListImpl_GetSensorDataString(
}
bool SGCoreImpl_FSGDeviceListImpl_SendHaptics(
int32 IpcIndex,
const int32 IpcIndex,
void* IpcAddress,
void* Commands)
{
@@ -1177,8 +1177,10 @@ bool SGCoreImpl_FSGDeviceListImpl_SendHaptics(
}
void SGCoreImpl_FSGDeviceListImpl_GetDeviceStringAt(
void* OutString, int32 IpcIndex,
void* IpcAddress, int32 Index)
void* OutString,
const int32 IpcIndex,
void* IpcAddress,
const int32 Index)
{
StaticCast<FSGIC_FString*>(OutString)->String = FSGDeviceListImpl::GetDeviceStringAt(
IpcIndex,
@@ -1186,7 +1188,8 @@ void SGCoreImpl_FSGDeviceListImpl_GetDeviceStringAt(
}
void SGCoreImpl_FSGDeviceListImpl_GetAddress(
void* OutAddress, int32 IpcIndex,
void* OutAddress,
const int32 IpcIndex,
void* IpcAddress)
{
StaticCast<FSGIC_FString*>(OutAddress)->String = FSGDeviceListImpl::GetAddress(
@@ -1195,7 +1198,8 @@ void SGCoreImpl_FSGDeviceListImpl_GetAddress(
}
void SGCoreImpl_FSGDeviceListImpl_GetConnectionType(
void* OutType, int32 IpcIndex,
void* OutType,
const int32 IpcIndex,
void* IpcAddress)
{
StaticCast<FSGIC_ESGConnectionType*>(OutType)->Type =
@@ -1205,21 +1209,21 @@ void SGCoreImpl_FSGDeviceListImpl_GetConnectionType(
}
bool SGCoreImpl_FSGDeviceListImpl_IsConnected(
int32 IpcIndex,
const int32 IpcIndex,
void* IpcAddress)
{
return FSGDeviceListImpl::IsConnected(IpcIndex, StaticCast<FSGIC_FString*>(IpcAddress)->String);
}
int32 SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondReceived(
int32 IpcIndex,
const int32 IpcIndex,
void* IpcAddress)
{
return FSGDeviceListImpl::PacketsPerSecondReceived(IpcIndex, StaticCast<FSGIC_FString*>(IpcAddress)->String);
}
int32 SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondSent(
int32 IpcIndex,
const int32 IpcIndex,
void* IpcAddress)
{
return FSGDeviceListImpl::PacketsPerSecondSent(IpcIndex, StaticCast<FSGIC_FString*>(IpcAddress)->String);
@@ -2884,7 +2888,7 @@ void SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCurrentInstruction(
void* OutInstruction,
void* NextStepKey)
{
StaticCast<FSGIC_FString*>(NextStepKey)->String =
StaticCast<FSGIC_FString*>(OutInstruction)->String =
StaticCast<FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl*>(Instance)->Ptr->GetCurrentInstruction(
StaticCast<FSGIC_FString*>(NextStepKey)->String);
}
@@ -3520,7 +3524,7 @@ bool SGCoreImpl_FSGInterpolationSetImpl_Equals(
void* InterpolationSetImpl)
{
return StaticCast<FSGIC_FSGInterpolationSetImpl*>(Instance)->InterpolationSetImpl.Equals(
StaticCast<FSGIC_FSGInterpolationSetImpl*>(Instance)->InterpolationSetImpl);
StaticCast<FSGIC_FSGInterpolationSetImpl*>(InterpolationSetImpl)->InterpolationSetImpl);
}
void SGCoreImpl_FSGInterpolationSetImpl_ToString(
@@ -3847,7 +3851,7 @@ int32 SGCoreImpl_FSGNovaGloveImpl_GetSubFirmwareVersion(
bool SGCoreImpl_FSGNovaGloveImpl_HasBattery(
void* Instance)
{
return StaticCast<FSGIC_TSharedPtr_FSGNovaGloveImpl*>(Instance)->Ptr->HasBattery();;
return StaticCast<FSGIC_TSharedPtr_FSGNovaGloveImpl*>(Instance)->Ptr->HasBattery();
}
bool SGCoreImpl_FSGNovaGloveImpl_IsCharging(
@@ -4119,7 +4123,7 @@ bool SGCoreImpl_FSGNovaGloveHandProfileImpl_Equals(
void* NovaGloveHandProfileImpl)
{
return StaticCast<FSGIC_FSGNovaGloveHandProfileImpl*>(Instance)->NovaGloveHandProfileImpl.Equals(
StaticCast<FSGIC_FSGNovaGloveHandProfileImpl*>(Instance)->NovaGloveHandProfileImpl);
StaticCast<FSGIC_FSGNovaGloveHandProfileImpl*>(NovaGloveHandProfileImpl)->NovaGloveHandProfileImpl);
}
void SGCoreImpl_FSGNovaGloveHandProfileImpl_Reset(
@@ -4255,7 +4259,7 @@ bool SGCoreImpl_FSGNovaGloveInfoImpl_Equals(
void* NovaGloveInfoImpl)
{
return StaticCast<FSGIC_FSGNovaGloveInfoImpl*>(Instance)->NovaGloveInfoImpl.Equals(
StaticCast<FSGIC_FSGNovaGloveInfoImpl*>(Instance)->NovaGloveInfoImpl);
StaticCast<FSGIC_FSGNovaGloveInfoImpl*>(NovaGloveInfoImpl)->NovaGloveInfoImpl);
}
void SGCoreImpl_FSGNovaGloveInfoImpl_ToString(
@@ -4724,7 +4728,7 @@ bool SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_SensorData_OutGlovePose(
void* OutGlovePose)
{
return StaticCast<FSGIC_TSharedPtr_FSGSenseGloveImpl*>(Instance)->Ptr->GetGlovePose(
StaticCast<FSGIC_FSGSenseGloveSensorDataImpl*>(OutGlovePose)->SenseGloveSensorDataImpl,
StaticCast<FSGIC_FSGSenseGloveSensorDataImpl*>(SensorData)->SenseGloveSensorDataImpl,
StaticCast<FSGIC_FSGSenseGlovePoseImpl*>(OutGlovePose)->SenseGlovePoseImpl);
}
@@ -5033,7 +5037,7 @@ bool SGCoreImpl_FSGSenseGloveHandProfileImpl_Equals(
void* SenseGloveHandProfileImpl)
{
return StaticCast<FSGIC_FSGSenseGloveHandProfileImpl*>(Instance)->SenseGloveHandProfileImpl.Equals(
StaticCast<FSGIC_FSGSenseGloveHandProfileImpl*>(Instance)->SenseGloveHandProfileImpl);
StaticCast<FSGIC_FSGSenseGloveHandProfileImpl*>(SenseGloveHandProfileImpl)->SenseGloveHandProfileImpl);
}
void SGCoreImpl_FSGSenseGloveHandProfileImpl_Reset(
@@ -5107,7 +5111,7 @@ SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_S
StaticCast<FSGIC_TArray_FVector*>(StartPositions)->Array,
StaticCast<FSGIC_TArray_FQuat*>(StartRotations)->Array,
StaticCast<FSGIC_TArray_TArray_FVector*>(GloveLengths)->Array,
StaticCast<FSGIC_TArray_bool*>(StartPositions)->Array);
StaticCast<FSGIC_TArray_bool*>(Functions)->Array);
}
void SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy(
@@ -5251,7 +5255,7 @@ bool SGCoreImpl_FSGSenseGloveInfoImpl_Equals(
void* SenseGloveInfoImpl)
{
return StaticCast<FSGIC_FSGSenseGloveInfoImpl*>(Instance)->SenseGloveInfoImpl.Equals(
StaticCast<FSGIC_FSGSenseGloveInfoImpl*>(Instance)->SenseGloveInfoImpl);
StaticCast<FSGIC_FSGSenseGloveInfoImpl*>(SenseGloveInfoImpl)->SenseGloveInfoImpl);
}
void SGCoreImpl_FSGSenseGloveInfoImpl_ToString_bShortNotation(
@@ -5417,7 +5421,7 @@ bool SGCoreImpl_FSGSenseGlovePoseImpl_Equals(
void* SenseGlovePoseImpl)
{
return StaticCast<FSGIC_FSGSenseGlovePoseImpl*>(Instance)->SenseGlovePoseImpl.Equals(
StaticCast<FSGIC_FSGSenseGlovePoseImpl*>(Instance)->SenseGlovePoseImpl);
StaticCast<FSGIC_FSGSenseGlovePoseImpl*>(SenseGlovePoseImpl)->SenseGlovePoseImpl);
}
void SGCoreImpl_FSGSenseGlovePoseImpl_ToString(
@@ -5583,7 +5587,7 @@ void SGCoreImpl_FSGSenseGloveSensorDataImpl_Serialize(
void SGCoreImpl_FSGSenseGloveVarsImpl_GetStandardConstantsString(
void* OutString,
void* HardwareVersion,
float FirmwareVersion,
const float FirmwareVersion,
const bool bRightHanded)
{
StaticCast<FSGIC_FString*>(OutString)->String = FSGSenseGloveVarsImpl::GetStandardConstantsString(
@@ -2700,7 +2700,7 @@ SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRo
void* OutRotations);
SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetTotalGloveAngles(
void* OutInstance,
void* Instance,
void* OutAngles);
SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_CalculateFingerTips_SenseGloveHandProfileImpl(