Skip to content

Conversation

Copy link

Copilot AI commented Sep 17, 2025

Analysis and Plan for Fixing Crash Issues in FingerSaber

After analyzing the FingerSaber codebase, I've identified several critical null pointer dereferencing issues that can cause crashes. The main issues are:

Critical Crash Points Identified:

  • Fix null pointer dereferencing in BoneVisualization_Update.cpp lines 107, 113, 117, 128, 134, 138 - Direct access to skeleton bones without null checks
  • Fix null pointer dereferencing in HandControllerFunctionality.cpp lines 70, 74 - Direct access to skeleton bones without null checks
  • Add comprehensive null checks for skeleton and bone objects before accessing their properties
  • Add null checks for transform objects before calling methods on them
  • Test the fixes to ensure crashes are resolved

Root Cause:

The code assumes that modManager.rightOVRSkeleton, modManager.leftOVRSkeleton, and their _bones collections are always valid, but these can be null during scene transitions, initialization, or when hand tracking is temporarily unavailable.

Crash Pattern:

// CRASH-PRONE: No null checks
targ_bone_tranform = modManager.rightOVRSkeleton->_bones->get_Item((int)GlobalNamespace::OVRSkeleton::BoneId::Hand_WristRoot)->get_Transform();

Solution Approach:

Add proper null checks before dereferencing any pointers in the critical code paths, particularly in the skeleton bone access chains.

The fix will be minimal and surgical, only adding necessary null checks without changing the existing logic flow.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@im-henri im-henri closed this Sep 17, 2025
@im-henri im-henri deleted the copilot/fix-c859298c-2ef7-46ea-95d9-51bb02a7f720 branch September 17, 2025 13:28
Copilot AI restored the copilot/fix-c859298c-2ef7-46ea-95d9-51bb02a7f720 branch September 17, 2025 13:28
@im-henri im-henri deleted the copilot/fix-c859298c-2ef7-46ea-95d9-51bb02a7f720 branch September 17, 2025 13:30
Copilot AI requested a review from im-henri September 17, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants