intersystems-community / isc.onec

Caché 1C Bridge
Mozilla Public License 2.0
3 stars 0 forks source link

NetworkException: <VALUE OUT OF RANGE> when connecting to 1C v.8.1 #2

Open unix-junkie opened 10 years ago

unix-junkie commented 10 years ago

The following error: NetworkException: <VALUE OUT OF RANGE> appears from time to time when connecting to 1C v.8.1.

isc.onec.adapter log fragment:

2013-04-10 16:26:20.0984 5 on HandleMessage():receiveSendToken.receiveMessageOffset=25604, receiveSendToken.theDataHolder.dataMessageReceived=System.Byte[], 
receiveSendToken.receivedMessageBytesDoneCount=0, remainingBytesToProcess=24
System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the
end of the source collection.
   at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
   at isc.onec.tcp.async.MessageHandler.HandleMessage(SocketAsyncEventArgs
receiveSendEventArgs, DataHoldingUserToken receiveSendToken, Int32 remainingBytesToProcess)
2013-04-10 16:26:20.0984 5 Weird error: System.ArgumentException: Offset and
length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
   at isc.onec.tcp.async.MessageHandler.HandleMessage(SocketAsyncEventArgs
receiveSendEventArgs, DataHoldingUserToken receiveSendToken, Int32 remainingBytesToProcess)
   at isc.onec.tcp.async.TCPAsyncServer.ProcessReceive(SocketAsyncEventArgs
receiveSendEventArgs)
2013-04-10 16:26:20.0984 5 Weird error: System.ArgumentException: Offset and
length were out of bounds for the array or count is greater than the number of elements from index
to the end of the source collection.
   at isc.onec.tcp.async.MessageHandler.HandleMessage(SocketAsyncEventArgs
receiveSendEventArgs, DataHoldingUserToken receiveSendToken, Int32 remainingBytesToProcess)
   at isc.onec.tcp.async.TCPAsyncServer.ProcessReceive(SocketAsyncEventArgs receiveSendEventArgs)
2013-04-10 16:26:20.3324 5 OutgoingDataPreparer.sendError(): error was sent 
2013-04-10 16:26:20.3324 5 OutgoingDataPreparer.process(): no server object. 

Ensemble event log:

1        117     2013-04-10 16:27:34.336    Error   7918            UpdateGoodsVIP addin.UpdateGoodsAdapter:OnTask()     Адаптер: ошибка инициализации 1C: NetworkException: <VALUE OUT OF RANGE>
2       116     2013-04-10 16:27:34.335    Error   7918            UpdateGoodsVIP isc.onec.NetworkError:get()    NetworkException: <VALUE OUT OF RANGE>140on recieve5, , .values:{}13@%Exception.SystemException
3       115     2013-04-10 16:25:54.235    Error   7918            UpdateGoodsVIP isc.onec.NetworkError:get()    NetworkException: <VALUE OUT OF RANGE>140on recieve4, ,Srvr="a06";Ref="UP81";Usr="Ensemble";Pwd="Ensemble" Version="V81";.values:{}11@%Exception.SystemException

Originally posted at BitBucket.

unix-junkie commented 10 years ago

Unable to reproduce.

<VALUE OUT OF RANGE> is thrown by $SCONVERT from isc.onec.bridge.TcpClient whenever upon a successful read request no data is actually read from the 1C Bridge process. For instance, $sconvert("", "U2") results in the same error (%Exception.SystemException) with the same error code of 140:

try {w $sconvert("", "U2")} catch (e) { zw e } k e
e=<OBJECT REFERENCE>[8@%Exception.SystemException]
+----------------- general information ---------------
|      oref value: 8
|      class name: %Exception.SystemException
| reference count: 2
+----------------- attribute values ------------------
|               Code = 140  <Set>
|               Data = ""  <Set>
|     InnerException = ""  <Set>
|           Location = "zExecute+15^%Studio.General.1"  <Set>
|               Name = "<VALUE OUT OF RANGE>"  <Set>
|           (iStack) = $lb("^zExecute+15^%Studio.General.1^1","x^zExecute+15^%Studio.General.1^1","d^runMtdLow+22^%SYS.BINDSRV^1","x^runMtdLow+22^%SYS.BINDSRV^1","d^popFrame+199^%SYS.BINDSRV^1","d^ServerLoop+23^%SYS.BINDSRV^2","d^SuperConnect+44^%SYS.DBSRV^1","d^SuperServer+112^%SYS.SERVER^1","d^^^0")

The request details like 3,1,Выполнить.values:{} actually decipher to the following:

unix-junkie commented 10 years ago

Closing.