OVM_COUNT - Error! NULL pointer dereference

Hi,

I’m trying to get quit_count at the end of the test and doing PASS/FAIL criteria. When I tried to


``` verilog


ovm_report_server r_s;
        `message(OVM_LOW, ("**********************************"));
        `message(OVM_LOW, ("Number of DUT errors  : %d", get_num_of_dut_errors()));
        `message(OVM_LOW, ("Number of TB errors  : %d", r_s.get_severity_count(OVM_ERROR)));

        if (get_num_of_dut_errors() || r_s.get_quit_count())
          `message(OVM_LOW, ("TEST FAILED"))
        else
          `message(OVM_LOW, ("TEST PASSED"));
        end


Getting Null pointer dereference.. what is that mean? 
* quit count did not increment? or I need to get in different way?

Find below the log..

[77057504] hier=sve: Number of TB errors  :
Error!  NULL pointer dereference
          File: /tools/cadence/incisv_9.2.37/IUS92/tools/ovm/ovm_lib/ovm_sv/sv/base/ovm_report_server.svh, line = 130, pos = 24
         Scope: worklib.ovm_pkg::ovm_report_server::get_severity_count
          Time: 77057504 PS + 0

I got it…

I did not get report_server.

Here is my working code…

ovm_report_server r_s;

        _global_reporter.report_summarize();
         r_s = _global_reporter.get_report_server(); 
        
        `message(OVM_LOW, ("**********************************"));
        `message(OVM_LOW, ("Number of DUT errors  : %d", get_num_of_dut_errors()));
        `message(OVM_LOW, ("Number of TB errors  : %d", r_s.get_severity_count(OVM_ERROR)));

        if (get_num_of_dut_errors() || r_s.get_quit_count())
          `message(OVM_LOW, ("TEST FAILED"))
        else
          `message(OVM_LOW, ("TEST PASSED"));
        end