New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fsc.exe fails with StackOverflowException on a big file. #851
Comments
Compiling the same project in release works. |
@xenocons mentionned that disabling XML documentation generation could help (There are lots of modules, some are nested a bit since F# does'nt allow inner type definition). I haven't figured yet if it's the reason for this error but it's worth a look. |
This issue may be related to my previously reported issue where I demonstrate that a |
@abelbraaksma, thanks for the pointer, here is what the code looks like: // elided, see the reproduce zip file attached in later comment there are about 400 |
@smoothdeveloper, is it possible to upload a ZIP file with a sln that contains all those "thousands of lines"? Generally, a bug cannot be considered a bug here until there is a repro. A difference with my issue is, btw, that mine will crash regardless of chosen build, I am curious why yours only crashes on debug build. |
Closing until a repro is provided per CONTRIBUTING.md |
@dsyme I just sent you a reproduce project in a mail, I hope this will help the team to investigate the issue. |
Reproduce case for everyone to look |
I can confirm that it indeed fails to compile in Debug build with a The following repro always works:
The part of the build log that is perhaps of interest is:
Full build log (diagnostics): buildlog#851-diagnostics.txt @dsyme: I think you can reopen the bug (or the OP can?), it seems a genuine bug to me. Still not sure though whether it has the same cause as #779. |
@abelbraaksma on the second compile, the .dll is there but it is invalid as far as I can tell from looking at it in ILSpy. Thanks for laying out the more accurate details for reproducing the issue. |
@smoothdeveloper, that's possible (and odd, I wonder what the compiler "thinks" here), I didn't check that deeply and didn't try to load or run the Release or Debug versions. |
@dsyme can we get the bug set to open again? |
@abelbraaksma @smoothdeveloper I can't repro this with the ZIP linked here: #851 (comment) I opened the solution in Visual Studio 2015, compiled it in Debug, and it compiled OK. The generated DLL also passes PEVERIFY I'll close this as no repro for now - if you have updated repro details please let me know. |
@dsyme I'm still getting same error, I extracted the zip, open the .sln with VS2015 and compiled in DEBUG
Could it be related to my OS (windows 7 pro 64bit)? |
I can confirm the build failure using Debug/Rebuild on |
I'm having the same problem when trying to compile Fable.Core on Windows. It was working on Mono. Also, the problem only happens in Debug config, it works on Release (though I've not checked yet if the assembly is actually valid or not. Windows 10 64 bit
|
I've been trying to change the compile options one by one to match the Release configuration and at the end setting <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>true</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants />
<WarningLevel>3</WarningLevel>
<PlatformTarget />
<Prefer32Bit />
<OtherFlags />
</PropertyGroup> If I set Hope this helps! |
When I attach the debugger I see this: @dsyme Might a Dump or Minidump file help? I could upload one if it would help.
|
@matthid A few different things might have affected this. In any case reopening, we should be able to repro this somehow. |
Has this been fixed with 6bbea65? Because I can only compile WinPerfCounters in release mode; or otherwise the compiler crashes. Repro: download Logary, compile on Windows in Release mode - fine, in Debug mode - compiler crash. |
@KevinRansom proposed a different fix but IIRC it's not yet merged. |
Note that in this commit in that pull request, I make WinPerfCounters always compile in release mode. So you'll have to ensure that commit is not present when/if you get around to reproducing this issue (e.g. by checking out an earlier version). |
Assigning to @KevinRansom |
Let me check on Windows next monday, but it's definitely the default that comes with VS2015 with latest updates. |
I believe this was fixed witht he .pdb fix. |
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🥇! |
@abelbraaksma Thanks for checking |
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:
I get this:
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?
The text was updated successfully, but these errors were encountered: