Compiler has returned exit code -532462766

This forum is meant for questions and discussions about the X# language and tools
Fab64
Posts: 63
Joined: Mon Nov 23, 2015 12:26 pm

Compiler has returned exit code -532462766

Post by Fab64 »

Hi all,

What does it mean?

Fabrizio
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Compiler has returned exit code -532462766

Post by robert »

Fabrizio,
This indicates a non recoverable error in the compiler.
Do you see any error messages on the log screen in XIDE or the Build Log in Visual Studio ?

Otherwise, can you zip your code and send it to us for inspection ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am

Compiler has returned exit code -532462766

Post by Karl-Heinz »

i know this error number, but only in conjunction with a *public* build. A "-532462766" forum search shows the thread "2.0.0.4 build fails without error"
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler has returned exit code -532462766

Post by Chris »

Fabrizio, Robert means the "Output" window if you're using XIDE, this should contain an error info and a callstack (for the compiler source).

Karl-Heinz, this is an internal crash (exception) in the compiler code, so the same result can be shown for different reasons. They are very rare now, but apparently Fabrizio has found a case that we were not aware of.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Fab64
Posts: 63
Joined: Mon Nov 23, 2015 12:26 pm

Compiler has returned exit code -532462766

Post by Fab64 »

Hi, Robert, Karl, Chris,

I'm trying to compile an old program in VO by converting it to Xsharp + only Xsharp runtime.
I am using the latest version of Xsharp and XIDE.

The Output of XIDE after compiling is:

X# Compiler version 2.0.0.8 (Release)
Copyright (C) XSharp BV



Eccezione non gestita: System.AggregateException: Si sono verificati uno o più errori. ---> System.FormatException: Formato della stringa di input non corretto.
in System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
in System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
in LanguageService.CodeAnalysis.XSharp.Syntax.InternalSyntax.XSharpVOTreeTransformation.EncodeDefaultParameter(ExpressionContext initexpr)
in LanguageService.CodeAnalysis.XSharp.Syntax.InternalSyntax.XSharpVOTreeTransformation.ExitParameter(ParameterContext context)
in LanguageService.CodeAnalysis.XSharp.SyntaxParser.XSharpParser.ParameterContext.ExitRule(IParseTreeListener listener)
in LanguageService.SyntaxTree.Tree.ParseTreeWalker.ExitRule(IParseTreeListener listener, IRuleNode r)
in LanguageService.SyntaxTree.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
in LanguageService.CodeAnalysis.XSharp.Syntax.InternalSyntax.XSharpLanguageParser.ParseCompilationUnitCore()
in LanguageService.CodeAnalysis.XSharp.Syntax.InternalSyntax.XSharpLanguageParser.ParseWithStackGuard[TNode](Func`1 parseFunc, Func`1 createEmptyNodeFunc)
in LanguageService.CodeAnalysis.XSharp.XSharpSyntaxTree.ParseText(SourceText text, XSharpParseOptions options, String path, CancellationToken cancellationToken)
in LanguageService.CodeAnalysis.XSharp.XSharpCompiler.ParseFile(XSharpParseOptions parseOptions, XSharpParseOptions scriptParseOptions, SourceText content, CommandLineSourceFile file)
in LanguageService.CodeAnalysis.XSharp.XSharpCompiler.ParseFile(XSharpParseOptions parseOptions, XSharpParseOptions scriptParseOptions, Boolean& addedDiagnostics, CommandLineSourceFile file, DiagnosticBag diagnostics, String& normalizedFilePath)
in LanguageService.CodeAnalysis.XSharp.XSharpCompiler.<>c__DisplayClass8_0.<CreateCompilation>b__0(Int32 i)
in Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param)
in System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
in System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
in System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- Fine della traccia dello stack dell'eccezione interna ---
in System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
in System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
in System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
in System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
in LanguageService.CodeAnalysis.XSharp.XSharpCompiler.CreateCompilation(TextWriter consoleOutput, TouchedFileLogger touchedFilesLogger, ErrorLogger errorLogger)
in LanguageService.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken)
in LanguageService.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken)
in LanguageService.CodeAnalysis.XSharp.CommandLine.Xsc.<>c__DisplayClass1_0.<Run>b__0(TextWriter tw) in C:XSharpDevXSharpsrcCompilerxscXsc.cs:riga 58
in LanguageService.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T](Func`2 func) in C:XSharpDevRoslynSrcCompilersCoreCommandLineConsoleUtil.cs:riga 24
in LanguageService.CodeAnalysis.XSharp.CommandLine.Xsc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) in C:XSharpDevXSharpsrcCompilerxscXsc.cs:riga 58
in LanguageService.CodeAnalysis.CommandLine.DesktopBuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter) in C:XSharpDevRoslynSrcCompilersSharedDesktopBuildClient.cs:riga 50
in LanguageService.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter) in C:XSharpDevRoslynSrcCompilersSharedBuildClient.cs:riga 113
in LanguageService.CodeAnalysis.CommandLine.DesktopBuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, IAnalyzerAssemblyLoader analyzerAssemblyLoader) in C:XSharpDevRoslynSrcCompilersSharedDesktopBuildClient.cs:riga 31
in LanguageService.CodeAnalysis.XSharp.CommandLine.Program.Main(String[] args) in C:XSharpDevXSharpsrcCompilerxscProgram.cs:riga 28


Fabrizio
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler has returned exit code -532462766

Post by Chris »

Hi Fabrizio,

Thanks, that callstack was helpful, the problem has to do with negative default parameters in methods or functions. Somewhere in your code you must have something like

FUNCTION Test(n := -123L AS INT) AS INT
RETURN 0

this is what causes the problem to the compiler. If you find it and remove the "L" (or it could be a "U") postfix from the number, then the compiler problem should go away.

I will log this with a repro sample for Robert to fix this in the compiler.

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Fab64
Posts: 63
Joined: Mon Nov 23, 2015 12:26 pm

Compiler has returned exit code -532462766

Post by Fab64 »

Hi, Chris,

that's it.
the function that causes the error I found it:
FUNCTION QuickSort7 (aArray AS ARRAY, liF: = 1L AS LONGINT, liL: = -9999L AS LONGINT, liw: = 15 AS LONGINT) AS ARRAY PASCAL.

it was enough to remove the sign - in the 3rd parameter and recompile; now the new report is as follows:

ERROR:
........
Compilation failed (15 errors)

Output:

X # Compiler version 2.0.0.8 (Release)
Copyright (C) XSharp BV

C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (42.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (47.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (52.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (59.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (64.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (69.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (76.2): ​​error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (81.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (86.2): ​​error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (93.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (98.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (103.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (110.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (115.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '
C: XIDE Projects Project1 Applications XSharpRuntimeApp1 Prg Start.prg (120.2): error XS0121: The call is ambiguous between the following methods or properties: 'System.Console.WriteLine (logic)' and ' System.Console.WriteLine (int) '

Now I can proceed by fixing the errors

Thank you Chris and Robert

Fabrizio
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler has returned exit code -532462766

Post by Chris »

Fabrizio,

That's great! If you want, you can keep the negative value, just specify it as -9999, not -9999L.

I also see why you get the other error, I guess you have some code like

Console.WriteLine(uSomeUsual)

(could be implicitly generated as well, if you are using such a preprocessor directive). Probably this must be considered a compiler bug as well, but there's an easy solution for now, just use AsString() on the usual before passing it to Writeline():

Console.WriteLine(AsString(uSomeUsual))

hth
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Fab64
Posts: 63
Joined: Mon Nov 23, 2015 12:26 pm

Compiler has returned exit code -532462766

Post by Fab64 »

Hi Chris,

yes the code is

...............
OC := Crono{}
System.Console.WriteLine("QuickSort7-5")
A4 := AClone(A1)
OC:Setting()
QuickSort7(A4,1,300000,5)
System.Console.WriteLine(OC:Lap())
..........................

Where OC:Lap is defined like

METHOD Lap()
LOCAL dwTickEnd,dwLap,dwWork,dwWork2 AS DWORD
LOCAL cLap AS STRING

.............................

RETURN clap

I modified the code as you suggested and now it's ok

Fabrizio
FFF
Posts: 1521
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Compiler has returned exit code -532462766

Post by FFF »

METHOD Lap()
LOCAL dwTickEnd,dwLap,dwWork,dwWork2 AS DWORD
LOCAL cLap AS STRING
...
RETURN clap
Any reason not to modify this to
Method Lap() AS STRING
....
?

Karl
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
Post Reply