Troubleshooting HLUs

This module describes some of the common problems users encounter when they compile and run HLU applications.

The HLU APIs were designed so that a descriptive error message is generated when a problem is encountered. The Error class can be used to trap and print these messages. However, there are some cases where errors can occur which go unreported. This module will point out such cases as we discover them.

Also, note that the form of the compiler error messages listed in this module are system- and compiler-dependent.

Problem 1
A value is changed in a resource file, but the resulting graphic, or other object, does not reflect the change.
Solution:
  1. Check that your resource file is in the proper directory and is correctly named. Resource files describes the way user resource files are named for an application.
  2. There could be a spelling error in the assignment path of that resource in the resource file.

    You may have spelled the resource name incorrectly, spelled an object id incorrectly, or formed an illegal object pathname. Errors of these kinds in a resource file are not reported. To see if the problem is of this kind, set the resource in question directly in your HLU code as shown in Three ways to set resources. Compile and run your code using nhlcc or nhlf77 and watch for an error message. If there is no error message and the plot now reflects the change in the resource value, then there is indeed a pathname error in defining that resource in your resource file. To determine if the error is in the pathname, default the resource to apply to all objects in its hierarchy using the wild card character as in:

          *resourcename : resource value
    
  3. Check whether you set this resource in your HLU program. Resource setting in the program overrides resource setting in a resource file. If this is the problem, you will need to either pull the code that sets the resource out of your program, or set the new value there. Either case will require that you re-compile, link, load, and execute to create a new program module.

Problem 2.
You get error messages of the form:

cfe: Error: xy04c.c, line 109: 'NhlNxyCoordData' undefined; reoccurrences will not be reported.
     NhlRLSetInteger(rlist,NhlNxyCoordData,dataid);
 --------------------------^
cfe: Error: xy04c.c, line 110: 'NhlxyPlotClass' undefined; reoccurrences will not be reported.
     NhlCreate(&plotid,"xyPlot",NhlxyPlotClass,xworkid,rlist);
 -------------------------------^
Solution:
Check the include statements in your C program. In this case, the include statement
      #include <ncarg/hlu/XyPlot.h>
was omitted. This is the header file needed by the XyPlot object.

Problem 2a.
You get error messages of the form:

      fatal:nhlfcreate:Invalid Class Function
      fatal:NhlDraw: Invalid plot ID: -4
Solution 2a.
You omitted the statement
      external nhlfxyplotclass
from your Fortran program.

Likewise, if you omit

      external nhlfxworkstationclass
you will get errors like:

      fatal:nhlfcreate:Invalid Class Function
      fatal:_NhlCreate:Invalid Parent id #-4
      fatal:NhlDraw: Invalid plot ID: 0
      fatal:Unable to update Workstation with PID#-4
      fatal:Unable to clear Workstation with PID#-4
      fatal:Unable to Destroy (Bad PID#-4)Consulting Contacts:
Omitting
      external nhlfappclass
will result in:

      fatal:nhlfcreate:Invalid Class Function
      fatal:_NhlCreate:Unable to access "default" App object
      fatal:_NhlCreate:Unable to access "default" App object
      fatal:_NhlCreate:Unable to access "default" App object
      fatal:NhlDraw: Invalid plot ID: 0
      fatal:Unable to update Workstation with PID#0
      fatal:Unable to clear Workstation with PID#0
      fatal:Unable to Destroy (Bad PID#0)
      fatal:Unable to Destroy (Bad PID#-4)
Omitting
      external nhlfcoordarraysrclass
will produce:

      fatal:nhlfcreate:Invalid Class Function
      fatal:Unable to access plot with pid:-4
      warning:Unable to add DataItem "(null)" to DataList "xyCoordData"
      fatal:CompileDataList:DataList has no valid members
You will get a plot with a grid and no data.

The NCAR Graphics consulting staff is available via e-mail at graphuse@ncar.ucar.edu. Installation consulting is available at ncargfx@ncar.ucar.edu. The comment form is available for submittal from any page of the documentation. Just click on the Feedback icon in the control panel and go from there.

See also:


User Guide Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, UG Contents, UG WhereAmI?


$Revision: 1.18 $ $Date: 1998/07/31 00:55:37 $