Smart Object Event throws "Offset and length were out of bounds..." error

  • 28 August 2008
  • 4 replies
  • 0 views

Badge +3

I have a Smart Object event that creates a smart object using xml data (infopath data) as the inputs.  I get the following error if I pass specific values via the smart object event:


"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."


 The xml values that cause this vary...here are some BAD values that I can pass to cause this error to be thrown:



  • Visitation Scholarship Program
  • Vtsttttton Scholtrshtp Progrtm
  • South Yale Emergency Physicians
  • New Hampshire Insurance Company
  • aaaaaaaaaaaaaaaaaaaaaaaaaaaa (28 a's)

 Here are some GOOD values, for comparison:



  • Visitation Scholarship Program2 (added an extra character)
  • Visitation Scholarship Progra (took off a character)
  • aaaaaaaaaaaaaaaaaaaaaaaaaaaa (27 a's)
  • aaaaaaaaaaaaaaaaaaaaaaaaaaaa (29 a's)



  • Visitation_Scholarship_Program

The column this is populating accepts 100 characters (I think that is the default).  So, I don't think the size of the column is the issue.  To test this, I got a different and expected error if I try to assign values that are too big.


Does anybody have any ideas of what I'm doing wrong here?  Or could it be a bug with the Smart Object event?  Thanks!

4 replies

Badge +3

Note sure if this helps, but here is the verbose log from the error:


Debug 1017 Enrolling Session Instance : 2EF580B371CC726A4DD03A4E04A4A39E.SourceCode.SmartObjects.Runtime.SmartObjectClientServer
Info 10514 Name: 'SourceCode.SmartObjects.Runtime' Version: '4.7285.1.0'  Date: '11/12/2007 7:32:10 AM'
Debug 10030 Requesting SmartObject instance c35f4d9e-52d1-4187-9bb0-7da23681248c version latest
Debug 10031 SmartObject request returned an instance
Debug 8040 Processing 32063 IOCP Bytes Related To 10.2.6.34:9
Debug 8036 Sent 32063 Bytes to 10.2.6.34:9
Debug 15 ServerEvent: 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.
Debug 28068 Create Client Services Request.Status: Completed

Badge +9
Wow, yeah, I was able to duplicate it but I can't explain it.  How about opening a ticket for that one?  Post your results here!
Badge +3

I worked with K2 support and it looks like a bug (soon to be fixed?) with their smart objects.  For some reason, if I create the smart objects via a Server Code event (versus a SmartObject.Create event), the bug is avoided.  Now we have to convert all our SmartObject.Create events to Server Code events.  Fun fun.  Here is a bit of the code, in case it helps anybody:


SmartObject

smartObject = serverName.GetSmartObject("Client_Services_Request");


smartObject.MethodToExecute = "Create";

smartObject.Properties["Client_Name"].Value = "Visitation Scholarship Program";

 

Badge +9
Blah, that can get tedious but at least there is a work around.  Lets try and test this specifically with the next release to ensure that it has been fixed.  Nobody else out there has ever experienced this?

Reply