Switching ident to 2 spaces

My project uses clang-format, and Re# successfully detected that. However once in a while (could be in 15minutes, could be in a day) Re# decides to switch to 2 spaces ident for no obvious reason to me. I see it when I press Enter, it jumps as the identification would be 2 instead of 4.

Also here:

https://yadi.sk/i/_ZASveY-Mdu05g

If I touch .clang-format, it switches back to 4.

May be Re# can't open a file for some reason and you default to 2? I can't repro it consistently. 

 

JetBrains ReSharper 2020.2.1 Build 202.0.20200820.125348 built on 2020-08-20
ReSharper C++ 2020.2.20200820.145616
ReSharper 2020.2.20200820.132626

5 comments
Comment actions Permalink

Could you please start Visual Studio with the /ReSharper.Internal command-line argument, then enable the "Formatter and code styles" scenario on the Logging options page?

After you notice this issue again, please send us the log file. Thanks!

1
Comment actions Permalink

I've also seen this, tabs spaces change from 4 to 8 and spacing seems to be weird.

I will also switch on the log.

 

0
Comment actions Permalink

Here is a log  : 

 

================

15:10:50.731 |I| AddVsVersionToLogs | :1 | JetBrains ReSharper 2020.2.1 Build 202.0.20200820.125348
15:10:50.735 |I| AddVsVersionToLogs | :1 | Running under Visual Studio Professional 2019 version 16.4.29806.167, Hive: 16.0_adbfc980
15:10:53.111 |I| RemoteInstancesManagerWindowsImpl| :1 | Registering process in ROT: dotTrace.Viewers.24564, Process name: devenv
15:10:53.616 |I| SilentCleanupComponent | :1 | Starting silent cleanup component
15:10:53.617 |I| SilentCleanupComponent | :1 | Checking location C:\Users\LincourM\AppData\Local\JetBrains\Shared\vAny\Cache, lifespan 30.00:00:00. Will delete directories older than 2020-08-04 7:10:53 PM
15:11:26.072 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution instance created 61125795
15:11:27.074 |W| VsWorkspaceListener | :1 | Could not get IVsSolutionWorkspaceService. System.InvalidOperationException. Could not query the service provider for the service ID {66685CD1-6BE5-4285-A1A4-1CEBC413F04F}.
15:11:38.440 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution load done 61125795. Lifetime.IsTerminated=False
15:11:39.035 |T| ConfigFileService | JetPool(S) #2:59 | <AdditionalFiles> Flushing changes, added 0, removed 0
15:11:39.035 |T| ConfigFileService | JetPool(S) #2:59 | <AdditionalFiles> No changes found, exiting
15:11:46.262 |W| | JetPool(L) #4:72 | The system cannot find the file specified.
15:11:46.262 |W| | JetPool(L) #11:79 | The system cannot find the file specified.
15:11:46.262 |W| | CacheJobService:41 | The system cannot find the file specified.
15:11:46.275 |W| | JetPool(L) #2:70 | The system cannot find the file specified.
15:11:46.281 |W| | JetPool(L) #6:74 | The system cannot find the file specified.
15:11:46.301 |W| | JetPool(L) #4:72 | The system cannot find the file specified.
15:11:46.301 |W| | JetPool(L) #3:71 | The system cannot find the file specified.
15:11:46.301 |W| | JetPool(L) #2:70 | The system cannot find the file specified.
15:11:46.301 |W| | JetPool(L) #6:74 | The system cannot find the file specified.
15:11:46.302 |W| | CacheJobService:41 | The system cannot find the file specified.
15:11:46.306 |W| | JetPool(L) #4:72 | The system cannot find the file specified.
15:11:46.310 |W| | JetPool(L) #3:71 | The system cannot find the file specified.
15:11:46.310 |W| | JetPool(L) #11:79 | The system cannot find the file specified.
15:25:26.280 |W| | CacheJobService:41 | mdAssembly.Mvid.Equals(psiAssembly.Mvid), Cam2Bridge, PublicKeyToken=null, 5364ed5c-3e57-4e6f-8353-b84f0ea821ef, 00000000-0000-0000-0000-000000000000
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format (OldPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format (NewPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format (OldPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format (NewPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.editorconfig (OldPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.editorconfig (NewPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop (OldPath)
15:25:28.429 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop (NewPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format (OldPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format (NewPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format (OldPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format (NewPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop (OldPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop (NewPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.editorconfig (OldPath)
15:25:28.443 |V| ConfigFileService | FileSystemTrackerCommit:48 | Changed config file at path C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.editorconfig (NewPath)
15:25:28.449 |T| ConfigFileService | :1 | <AdditionalFiles> Flushing changes, added 8, removed 0
15:25:28.477 |T| ConfigFileService | :1 | <AdditionalFiles> Propagating changes of 8 files
15:25:28.490 |T| ConfigFileService | :1 | <AdditionalFiles> Firing changes
15:25:28.533 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.534 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.535 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.535 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.535 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.535 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.536 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.536 |W| | JetPool(S) #8:65 | The system cannot find the file specified.
15:25:28.565 |T| ConfigFileService | JetPool(S) #9:66 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format
15:25:28.565 |T| ConfigFileService | JetPool(S) #4:61 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format
15:25:28.569 |T| ConfigFileService | JetPool(S) #3:60 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.editorconfig
15:25:28.569 |T| ConfigFileService | JetPool(S) #5:62 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.editorconfig
15:25:28.569 |T| ConfigFileService | JetPool(S) #6:63 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format
15:25:28.570 |T| ConfigFileService | JetPool(S) #11:68 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format
15:25:28.617 |T| ConfigFileService | JetPool(S) #8:65 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop
15:25:28.617 |T| ConfigFileService | JetPool(S) #10:67 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop
15:25:28.622 |W| StyleCopSettingsService | JetPool(S) #8:65 | Root element is missing.

--- EXCEPTION #1/2 [XmlException]
Message = “Root element is missing.”
ExceptionPath = Root.InnerException
ClassName = System.Xml.XmlException
HResult = Xml=80131940
Source = System.Xml
res = Xml_MissingRoot
lineNumber = 0
linePosition = 0
version = 2.0
StackTraceString = “
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.ReadToFollowing(String name)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Root element is missing.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(FileSystemPath path, TextReader stream, Boolean details, Boolean convertSettings)
at JetBrains.ReSharper.Psi.impl.EditorConfig.ConfigFileCache.Build(IPsiSourceFile sourceFile, Boolean isStartup)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass15_0.<BuildSourceFile>b__0()
at JetBrains.Util.Logging.LoggerStructuredEx.DoCalculation[T](Nullable`1 logWithLevel, String key, String message, Func`1 action, Func`2 report)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.BuildSourceFile(IPsiSourceFile sourceFile, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass14_1.<ExecuteUpdate>b__1(IPsiSourceFile file, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass37_0`2.<WrappedJob>b__0()
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass35_0`2.<ExecuteWithPrerocessAndInterrupt>b__1(T x, TPreprocessResult y)
at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass5_1`2.<PreprocessSingleThreadedAndParallelize>b__1()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass36_0.<Create>b__1(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread #3.JetPool(S) #8(Action )
at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<>c__DisplayClass6_0.<.ctor>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

15:25:28.622 |W| StyleCopSettingsService | JetPool(S) #10:67 | Root element is missing.

--- EXCEPTION #1/2 [XmlException]
Message = “Root element is missing.”
ExceptionPath = Root.InnerException
ClassName = System.Xml.XmlException
HResult = Xml=80131940
Source = System.Xml
res = Xml_MissingRoot
lineNumber = 0
linePosition = 0
version = 2.0
StackTraceString = “
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.ReadToFollowing(String name)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Root element is missing.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(FileSystemPath path, TextReader stream, Boolean details, Boolean convertSettings)
at JetBrains.ReSharper.Psi.impl.EditorConfig.ConfigFileCache.Build(IPsiSourceFile sourceFile, Boolean isStartup)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass15_0.<BuildSourceFile>b__0()
at JetBrains.Util.Logging.LoggerStructuredEx.DoCalculation[T](Nullable`1 logWithLevel, String key, String message, Func`1 action, Func`2 report)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.BuildSourceFile(IPsiSourceFile sourceFile, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass14_1.<ExecuteUpdate>b__1(IPsiSourceFile file, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass37_0`2.<WrappedJob>b__0()
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass35_0`2.<ExecuteWithPrerocessAndInterrupt>b__1(T x, TPreprocessResult y)
at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass5_1`2.<PreprocessSingleThreadedAndParallelize>b__1()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass36_0.<Create>b__1(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread #A.JetPool(S) #10(Action )
at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<>c__DisplayClass6_0.<.ctor>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

15:25:28.715 |T| ConfigFileService | JetPool(S) #11:68 | <ConfigFileCache> Built a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format:, hash code 57006073
15:25:28.715 |T| ConfigFileService | JetPool(S) #6:63 | <ConfigFileCache> Built a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format:, hash code 31764059
15:25:28.717 |T| ConfigFileService | JetPool(S) #4:61 | <ConfigFileCache> Built a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format:, hash code 27213338
15:25:28.717 |T| ConfigFileService | JetPool(S) #9:66 | <ConfigFileCache> Built a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format:, hash code 31150131
15:25:28.731 |T| ConfigFileService | JetPool(S) #8:65 | <ConfigFileCache> Built a mount point for a section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop:, hash code 49630085
15:25:28.731 |T| ConfigFileService | JetPool(S) #10:67 | <ConfigFileCache> Built a mount point for a section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop:, hash code 3489773
15:25:29.096 |T| ConfigFileService | JetPool(S) #8:65 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop
15:25:29.096 |T| ConfigFileService | JetPool(S) #1:55 | Building for C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop
15:25:29.096 |W| StyleCopSettingsService | JetPool(S) #1:55 | Root element is missing.

--- EXCEPTION #1/2 [XmlException]
Message = “Root element is missing.”
ExceptionPath = Root.InnerException
ClassName = System.Xml.XmlException
HResult = Xml=80131940
Source = System.Xml
res = Xml_MissingRoot
lineNumber = 0
linePosition = 0
version = 2.0
StackTraceString = “
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.ReadToFollowing(String name)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Root element is missing.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(FileSystemPath path, TextReader stream, Boolean details, Boolean convertSettings)
at JetBrains.ReSharper.Psi.impl.EditorConfig.ConfigFileCache.Build(IPsiSourceFile sourceFile, Boolean isStartup)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass15_0.<BuildSourceFile>b__0()
at JetBrains.Util.Logging.LoggerStructuredEx.DoCalculation[T](Nullable`1 logWithLevel, String key, String message, Func`1 action, Func`2 report)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.BuildSourceFile(IPsiSourceFile sourceFile, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass14_1.<ExecuteUpdate>b__1(IPsiSourceFile file, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass37_0`2.<WrappedJob>b__0()
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass35_0`2.<ExecuteWithPrerocessAndInterrupt>b__1(T x, TPreprocessResult y)
at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass5_1`2.<PreprocessSingleThreadedAndParallelize>b__1()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass36_0.<Create>b__1(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread #7.JetPool(S) #1(Action )
at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<>c__DisplayClass6_0.<.ctor>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

15:25:29.096 |W| StyleCopSettingsService | JetPool(S) #8:65 | Root element is missing.

--- EXCEPTION #1/2 [XmlException]
Message = “Root element is missing.”
ExceptionPath = Root.InnerException
ClassName = System.Xml.XmlException
HResult = Xml=80131940
Source = System.Xml
res = Xml_MissingRoot
lineNumber = 0
linePosition = 0
version = 2.0
StackTraceString = “
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.ReadToFollowing(String name)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Root element is missing.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(TextReader stream, FileSystemPath path)
at JetBrains.ReSharper.Daemon.CSharp.EditorConfig.StyleCopSettingsService.ParseFile(FileSystemPath path, TextReader stream, Boolean details, Boolean convertSettings)
at JetBrains.ReSharper.Psi.impl.EditorConfig.ConfigFileCache.Build(IPsiSourceFile sourceFile, Boolean isStartup)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass15_0.<BuildSourceFile>b__0()
at JetBrains.Util.Logging.LoggerStructuredEx.DoCalculation[T](Nullable`1 logWithLevel, String key, String message, Func`1 action, Func`2 report)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.BuildSourceFile(IPsiSourceFile sourceFile, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.JobUpdateProjectFiles.<>c__DisplayClass14_1.<ExecuteUpdate>b__1(IPsiSourceFile file, IDocument doc)
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass37_0`2.<WrappedJob>b__0()
at JetBrains.ReSharper.Psi.Caches.Jobs.CacheJobService2.<>c__DisplayClass35_0`2.<ExecuteWithPrerocessAndInterrupt>b__1(T x, TPreprocessResult y)
at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass5_1`2.<PreprocessSingleThreadedAndParallelize>b__1()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass36_0.<Create>b__1(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread #3.JetPool(S) #8(Action )
at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<>c__DisplayClass6_0.<.ctor>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

15:25:29.098 |T| ConfigFileService | JetPool(S) #8:65 | <ConfigFileCache> Built a mount point for a section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop:, hash code 29460844
15:25:29.098 |T| ConfigFileService | JetPool(S) #1:55 | <ConfigFileCache> Built a mount point for a section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop:, hash code 21979052
15:25:29.156 |W| | :1 | The system cannot find the file specified.
15:25:29.159 |W| | :1 | The system cannot find the file specified.
15:25:29.160 |T| ConfigFileService | :1 | Writing section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format:
15:25:29.164 |T| ConfigFileService | :1 | Written 100 settings from config file
15:25:29.164 |V| ConfigFileService | :1 | [SettingsStorage(Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format:)/Core] Save completed OK.
15:25:29.166 |T| ConfigFileService | :1 | <ConfigFileCache> Preparing to merge a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\_clang-format:, hash code 31764059
15:25:29.166 |W| | :1 | The system cannot find the file specified.
15:25:29.166 |T| ConfigFileService | :1 | Writing section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format:
15:25:29.166 |T| ConfigFileService | :1 | Written 100 settings from config file
15:25:29.166 |V| ConfigFileService | :1 | [SettingsStorage(Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format:)/Core] Save completed OK.
15:25:29.166 |T| ConfigFileService | :1 | <ConfigFileCache> Preparing to merge a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\_clang-format:, hash code 57006073
15:25:29.167 |W| | :1 | The system cannot find the file specified.
15:25:29.167 |T| ConfigFileService | :1 | Writing section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format:
15:25:29.167 |T| ConfigFileService | :1 | Written 100 settings from config file
15:25:29.167 |V| ConfigFileService | :1 | [SettingsStorage(Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format:)/Core] Save completed OK.
15:25:29.167 |T| ConfigFileService | :1 | <ConfigFileCache> Preparing to merge a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\.clang-format:, hash code 27213338
15:25:29.167 |W| | :1 | The system cannot find the file specified.
15:25:29.167 |T| ConfigFileService | :1 | Writing section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format:
15:25:29.167 |T| ConfigFileService | :1 | Written 100 settings from config file
15:25:29.167 |V| ConfigFileService | :1 | [SettingsStorage(Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format:)/Core] Save completed OK.
15:25:29.167 |T| ConfigFileService | :1 | <ConfigFileCache> Preparing to merge a mount point for a section Clang-Format:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\.clang-format:, hash code 31150131
15:25:29.167 |W| | :1 | The system cannot find the file specified.
15:25:29.170 |T| ConfigFileService | :1 | Writing section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop:
15:25:29.171 |T| ConfigFileService | :1 | Written 212 settings from config file
15:25:29.171 |V| ConfigFileService | :1 | [SettingsStorage(StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop:)/Core] Save completed OK.
15:25:29.171 |T| ConfigFileService | :1 | <ConfigFileCache> Preparing to merge a mount point for a section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Settings.StyleCop:, hash code 29460844
15:25:29.172 |T| ConfigFileService | :1 | Writing section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop:
15:25:29.173 |T| ConfigFileService | :1 | Written 212 settings from config file
15:25:29.173 |V| ConfigFileService | :1 | [SettingsStorage(StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop:)/Core] Save completed OK.
15:25:29.173 |T| ConfigFileService | :1 | <ConfigFileCache> Preparing to merge a mount point for a section StyleCop:C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\AllPrj\Settings.StyleCop:, hash code 21979052
15:25:29.174 |T| ConfigFileService | :1 | <ConfigFileCache> Adding a mount point after build, file type Clang-Format, mount tree hash code 48965666, mount point hash code 31764059, enabled True
15:25:29.179 |T| ConfigFileService | :1 | <ConfigFileCache> Adding a mount point after build, file type Clang-Format, mount tree hash code 48965666, mount point hash code 57006073, enabled True
15:25:29.179 |T| ConfigFileService | :1 | <ConfigFileCache> Adding a mount point after build, file type Clang-Format, mount tree hash code 48965666, mount point hash code 27213338, enabled True
15:25:29.179 |T| ConfigFileService | :1 | <ConfigFileCache> Adding a mount point after build, file type Clang-Format, mount tree hash code 48965666, mount point hash code 31150131, enabled True
15:25:29.179 |T| ConfigFileService | :1 | <ConfigFileCache> Adding a mount point after build, file type StyleCop, mount tree hash code 62218970, mount point hash code 29460844, enabled False
15:25:29.179 |T| ConfigFileService | :1 | <ConfigFileCache> Adding a mount point after build, file type StyleCop, mount tree hash code 62218970, mount point hash code 21979052, enabled False
15:26:52.979 |I| RdActions | :1 | Started 'CurrentConfigDebug' action at 1 time.
15:26:52.982 |I| RdActions | :1 | 'CurrentConfigDebug' Action execution failed. Action 'CurrentConfigDebug' isn't available
15:36:55.564 |I| RdActions | :1 | Started 'GotoFile' action at 1 time.
15:36:55.904 |I| RdActions | :1 | 'GotoFile' Action execution was done. True
15:36:55.905 |I| RdActions | :1 | 'GotoFile' Action execution session is terminated (by frontend possibly).
15:36:55.937 |I| | JetPool(S) #1:55 | [Goto] IsSpecialString, consuming emptylist ''
15:37:01.367 |T| FormatterImplHelper | :1 | GetFormatterSettingsLive for <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:15.445 |I| RdActions | :1 | Started 'ShowOptions' action at 1 time.
15:37:15.454 |I| RdActions | :1 | 'ShowOptions' Action execution was done. True
15:37:15.454 |I| RdActions | :1 | 'ShowOptions' Action execution session is terminated (by frontend possibly).
15:37:15.787 |V| DocumentLineEndingsDetector | JetPool(L) #5:73 | Autodetected and saved line ending CRLF C:\work\buildit_2021\BuildIT_BITS-9437_askforoffset\Build_It\build_IT\ImportExport\AskForOffsetDialog.cpp
15:37:15.795 |T| FormatterImplHelper | JetPool(L) #5:73 | Indent from settings CppFormattingSettingsKey 2 Space for file <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:47.234 |T| FormatterImplHelper | JetPool(S) #1:55 | Indent from settings CppFormatting 2 Space for file <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:47.538 |T| FormatterImplHelper | JetPool(S) #1:55 | Indent from settings CppFormatting 2 Space for file <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:49.361 |T| FormatterImplHelper | JetPool(S) #1:55 | Indent from settings CppFormatting 2 Space for file <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:51.055 |T| FormatterImplHelper | JetPool(S) #1:55 | Indent from settings CppFormatting 2 Space for file <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:52.440 |T| FormatterImplHelper | JetPool(S) #8:65 | Indent from settings CppFormatting 2 Space for file <build_it>\ImportExport\AskForOffsetDialog.cpp
15:37:52.478 |T| FormatterImplHelper | JetPool(S) #8:65 | Indent from settings CppFormattingSettingsKey 2 Space for file
15:37:52.516 |T| FormatterImplHelper | JetPool(S) #8:65 | Indent from settings CppFormattingSettingsKey 2 Space for file
15:37:52.520 |T| FormatterImplHelper | JetPool(S) #8:65 | Indent from settings CppFormattingSettingsKey 2 Space for file
15:37:52.520 |T| FormatterImplHelper | JetPool(S) #8:65 | Indent from settings CppFormattingSettingsKey 2 Space for file
15:37:54.180 |W| RunningDocuments | :1 | Unlocking document 1 by 00000052 which is not locked by it
15:37:55.439 |I| VsSolutionManager15 | :1 | VSSolutionManager::OnBeforeCloseSolution 61125795
15:37:55.439 |I| VsSolutionManager15 | :1 | VSSolutionManager::CloseSolutionInstance 61125795
15:37:55.526 |T| ConfigFileService | :1 | <ConfigFileCache> Removing a mount point on solution closing, file type Clang-Format, mount tree hash code 48965666, mount point hash code 31764059
15:37:55.528 |T| ConfigFileService | :1 | <ConfigFileCache> Removing a mount point on solution closing, file type Clang-Format, mount tree hash code 48965666, mount point hash code 57006073
15:37:55.528 |T| ConfigFileService | :1 | <ConfigFileCache> Removing a mount point on solution closing, file type Clang-Format, mount tree hash code 48965666, mount point hash code 27213338
15:37:55.529 |T| ConfigFileService | :1 | <ConfigFileCache> Removing a mount point on solution closing, file type Clang-Format, mount tree hash code 48965666, mount point hash code 31150131
15:37:56.441 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: terminated 61125795
15:37:58.745 |I| AddVsVersionToLogs | :1 | JetBrains ReSharper 2020.2.1 Build 202.0.20200820.125348
15:37:58.745 |I| AddVsVersionToLogs | :1 | Running under Visual Studio Professional 2019 version 16.4.29806.167, Hive: 16.0_adbfc980
15:37:59.416 |I| VsPackage | :1 | VS Package Unloaded


================

0
Comment actions Permalink

From log I found out that solution has a subproject which uses javascript and it has .editorconfig. its not part of the C++ solution, but for some reason re# found it. that file has indentation of 2

indent_size=2

after Re# tried to crawl that file, it changes default to 2. Shouldn't it use formatting rules from the parent directories, not from sibling?

Log has all file names, so I would prefer not to post it her, if it's not required. May be Maximilien`s log is enough?

0
Comment actions Permalink

Thanks guys, I've created an issue to track this problem and saved your feedback there - https://youtrack.jetbrains.com/issue/RSCPP-31290. We're not sure when ReSharper might pick up incorrect .clang-format/.editorconfig yet, will try to investigate and reproduce.

0

Please sign in to leave a comment.