question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fsc.exe fails with StackOverflowException on a big file.

See original GitHub issue

I have a project which fails to compile with this output in VS:

error MSB6006: "fsc.exe" exited with code -1073741571.

When I compile from command line:

"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe" -o:obj\Debug\myassembly.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:..\..\..\..\bin\Debug\myassembly.XML --optimize- --tailcalls- -r:C:\work\gitsvnclone\packages\FSharp.Core\lib\net40\FSharp.Core.dll -r:C:\work\gitsvnclone\packages\FSharp.Data.SqlClient\lib\net40\FSharp.Data.SqlClient.dll -r:C:\work\gitsvnclone\UPLAN\Lib\lcg.Shared\lcg.Common.FrameworkExtensions.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" --target:library --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- --sqmsessionguid:be8a0043-8b0f-4af0-ab48-a438b86f0a63 --keyfile:"../../../../Tools/Signing/uplan_signing.snk" "C:\Users\gauthier.segay\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" all the .fs files

I get this:

Microsoft (R) F# Compiler version 14.0.23413.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

Process is terminated due to StackOverflowException.

There is a big file (8k lines) with a lots of static declarations in the project.

Is there anyway I can investigate the stack trace before it fails?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:30 (26 by maintainers)

github_iconTop GitHub Comments

2reactions
abelbraaksmacommented, Aug 27, 2017

Since nobody seems to have confirmed this (I read “I believe” not as a confirmation that it is definitely fixed), I tried the zipped repro with F# 4.0 and F# 4.1, with .NET 4.5.2 and .NET 4.7 in VS2017 RTM and VS2017 latest previews and F# nightlies. Conclusion:

Works like a charm🥇!

0reactions
dsymecommented, Aug 29, 2017

@abelbraaksma Thanks for checking

Read more comments on GitHub >

github_iconTop Results From Across the Web

64 bit F# / FSI: Limitation of very large single file function
Now, the ALGLIB ODE solver is perfectly capable of handling at least 1M variables for a simple input function. I've tested that and...
Read more >
c# - StackOverflowException on initialising large list
A StackOverflowException is caused not just by the number of calls on the stack, but the overall size of each method's allocation of...
Read more >
The Case of The Failed Demo – StackOverflowException on x64 ...
it turns out when the 64-bit jit is involved, i.e. when the anycpu platform target is set – the default on the csc.exe...
Read more >
StackOverflowException Class (System)
The exception that is thrown when the execution stack exceeds the stack size. This class cannot be inherited.
Read more >
FIX: Stack overflow exception when you register an Active ...
This article describes an issue is which a stack overflow exception occurs when you register an Active Template Library (ATL) COM dynamically linked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found