Solved

Input string not in the correct format - mscorlib

  • 5 December 2018
  • 1 reply
  • 686 views

Badge +3

I'm getting a bit desperated.
Recently, there has been an issue with Smart Object List methods over and over again. Affected are only smart objects that have a decimal field and only the list methods. After restarting the K2 service, the error is gone. After some time, however, the error occurs again. I can not detect any errors in the logs and can not recognize the cause. Has this error ever occurred to someone?
We are using version 4.7 with the latest fix pack.

 

The attached hardcopy shows the error message when trying to execute the list method by smart object tester.

The error message below occurs by the smartforms:

 

  • Type:
    System.FormatException
  • Source:
    mscorlib
  • Method Base
    • Member Type:
      Method
    • Name:
      StringToNumber
    • Module
      • Scope Name:
        CommonLanguageRuntimeLibrary
    • Declaring Type
      • Full Name:
        System.Number
  • Stack Trace:
    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)at System.String.System.IConvertible.ToInt32(IFormatProvider provider)at System.Convert.ToInt32(Object value)at SourceCode.Workflow.Client.DataField.set_Value(Object val)at SourceCode.Forms.AppFramework.FormRuntime.ReturnValueAsDataFieldAccordingToType(DataField thisField, String value)at SourceCode.Forms.AppFramework.FormRuntime.StartProcess(String processXml)at SourceCode.Forms.Runtime.AJAXCall.ProcessRequest(HttpContext context)


14910i4553DA66AB3C2B63.jpg

icon

Best answer by AndreasG 6 December 2018, 21:04

View original

1 reply

Badge +3
I found the problem.
We are using a Custom ServiceBroker that is probably changing the culture setting to en-US.
The following steps I tried:
  1. Run the method of a smartobject from this servicebroker
  2. Execution of some method that contains decimal numbers
  3. Exception "Input string not in the correct format" throws
  4. Restart K2-Service
  5. Try to execute a method that contains decimal numbers - it works
  6. Run the method of a smartobject from this servicebroker again
  7. goto point 3 ...
Our K2 server is configured with de-DE.
I think running a method of the Custom ServiceBroker changes the culture settings at runtime.
Perhaps the K2 service can no longer handle "comma" instead of "dot" on decimal numbers and throws the CommonLanguageRuntimeLibrary exception.
Andi

Reply