Failed to extrat INTO items

What does this runtime error mean?

We see it on a dedicated batch clients about every day or two in the same method each time. The code is astoundingy simple, and this method is constantly running, but it throws a runtime error very intermittently. $arLineItemsExtended and $alLineItemsSpecialProcessing are declared as ARRAY REAL and ARRAY LONGINT earlier in the method.

			If ([Invoices]InvoiceID#0)  
				
				$lID:=[Invoices]InvoiceID
				
				Begin SQL
					SELECT Extended, SpecialProcessing
					FROM LineItems
					WHERE InvoiceID=:$lID
					INTO :$arLineItemsExtended, :$alLineItemsSpecialProcessing
				End SQL
				
			End if 

I guess the runtime error means “rewrite this in 4D code instead.” But this is darn simple stuff.

4D Remote v16.3 HF2 running on Windows Server 2008 R2.

I haven’t seen this error before, Jeff, but is it possible that there is a NaN in the Extended or SpecialProcessing fields for the LineItems record where this error occurs?

nulls don’t seem to throw any error.

<code 4D>
ALL RECORDS([LineItems])
APPLY TO SELECTION([LineItems];SET FIELD VALUE NULL([LineItems]Extended))

ALL RECORDS([Invoices])

If ([Invoices]InvoiceID#0)

$lID:=[Invoices]InvoiceID

ARRAY REAL($arLineItemsExtended;0)
ARRAY LONGINT($alLineItemsSpecialProcessing;0)

Begin SQL
	SELECT Extended, SpecialProcessing
	FROM LineItems
	WHERE InvoiceID=:$lID
	INTO :$arLineItemsExtended, :$alLineItemsSpecialProcessing
End SQL

End if

</code 4D>

http://forums.4d.com/4DBB_Main/x_User/298210/files/24833869.zip

maybe the process needs more stack memory (local variables consume stack, and nested methods consume stacks of stacks)