These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Can't find "f is null" error

David Dunn
Registered: Oct 28 2010
Posts: 116

I'm getting an error message and cannot find the source. The error message is:
 
f is nullException in line 1166 of function AFSimple_Calculate, script
Exception in line 1 of function top_level, script Field:Calculate
 
TypeError: f is null
 
I've checked all scripts in actions and calculations and find no leads. When I "Edit all JavaScripts" I don't have 1166 lines of scripting in this particular form. I'm at a loss and would appreciate any suggestions on how to chase this down.

David D

My Product Information:
Acrobat Pro 9.4.2, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
That means that one or more of the fields that you've specified for one of the built-in calculation methods for a field does not exist. You may have renamed a field after you set up the calculation.
David Dunn
Registered: Oct 28 2010
Posts: 116
Thank you George. I was aware that that was what it means. For a time the field name was referenced in the error message, but the message no longer references the field name. Now the error message simply says "f is null" in the context quoted in my first post above.

I searched, unsuccessfully, using "Edit all JavaScripts" for that field name, and also searched for "var f" "f.value", "_f", "f_" and "f." without success. I even looked at every calculation and every action script individually, in the field properties for every field in the form, and no script exists referencing that field name. As I mentioned, the error message references line 1166, but there are less than 900 lines of script in the form, so I am at a dead end.

David D

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
The error may be being thrown by a system level JS function in the JSByteCodeWin.bin file, compiled JS code used for basic Acrobat/Reader functions.

More than likely, you may have a field format type error that the system functions can not resolve the format difference. Check that each field being used is has a numeric or percentage format and you are not using any special or custom formats.

You can list the contents of the function by running:

AFSimple_Calculate

in the JS debugging console. But I suspect the error is in one of the functions called from within the AFSimple_Calculate.

George Kaiser