Sequence_item has null sequencer

Hi,

I am facing “sequence_item has null sequencer” issue with the below code snippet:
Starting the sequence as a default sequence from the test as below:
uvm_config_db#(uvm_object_wrapper)::set(this, “env.uvc.agent.*.main_phase”, “default_sequence”, my_seq::get_type());

Sequencer and driver are connected as below in the agent:
driver.seq_item_port.connect(sequencer.seq_item_export);

I am casting the sequencer object in the sequence with m_sequencer and before the start_item call I am checking if the sequencer is null or not. Getting run time FATAL error at start_item(req) although sequencer is not null. Can someone point out if there’s anything wrong with the code?

Thanks.

In reply to Heisenberg:

There are a few things you should change:
(1) Starting a sequence automatically by setting a ‘default_sequence’ is a deprecated feature. You should not use this in current and future projects. But it is still working.
(2) you should work with run_phase instead of main_phase
(3) Your config db set command is wrong. Use uvm_config_db#(uvm_object_wrapper)::set(null, “/.*sequencer.run_phase/”,“default_sequence”, my_sequence::get_type());