Reputation: 9019
I suddenly am getting what appears to be a Unicode issue in Visual Studio after a Windows 7 restart. Does anyone have an idea about how to resolve this? I've been messing around with virus scanners and .cspoj files (where the errors are located) for the last few hours to no avail.
Error 1 The build stopped unexpectedly because of an internal failure.
System.Text.EncoderFallbackException: Unable to translate Unicode character \uD97C at index 1321 to specified code page.
at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index)
at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars)
at System.Text.UTF8Encoding.GetByteCount(Char* chars, Int32 count, EncoderNLS baseEncoder)
at System.Text.UTF8Encoding.GetByteCount(String chars)
at System.IO.BinaryWriter.Write(String value)
at Microsoft.Build.BackEnd.NodePacketTranslator.NodePacketWriteTranslator.TranslateDictionary(Dictionary`2& dictionary, IEqualityComparer`1 comparer)
at Microsoft.Build.Execution.BuildParameters.Microsoft.Build.BackEnd.INodePacketTranslatable.Translate(INodePacketTranslator translator)
at Microsoft.Build.BackEnd.NodePacketTranslator.NodePacketWriteTranslator.Translate[T](T& value, NodePacketValueFactory`1 factory)
at Microsoft.Build.BackEnd.NodeConfiguration.Translate(INodePacketTranslator translator)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.NodeContext.SendData(INodePacket packet)
at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker)
AND THE ANSWER IS:
NB. Hans was the closest to working out what had happened... so I awarded the points to him
Upvotes: 0
Views: 626
Reputation: 941635
Well, the message is pretty accurate. \uD97C a utf-16 surrogate, surrogates must always appear in a pair to encode a character whose value is larger than \uFFFF. The exception message says that the second surrogate of the pair does not occur in the string.
Seeing this occur in a build is very bad news, such characters should never appear in project files. You don't write them in an ancient dead Middle-Eastern language or an obscure native American language with a couple of thousand people that still know how to speak it :). The only reasonable explanation is that the file(s) on your disk are scrambled all to hell. You'll need to get your machine fixed, replacing the disk should be high on your list of priorities right now.
Upvotes: 2