Temporary value is not initialized if it is also appears in unreached path
naqtn
For instance on a Branch node where the condition parameter is false, a temporary value is used as uninitialized on false-path if the value also appears on true-path.
See attached first image. A temporary value "message_0" is the result of Int.ToString. It is assigned only on true-path of the Branch node. So this node program prints unexpected "Null" instead of "1" to the console.
Same thing happens on a For node if the start parameter equals the end parameter (2nd image). Also on a While node (3rd image).
This is potentially root cause of followings:
- https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/connecting-the-same-playerapi-node-to-multiple-nodes-under-different-branch-node
- https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/branches-decompose-variables-to-null-in-certain-scenarios
(Thx ureishi. https://twitter.com/aivrc/status/1398156377889984512 )
The program of the Branch node case:
application/vnd.unity.graphview.elements ANWUyW7bMBCGX8XgWRSGO2kglywFghZtgSTuoQgMUqRctQpVaElruH6yHvpIfYXSS4LETgMfcmghQMAMJXL+7x/O75+/FujW1kNA448LVA51/dbepACd3YbYTy962/YoQ0PlU847XzgCCpdOlJiD5dgIw7FSRHHOQYEm6eOvTVf1VRPReIG+ozEmHHJBCNFcGso01Rmap7SUOdFGEE4kECGpWGYoNj5cnZ92qZrrDJV1820bIe0lGFcqzIVNr5IbbHxpcBE8c+CFEZag680Ok5Wg9R7L7JGo49bG4tO9noP2fEKPzrUWBAgjmgnDlNwKUrlgRBAFVGvQ8rEehHYUuRKsc05h56TBPHiCrWIeGypJSUFoVkI63QVQqhQSa89CKpIybBKxdBpzNBS0CNTvCV+gIVb9/J37HIp+svF3garY9QlAOD9FY0jVdX1bxdl2GV3Muz7c5MdNUwcbs9FNVzRtXblsNAltl/Qf8RxWTzY6Gep+aMNRDEPf2jobvR9cXRWvw/yy+RLikVPKikJIYhgPoM2PV7buAlru+nHSpIqmm4PPY8/ovTXcWceVZ7jUFjBnRWo1ojUGaXxqQgO0FE9ZI9beUMqY1lKlP9bWGJFrAoJIJhSnKfu8NS9Ic63qZVmSfY4PCObT6WVzsS5luiW7ie7RMhMALHNY8IJgrlJrpYzHnjJlPNXSGfkEWr66rgmh4CCoYpyvySqernYiyxgIKTnsNv1BPv5P9GGf/tWqvLM4q2I4DW6YJQveNLOztm3aOws2xd9FkyYZcWfHQfd7z46/NLpMWWk4FxpAabI7Uw/yPkl8eUMOpfbBtvFB6z7H7bDxucdN5DI1MOVp9DMlNpN7Ox8YkURSAob/S9iul38A
Log In