Autofac: Stack overflow exception with Autofac 5.1.1 and circular dependencies

Created on 16 Feb 2020  路  3Comments  路  Source: autofac/Autofac

After the upgrade to 5.1.1 version, all our solutions have started to crash due to the stack overflow, leaving us with no possibility to capture exception or the cause of it.

We have managed to isolate the behavior in the following repository:
https://github.com/App-Impact-Labs/ISSUE-AutofacStackoverflowException

The code sample above has coupling between 3 classes/interfaces, with circular dependencies.

The solution will crash instantly with Autofac 5.1.0. / 5.1.1.

If you downgrade Autofac to 5.0.0. the solution will start and return response.

Have there been any breaking changes regarding the registration of circular dependencies?

bug

Most helpful comment

@atuzovic I have pushed a 5.1.2 package with the fix to NuGet.

All 3 comments

The issue is caused by d485f39 which was fixing a decorator related issue. I am going to send a fix through CI now.

@atuzovic I have pushed a 5.1.2 package with the fix to NuGet.

Thanks @alexmg for quick intervention, we can confirm that everything is working properly now!

Was this page helpful?
0 / 5 - 0 ratings