Known Issue: Writing to File Geodatabase results in Spatial Index error

Trent Kading
Trent Kading
  • Updated
Known Issue ID FMEENGINE-57513, FMEENGINE-66586
Discovered November 16, 2018
Affects All versions



Attempting to write to a File Geodatabase using the Geodatabase_File Writer produces the following error/warning in log file:

"An error occurred while flushing the cursor for the table/feature class 'route_line'. The error number from ArcObjects is: '-2147216894'. The error message from ArcObjects is: {The spatial index grid size is invalid.} A fatal error has occurred. Check the logfile above for details"


When writing to a new feature class, it is put into Load Only Mode, which makes it so the spatial index is created at the end. Normally, this would mean that the problem described in this issue shouldn’t happen. (Error: The spatial index grid size is invalid )

However, the workspace in this issue is writing to a large number of tables. FME has an upper limit on the number of Insert cursors that are cached (i.e. 20 max cursors at a time.) If this limit is reached, the oldest cursor gets deleted, and if we need to write to the table that cursor was opened for again after that, then a new cursor will be created. In this case, it is no longer a new table, thus is not in Load Only mode by default.



Workaround 1(FME2022+):

In FME 2022, an option to enable Load Only mode for inserts has been added. The problem can be avoided by enabling this option, since Load Only mode will be utilized even if the table is not new.

Workaround 2(Pre-FME 2022):

For older versions of FME which don’t have the new option. The problem should never happen as long as the number of tables being written to do not exceed 20. Sorting the features so the ones going to the same feature type are together is also an alternative.

Was this article helpful?



Please sign in to leave a comment.