Sequencer and pull port being cleared to null between Build and Connect phase

I’m sure this is something really silly, it has to be, but it’s really confusing.
I have a translation component with a sequencer and pull port. It builds them in the build phase, and I have prints to verify they are not null, those prints are the last thing in the build phase.

I also have prints in the beginning of the connect phase, and suddenly by then the items are null.

class translation extends uvm_component;
   uvm_sequencer#(A) m_sequencer;
   protected uvm_seq_item_pull_port#(A) pull_port;

   function new(string name, uvm_component parent);, parent);

   function void build_phase(uvm_phase phase);
      m_sequencer = uvm_sequencer#(A)::type_id::create("m_sequencer", this);
      pull_port = new("pull_port", this);
      // print the sequencer and pull port, which shows non-null values

   function void connect_phase(uvm_phase phase);
      // print the sequencer and pull port, which shows null values

Any ideas as to what I need to debug/investigate here? I have never had my references just become null without anything making them null.
The only accesses of those handles from outside the translation component is in the connect phase of an environment, where the m_sequencer member is read, but not assigned. I can’t find any reason for them to become null, especially the pull port, since no other class sees that.


The issue was (somehow, I still don’t understand why) that a subclass (which did not reference the pull_port or m_sequencer) used the object param utils. I guess the uvm_object_utils macro somehow clears all child elements after the build phase since objects shouldn’t have children???

You are not showing enough code to offer a better explanation. pull_port and m_sequencer are local to the translation class. There is no way for it to be null unless it was never set in the first place, or another class made an assignment to it.

When using `uvm_object_utils on a class derived from uvm_component, the type_id::create() method does not pass the parent argument to the constructor. You would have gotten a compiler error unless you defined the construct argument with a default parent=null.