Skip to content

ArgumentException: invalid utf-16 sequence at 16376912 (missing surrogate tail) #13

@originalfoo

Description

@originalfoo

Looks like there's a broken vehicle asset in workshop, and when LSM tries to report that it's broken it fails with this exception (ignore the +/- signs, just using them to highlight parts of the stack trace):

- ArgumentException: invalid utf-16 sequence at 16376912 (missing surrogate tail)
Parameter name: string
  at (wrapper managed-to-native) UnityEngine.UnityLogWriter:WriteStringToUnityLog (string)
  at UnityEngine.UnityLogWriter.Write (System.String s) [0x00000] in <filename unknown>:0 
  at System.IO.TextWriter.WriteLine (System.String value) [0x00000] in <filename unknown>:0 
  at System.Console.WriteLine (System.String value) [0x00000] in <filename unknown>:0 
  at LoadingScreenMod.Util.DebugPrint (System.Object[] args) [0x00000] in <filename unknown>:0 
  at LoadingScreenMod.AssetLoader.NotFound (System.String fullName) [0x00000] in <filename unknown>:0 
  at LoadingScreenMod.UsedAssets.ReportMissingAssets[VehicleInfo] (System.Collections.Generic.HashSet`1 customAssets, Type type) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
+ LoadingScreenMod.UsedAssets:ReportMissingAssets(HashSet`1, Type)
LoadingScreenMod.UsedAssets:ReportMissingAssets()
LoadingScreenMod.AssetLoader:Report()
LoadingScreenMod.<LoadCustomContent>d__27:MoveNext()
LoadingManager:Update()
 
(Filename:  Line: -1)

The result is that when user enters game, they see something like this:

image

Windows - utf-16 Surrogate Tail.txt

User was playing a savegame from workshop, I've asked for a link which may hopefully track down the problem (I assume....) vehicle asset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions