For further context, I previously got this error:
Error in default port dimensions function of S-function 'regcontrol_model/RegControl'. This function does not fully set the dimensions of output port 5
I didn't resolve the error, and instead I worked around it by temporarily removing output ports 5 and above. This allowed me to address other errors in the meantime. I've since added back those output ports, and that specific error no longer occurs.
A few interesting points:
1) It is not an S-function; it's a Stateflow block
2) The dimensions of the output port and the input port of the block that receives the signal were both defined in the Model Explorer.
3) Just like the above error, when I changed the order of the output ports, the error still occurred on port 5 (even for a different signal).