PowerBuilder · Runtime error

R0067: Null object reference cannot be assigned to autoinstantiate variable

What does R0067: Null object reference cannot be assigned to autoinstantiate variable mean in PowerBuilder?

The program attempted to assign a null reference to a variable declared as autoinstantiate, which PowerBuilder does not allow since an autoinstantiate variable is expected to always reference a valid instance.

R0067: Null object reference cannot be assigned to autoinstantiate variablePowerBuilder Classic · Appeon PowerBuilder

Condition

The program attempted to assign a null reference to a variable declared as autoinstantiate, which PowerBuilder does not allow since an autoinstantiate variable is expected to always reference a valid instance.

Fix

If the intent was genuinely to clear the reference, declare the variable without autoinstantiate and manage its instantiation explicitly instead.

Pending source verification. Not yet checked against official documentation.

Related runtime error