benaclejames / VRCFaceTracking

OSC App to allow VRChat avatars to interact with eye and facial tracking hardware
https://docs.vrcft.io
Apache License 2.0
633 stars 96 forks source link

Changing OSC ip Address to external ip cause application to hang #232

Open ThatGuyThimo opened 1 month ago

ThatGuyThimo commented 1 month ago

When using vrcfacetracking, trying to change the ip to my other computer in the OSC address causes the application to freeze/crash

example: If the other computer's ip would be 192.168.1.99 it would crash but when using the ip of the local machine 192.168.1.100 it would be fine.

This issue is consistent on my windows 11 machine and my windows 10 machine

VRCFT V: 5.2.3.0 Logs didn't say anything about the OSC

AlexisEvo commented 1 month ago

Dumping some info from when I last looked into this on Discord: currently, VRCFT both listens and sends to the IP address configured in the UI. IIRC the crash occurs because it can't bind to an address that isn't on the local machine. Fixing this for the non-oscquery implementation would require different UI config option for IP addresses for listening/sending.

The second part of the issue is that OSCQuery hardcodes the address it advertises to "127.0.0.1", so if VRC is running on a different computer, it won't be able to send/receive to VRCFT. This seems intentional due to this code/comment, but this breaks setups where VRCFT is running on a separate PC -- especially so for someone trying to use standalone VRC.

ThatGuyThimo commented 1 month ago

Dumping some info from when I last looked into this on Discord: currently, VRCFT both listens and sends to the IP address configured in the UI. IIRC the crash occurs because it can't bind to an address that isn't on the local machine. Fixing this for the non-oscquery implementation would require different UI config option for IP addresses for listening/sending.

The second part of the issue is that OSCQuery hardcodes the address it advertises to "127.0.0.1", so if VRC is running on a different computer, it won't be able to send/receive to VRCFT. This seems intentional due to this code/comment, but this breaks setups where VRCFT is running on a separate PC -- especially so for someone trying to use standalone VRC.

i don't think that this is an issue since you are able to change the ip in launch settings for vrchat like stated here, i do think that it is an binding issue on the part of the application, i have just build a version localy and confirmed two issues with the ip field

if you clear the ip field than the application will sometimes crash and next time you launch it the same thing will happen, i looked into the appdata/roaming/VRCFaceTracking folder for the settings json and there the ip would be blank, if you replace that with a valid ip the app would work correctly again, so something is going wrong when validating the saved address and when setting it to blank it doesn't correct its self to the default 127.0.0.1,

i have also been able to confirm that the app hangs when setting it to a remote ip instead of straight up crashing