## Schlüsselwortarchiv

Du betrachtest das Archiv des Tags Bug.

• ## „Compiler crashed with code 1“ on Mono

Update:
I opened a bug ticket for the described issue and it got fixed within the week.

Original post:
At work we recently stumbled across an interesting problem: While compilation of our C# 6 code base would work fine on Windows, a guy that works on OSX using Xamarin Studio suddenly was unable to compile the code, because „Error: Compiler crashed with code 1“. No line number, no nothing, only that.

After a run through git bisect we eventually were able to track down the commit where I found the error to lie within an await happening in a string interpolation. Sadly, this problem was introduced by simply (and automatically) refactoring all occurrences of String.Format() in the file.

I was able to reproduce the problem with the following simple code:

private async Task<int> Foo()
{
return 42;
}

{
Console.WriteLine($"Something {await Foo()}"); }  Apparently, the mono compiler doesn’t like that too much. The solution to this is simple: Don’t await within the interpolated string. Instead, do it outside: private async Task Bar() { var foo = await Foo(); Console.WriteLine($"Something {foo}");
}


And that’s that.

• ## Xilinx SDK: make crashing with Interrupt/Exception

After exporting the implemented and generated project from PlanAhead to Xilinx SDK and having generated a Board Support Package, the build stops with an error due to make crashing with a rather dubious message along the lines of

make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)


It turned out that this is due to an existing installation of Git, when the Git directory is added to the path. Specifically, sh.exe is the problem here and simply removing that from (or renaming it in) the Git installation directory solves the problem.