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.

The CoreRT compiler fails with a StackOverflowException

See original GitHub issue

From dotnet/corert#6372 by @frankzye.


I came an error:

Unhandled Exception: System.InvalidOperationException: A suitable constructor for type ‘Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategyFactory’ could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.

So I added the following lines to RD.xml:

<Assembly Name="Npgsql.EntityFrameworkCore.PostgreSQL">
  <Type Name="Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategyFactory" Dynamic="Required All"/>
</Assembly>

But when I compile, it throw an error “Process is terminating due to StackOverflowException”, microsoft.dotnet.ilcompiler\1.0.0-alpha-26919-01\build\Microsoft.NETCore.Native.targets(200,5): error MSB3073 xxx runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-26919-01\tools\ilc" @"obj\release\netcoreapp2.1\win-x64\native\DataExplorer.ilc.rsp exit.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
austindrenskicommented, Oct 29, 2018

So it seems like whatever is triggering this is happening within Database.Migrate(). But commenting out that line reveals a whole sequence of additional EF Core metadata issues.

Thankfully, it looks like some serious legwork has been done in dotnet/corert#6477 by @rubin55 and @MichalStrehovsky to document these issues. I’m working my way though those now before debugging the issue in the migrations code.

2reactions
MichalStrehovskycommented, Nov 14, 2018

@rubin55 got EF core working in dotnet/corert#6477. It’s about finding all the places where EF uses reflection.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The CoreRT compiler fails with a StackOverflowException
From dotnet/corert#6372 by @frankzye. I came an error: Unhandled Exception: System.InvalidOperationException: A suitable constructor for type 'Npgsql.
Read more >
StackOverflowException on build in VS2017/2019
I have a test project that built successfully in VS2015, but the build fails due to a StackOverflowException when I attempt to build...
Read more >
Weirdest way to produce a stack overflow [closed]
It actually fails with a StackOverflowError. The exception in the constructor is just a red herring. This is what the book has to...
Read more >
Debugging StackOverflow errors
A StackOverflowException is thrown when the execution stack overflows because it contains too many nested method calls.
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 >

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