ReSharper and Unicode

I just opened a source file that contains this line of code:

private const char blah = '\xEFBFBF';

where '\xEFBFBF' is the binary encoding of the actual Unicode character sequence (according to UltraEdit in hex mode). The problem is that ReSharper completely freaks out when it encounters this character sequence and treats this character as a pseudo end-of-file character (meaning ReSharper does not analyze any line of code after the line containing this character). If I reformat the file (CtrlE, CtrlF), ReSharper truncates the file at this character. If I modify the file in any way, ReSharper throws this exception. I can't post the exception to JIRA because I'm on a business trip and the Internet connection in the hotel is currently down.

JetBrains.Util.InternalErrorException: Chameleon length differ after opening!

at JetBrains.Util.InternalErrorException..ctor(String, Exception) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\InternalErrorException.cs:line 29 column 7
at JetBrains.Util.Logger.Fail(String) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135 column 5
at JetBrains.Util.Logger.Assert(Boolean, String) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 110 column 3
at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.OpenChameleon() in c:\A\work\Server\be08dc054b0f1225\src\Psi.CSharp\src\Impl\Tree\ChameleonBlock.cs:line 90 column 7
at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.get_FirstChild() in c:\A\work\Server\be08dc054b0f1225\src\Psi.CSharp\src\Impl\Tree\ChameleonBlock.cs:line 40 column 11
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 66 column 12
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Daemon.CSharp.Stages.FileStructureCollectorProcess.ProcessFile(ICSharpFile) in c:\A\work\Server\be08dc054b0f1225\src\Daemon.CSharp\src\Stages\FileStructureCollectorStage.cs:line 236 column 57
at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpDaemonStageProcessBase.Execute() in c:\A\work\Server\be08dc054b0f1225\src\Daemon.CSharp\src\Stages\CSharpDaemonStageBase.cs:line 65 column 7
at JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.DoHighlighting(Boolean, Boolean) in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\DaemonProcessBase.cs:line 294 column 19
at JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.DoHighlighting(Boolean, Boolean) in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\VisibleDocumentDaemonProcess.cs:line 234 column 9
at JetBrains.ReSharper.Daemon.Impl.c__DisplayClass1.]]>b__0() in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\VisibleDocumentDaemonProcess.cs:line 220 column 65
at JetBrains.ReSharper.Daemon.Impl.DaemonThread.ThreadProc() in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\DaemonThread.cs:line 132 column 13
at System.Threading.ThreadHelper.ThreadStart_Context(Object)
at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object)
at System.Threading.ThreadHelper.ThreadStart()

at JetBrains.Util.Logger.Fail(String messageText) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135

Attachment not added (content type not allowed): "att1.html"

2 comments
Comment actions Permalink

This problem is already fixed in 4.0

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Lothan" <lothan@newsguy.com> wrote in message news:fhqtuh$t3c$1@is.intellij.net...
I just opened a source file that contains this line of code:

private const char blah = '\xEFBFBF';

where '\xEFBFBF' is the binary encoding of the actual Unicode character sequence (according to UltraEdit in hex mode). The problem is that ReSharper completely freaks out when it encounters this character sequence and treats this character as a pseudo end-of-file character (meaning ReSharper does not analyze any line of code after the line containing this character). If I reformat the file (CtrlE, CtrlF), ReSharper truncates the file at this character. If I modify the file in any way, ReSharper throws this exception. I can't post the exception to JIRA because I'm on a business trip and the Internet connection in the hotel is currently down.

JetBrains.Util.InternalErrorException: Chameleon length differ after opening!

at JetBrains.Util.InternalErrorException..ctor(String, Exception) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\InternalErrorException.cs:line 29 column 7
at JetBrains.Util.Logger.Fail(String) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135 column 5
at JetBrains.Util.Logger.Assert(Boolean, String) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 110 column 3
at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.OpenChameleon() in c:\A\work\Server\be08dc054b0f1225\src\Psi.CSharp\src\Impl\Tree\ChameleonBlock.cs:line 90 column 7
at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.get_FirstChild() in c:\A\work\Server\be08dc054b0f1225\src\Psi.CSharp\src\Impl\Tree\ChameleonBlock.cs:line 40 column 11
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 66 column 12
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Daemon.CSharp.Stages.FileStructureCollectorProcess.ProcessFile(ICSharpFile) in c:\A\work\Server\be08dc054b0f1225\src\Daemon.CSharp\src\Stages\FileStructureCollectorStage.cs:line 236 column 57
at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpDaemonStageProcessBase.Execute() in c:\A\work\Server\be08dc054b0f1225\src\Daemon.CSharp\src\Stages\CSharpDaemonStageBase.cs:line 65 column 7
at JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.DoHighlighting(Boolean, Boolean) in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\DaemonProcessBase.cs:line 294 column 19
at JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.DoHighlighting(Boolean, Boolean) in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\VisibleDocumentDaemonProcess.cs:line 234 column 9
at JetBrains.ReSharper.Daemon.Impl.c__DisplayClass1.]]>b__0() in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\VisibleDocumentDaemonProcess.cs:line 220 column 65
at JetBrains.ReSharper.Daemon.Impl.DaemonThread.ThreadProc() in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\DaemonThread.cs:line 132 column 13
at System.Threading.ThreadHelper.ThreadStart_Context(Object)
at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object)
at System.Threading.ThreadHelper.ThreadStart()

at JetBrains.Util.Logger.Fail(String messageText) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135

Attachment not added (content type not allowed): "att1.html"

0
Comment actions Permalink

Thanks for the update, Eugene.
"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in message news:fhrr05$sf$1@is.intellij.net...
This problem is already fixed in 4.0

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Lothan" <lothan@newsguy.com> wrote in message news:fhqtuh$t3c$1@is.intellij.net...
I just opened a source file that contains this line of code:

private const char blah = '\xEFBFBF';

where '\xEFBFBF' is the binary encoding of the actual Unicode character sequence (according to UltraEdit in hex mode). The problem is that ReSharper completely freaks out when it encounters this character sequence and treats this character as a pseudo end-of-file character (meaning ReSharper does not analyze any line of code after the line containing this character). If I reformat the file (CtrlE, CtrlF), ReSharper truncates the file at this character. If I modify the file in any way, ReSharper throws this exception. I can't post the exception to JIRA because I'm on a business trip and the Internet connection in the hotel is currently down.

JetBrains.Util.InternalErrorException: Chameleon length differ after opening!

at JetBrains.Util.InternalErrorException..ctor(String, Exception) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\InternalErrorException.cs:line 29 column 7
at JetBrains.Util.Logger.Fail(String) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135 column 5
at JetBrains.Util.Logger.Assert(Boolean, String) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 110 column 3
at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.OpenChameleon() in c:\A\work\Server\be08dc054b0f1225\src\Psi.CSharp\src\Impl\Tree\ChameleonBlock.cs:line 90 column 7
at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.get_FirstChild() in c:\A\work\Server\be08dc054b0f1225\src\Psi.CSharp\src\Impl\Tree\ChameleonBlock.cs:line 40 column 11
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 66 column 12
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendants(IRecursiveElementProcessor) in c:\A\work\Server\be08dc054b0f1225\src\Psi\src\ExtensionsAPI\Tree\TreeElement.cs:line 73 column 9
at JetBrains.ReSharper.Daemon.CSharp.Stages.FileStructureCollectorProcess.ProcessFile(ICSharpFile) in c:\A\work\Server\be08dc054b0f1225\src\Daemon.CSharp\src\Stages\FileStructureCollectorStage.cs:line 236 column 57
at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpDaemonStageProcessBase.Execute() in c:\A\work\Server\be08dc054b0f1225\src\Daemon.CSharp\src\Stages\CSharpDaemonStageBase.cs:line 65 column 7
at JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.DoHighlighting(Boolean, Boolean) in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\DaemonProcessBase.cs:line 294 column 19
at JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.DoHighlighting(Boolean, Boolean) in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\VisibleDocumentDaemonProcess.cs:line 234 column 9
at JetBrains.ReSharper.Daemon.Impl.c__DisplayClass1.]]>b__0() in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\VisibleDocumentDaemonProcess.cs:line 220 column 65
at JetBrains.ReSharper.Daemon.Impl.DaemonThread.ThreadProc() in c:\A\work\Server\be08dc054b0f1225\src\Daemon\src\Impl\DaemonThread.cs:line 132 column 13
at System.Threading.ThreadHelper.ThreadStart_Context(Object)
at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object)
at System.Threading.ThreadHelper.ThreadStart()

at JetBrains.Util.Logger.Fail(String messageText) in c:\A\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135

Attachment not added (content type not allowed): "att1.html"

0

Please sign in to leave a comment.