Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"FormatException: Input string was not in a correct format." in 2021.2.0b16

Discussion in '2021.2 Beta' started by Bersaelor, Oct 22, 2021.

  1. Bersaelor


    Oct 8, 2016
    Hello again, after solving the issue where we have to clear the `Library` folder so WebGL will run again , I get a new issue when trying to Build&run my WebGL project, before any of my own scripts can execute:

    Code (CSharp):
    1. FormatException: Input string was not in a correct format.
    2.   at System.Text.StringBuilder.FormatError () [0x00000] in
    Here's a comparison of the same code, running in 2021.2.0b12 (here it works and my own logs start to print) and 2.0b16 (here it crashes before it can execute any of my own projects code):
    Screenshot 2021-10-22 at 17.03.51.png

    And here is the call-stack:
    Screenshot 2021-10-22 at 17.26.34.png

    Code (CSharp):
    1.     _JS_Log_Dump (mylooc-debug.framework.js:2:34164)
    2.     wasm-stub
    3.     <?>.wasm-function[WebGLPrintfConsolev(LogType, char const*, void*)]
    4.     <?>.wasm-function[InternalErrorConsole(char const*, ...)]
    5.     <?>.wasm-function[DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)]
    6.     <?>.wasm-function[DebugStringToFile(DebugStringToFileData const&)]
    7.     <?>.wasm-function[Scripting::LogExceptionFromManaged(ScriptingExceptionPtr, int, char const*, bool, Scripting::LogExceptionFromMangedSettings const*)]
    8.     <?>.wasm-function[Scripting::LogException(ScriptingExceptionPtr, int, char const*, bool)]
    9.     <?>.wasm-function[MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr)]
    10.     <?>.wasm-function[MonoBehaviour::DelayedStartCall(Object*, void*)]
    11.     <?>.wasm-function[DelayedCallManager::Update(int)]
    12.     <?>.wasm-function[InitPlayerLoopCallbacks()::EarlyUpdateScriptRunDelayedStartupFrameRegistrator::Forward()]
    13.     <?>.wasm-function[ExecutePlayerLoop(NativePlayerLoopSystem*)]
    14.     <?>.wasm-function[ExecutePlayerLoop(NativePlayerLoopSystem*)]
    15.     <?>.wasm-function[MainLoop()]
    16.     <?>.wasm-function[dynCall_v]
    17.     wasm-stub
    18.     40940
    19.     browserIterationFunc (mylooc-debug.framework.js:2:212150)
    20.     callUserCallback (mylooc-debug.framework.js:2:165348)
    21.     runIter (mylooc-debug.framework.js:2:166620)
    22.     Browser_mainLoop_runner (mylooc-debug.framework.js:2:164886)
    Last edited: Oct 22, 2021