job000432

marcin_poreba (marcin_poreba)
marcin_poreba created this job , modified by Perforce maintenance
Open
"pServer is null" Error

Random API operations fail returning 'pServer is null' error message intermittently . Our .NET service/application uses Perforce quite heavily and the errors seem to appear more often when the workload is high.
We found that restarting our .NET service often prevents ‘pServer is null’ errors to appear or at least minimize their frequency.

There are random API methods failing on occasion returning this message, the example would be:
Perforce.P4.Connection.Client.SyncFiles(flags, file);


The API code returning the error is present in the P4Server.cs file
https://swarm.workshop.perforce.com/files/guest/perforce_software/p4api.net/p4api.net/P4Server.cs


    private void RunCommandThreadProc(object param)
        {
            RunCommandThreadParam CmdParams = param as RunCommandThreadParam;
            if (CmdParams == null)
            {
                Debug.Trace(string.Format("RunCommandThreadProc CmdParams is null param != null:{0}", param != null));
                return;
            }
            try
            {
                Debug.Trace(string.Format("Entering RunCommandThreadProc, cmdId = {0}",CmdParams.cmdId));

                CmdParams.RunCmdException = null;
                if (pServer == IntPtr.Zero)
                {
                    Debug.Trace("RunCommandThreadProc pServer is null");

                    CmdParams.Results = false;
                    CmdParams.RunCmdException = new P4Exception(ErrorSeverity.E_FATAL, "pServer is null");
                    return;
                }

...
  • Details
  • Comments -
Status
Open
Project
perforce-software-p4api-net
Severity
A
Reported By
marcin_poreba
Reported Date
Modified By
Perforce maintenance
Modified Date
Owned By
marcin_poreba
Type
Bug