0
Fixed

1.4.0 alpha 4 NullReferenceException on Physics.Raycast

|singular~niche| 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 6

i just upgraded to 1.4.0 alpha 4 from 1.3.0 and a graph that was working fine in 1.3.0 is now giving me a NullReferenceException. this pic is from play mode:


here is the error message in the console:

NullReferenceException: Object reference not set to an instance of an object
Bolt.Flow.GetConvertedValue (Bolt.ValueInput input)
Bolt.InvokeMember.Invoke (Bolt.Flow flow)
Bolt.InvokeMember.Enter (Bolt.Flow flow)
Bolt.Flow.InvokeDelegate (Bolt.ControlInput input)

i had to connect the control input and output of the Physics.Raycast for 1.4.0 alpha 4, even though i didn't have it connected in 1.3.0. and i tried replacing various units, and restarting Unity, to no avail.

not sure if this is a bug – would appreciate any help. thanks!

Unity 2017.4.3f1 on MacOS 10.13.5

EDIT: in play mode the droplet animations suggest that the layer mask is not sending anything up to the Physics.Raycast, while everything else is.

EDIT: and, when i substitute the Physics.Raycast that doesn't have a LayerMask input, i don't get any error on the raycast, so to me it looks like the LayerMask literal is not working properly.

actually, correction. 

this works:


but this doesn't:

    

so i guess it could be the hit info?

if i use the raycast that doesn't give a hitinfo, it works. so i guess it is a hitinfo problem.

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
+2
Working on Fix

That's definitely a bug! Looking into it & trying to fix ASAP, will just issue a hotfix to the beta 1.

that was quick! thanks, Lazlo! :)

+2
Fixed in Beta

Should be fixed in the beta build I just pushed!

+2

Note: I can't remember if not plugging the Control port was supported in 1.3 and prior, but if so, it has been obsoleted. For functions with out/ref parameters, specifying the invocation time is now required.

the raycast is working great now. :) have a nice couple of weeks away, Lazlo.