Comments (10)
The build system generates a file in the temp folder, in a subfolder MsBuildTemp<UserName>
. The file is called LastXSharpResponseFile.Rsp ,
Copy this file to the folder where your project is located.
Then open a command project and navigate to that folder.
Then call xsc @LastXSharpResponseFile.Rsp
All errors will be listed to stdout. So you can redirect the output with >compiler.log
and send me the log file.
from xsharppublic.
Here is the compiler.log but i doubt it will help you:
compiler.log
here is the ouput of xsc:
>xsc @LastXSharpResponseFile.Rsp > compiler.log
Unhandled Exception: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at LanguageService.CodeAnalysis.DiagnosticInfo.GetMessage(IFormatProvider formatProvider)
at LanguageService.CodeAnalysis.DiagnosticFormatter.Format(Diagnostic diagnostic, IFormatProvider formatter)
at LanguageService.CodeAnalysis.CommonCompiler.PrintError(Diagnostic diagnostic, TextWriter consoleOutput)
at LanguageService.CodeAnalysis.CommonCompiler.<ReportDiagnostics>g__reportDiagnostic|53_0(Diagnostic diag, SuppressionInfo suppressionInfo, <>c__DisplayClass53_0& )
at LanguageService.CodeAnalysis.CommonCompiler.ReportDiagnostics(IEnumerable`1 diagnostics, TextWriter consoleOutput, ErrorLogger errorLoggerOpt, Compilation compilation)
at LanguageService.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken)
at LanguageService.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken)
at LanguageService.CodeAnalysis.XSharp.CommandLine.Xsc.<>c__DisplayClass1_0.<Run>b__0(TextWriter tw) in E:\XSharp\Dev\src\Compiler\src\Compiler\xsc\Xsc.cs:line 54
at LanguageService.CodeAnalysis.XSharp.CommandLine.Xsc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) in E:\XSharp\Dev\src\Compiler\src\Compiler\xsc\Xsc.cs:line 56
at LanguageService.CodeAnalysis.CommandLine.BuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter) in E:\XSharp\Dev\src\Roslyn\Src\Compilers\Shared\BuildClient.cs:line 213
at LanguageService.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter, String pipeName) in E:\XSharp\Dev\src\Roslyn\Src\Compilers\Shared\BuildClient.cs:line 154
at LanguageService.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, ICompilerServerLogger logger) in E:\XSharp\Dev\src\Roslyn\Src\Compilers\Shared\BuildClient.cs:line 98 at LanguageService.CodeAnalysis.XSharp.CommandLine.Program.MainCore(String[] args) in E:\XSharp\Dev\src\Compiler\src\Compiler\xsc\Program.cs:line 37
at LanguageService.CodeAnalysis.XSharp.CommandLine.Program.Main(String[] args) in E:\XSharp\Dev\src\Compiler\src\Compiler\xsc\Program.cs:line 19
from xsharppublic.
Basile,
This does help: it tells us that one of our error messages is either incorrectly formatted, or the GetMessage() call was called with not enough parameters. Of course that still does not tell us where the error is.
What you can do (if you want to help) is this:
- Start a new copy of VS
- Call the program like in the previous message, but add the command line option /shared
- That should start the background compiler (XSCompiler.exe)
- Inside VS Attach the Debugger to the XSCompiler.exe process
- Goto the Window Debugger/Windows/Exception settings and Clear the checkbox in front of Common Language Runtime Exceptions
- In the search box on the top type System.FormatException. That should show one exception. Tick the checkbox in front of the exception
- Restart the compiler (when it has stopped running)
- Now the debugger should stop when the exception occurs. Most likely, you can walk the call stack and see the error message that needs more parameters than are passed. Please send me that message (or the value of _errorCode) and the arguments (these are in the _arguments field of the DiagnosticInfo object)
from xsharppublic.
Hi Robert, of course I'm willing to help :)
While I'm navigating in the stack trace it asks for the source but it seems I'm not on the right commit as it tells me the source differs from the breakpoint.
How do I know which commit to point to? there are two 2.19.0.2 "tags" :
from xsharppublic.
Basile,
You need the commit a205063 from 22/1/2024
However, you really do not need the source for this. Simply let it run and then inspect the callstack window and the locals window.
If you still want to use the source, then please in the Debugger Options remove the checkbox "Require the source files to exactly match the original version". We do some dirty tricks when building the compiler and when this option is enabled then you can not see the source.
from xsharppublic.
ok, but it seems I can't inspect the locals when walking the stack :
from xsharppublic.
Ok, then you need to send me the project folder and its dependencies.
from xsharppublic.
Hi Robert,
but swapping the XSharp.CodeAnalysis.dll in the GAC with the debug one from Xsharp installation folder I managed to get access to the local vars and immediate execution.
From what I follow in the callstack it seems to come from here :
GetArgumentToUse only returns 1 var where the message format has 2 placeholders..
Let me know if you need more or other data !
from xsharppublic.
This is perfect. I think you have a constructor call for a typed array (something like BYTE[]{ someparameters}
) with named parameters. We are creating an incorrect error message there.
Is this possible?
from xsharppublic.
I do not have a repro sample for this, so will let Basile confirm it.
from xsharppublic.
Related Issues (20)
- Implement GoToBrace action in the VS editor HOT 1
- SQLExec returns -1 even when success
- [VFP dialect] Compatibility: Add an IN clause to the USE command HOT 1
- [Documentation] Add a syntax description of USE commands for VFP dialects. HOT 1
- Collection Class doesn't increase the Count property when adds an item.
- [VFP] Problem with APPEND FROM FOR command HOT 2
- [VFP] Problem with COPY TO ARRAY / DbCopyToArray() with fields of type "G"
- [VFP] Misleading line number reported in compiler error about requiring the /memvar option HOT 1
- [VFP] cannot use the arr[ind1][ind2] syntax to access array members in VFP dialect HOT 3
- [VFP] COPY STRUCTURE FIELDS not recognized
- [VFP] SCATTER/GATHER MEMVAR MEMO not recognized HOT 4
- [VFP] Problems with the INDEX ON command HOT 6
- [VFP] SCATTER/GATHER problem with FIELDS LIKE clause
- [VFP] Missing functions in the runtime
- [VFP] Problem with CURSOR HOT 5
- VS-Integration - Indentation
- FieldPut in a table without data records - Error 5068: There is no current data record, but no exception in VO. HOT 6
- Some issues with indexed PROPERTY SET and ASSIGN HOT 2
- No warning about missing RETURN value in the VO dialect
- Format document no longer working in VS 2022 17.11.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsharppublic.