Skip to content
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

StackOverflowException with InversePropertyAttribute on 1.1.0 #7057

Closed
rowanmiller opened this issue Nov 18, 2016 · 6 comments
Closed

StackOverflowException with InversePropertyAttribute on 1.1.0 #7057

rowanmiller opened this issue Nov 18, 2016 · 6 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@rowanmiller
Copy link
Contributor

Reported over email...

I build a taxi service app with backend on ASP.NET Core.
In order to use latest SignalR I switched all package references to 1.2.0-* as it is defined in a SignalR repository. But as I try to perform any request to a database I receive StackOverflowException

I have the repro project for this (it couldn't be shared publically), so I can give it to whoever investigates.

Attaching stack trace as it is too big to add inline StackTrace.txt

@xperiandri
Copy link

xperiandri commented Nov 18, 2016

This issue only appeared in 1.2
In 1.0 it worked, 1.1 I did not check.
My guess is that because of inheritance and circular navigation dependencies

@divega divega added this to the 1.2.0 milestone Nov 18, 2016
@divega
Copy link
Contributor

divega commented Nov 18, 2016

@AndriySvyryd please check if this was regressed in 1.1.

@xperiandri
Copy link

xperiandri commented Nov 20, 2016

So I commented out all the navigation attributes except in CarRequest

        [ForeignKey("AcceptedResponseId")]
        public CarResponse AcceptedCarResponse { get; set; }

        //[ForeignKey(nameof(PassengerId))]
        //[InverseProperty(nameof(HahaTaxi.Entities.Passenger.CarRequests))]
        public virtual Passenger Passenger { get; set; }

        [InverseProperty(nameof(CarResponse.Request))]
        public virtual ICollection<CarResponse> CarResponses { get; set; }

And it works now

@divega divega modified the milestones: 1.1.1, 1.2.0 Nov 20, 2016
@AndriySvyryd
Copy link
Member

Verified that the regression was in 1.1.0

AndriySvyryd added a commit that referenced this issue Dec 16, 2016
…iding adding navigations with ambiguos attributes from RelationshipDiscoveryConvention.

Fixes #7057
AndriySvyryd added a commit that referenced this issue Dec 16, 2016
…iding adding navigations with ambiguos attributes from RelationshipDiscoveryConvention.

Fixes #7057
AndriySvyryd added a commit that referenced this issue Dec 16, 2016
…iding adding navigations with ambiguous attributes in RelationshipDiscoveryConvention.

Fixes #7057
@AndriySvyryd
Copy link
Member

Fixed in cb79bb8

@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Dec 16, 2016
@AndriySvyryd AndriySvyryd removed their assignment Dec 16, 2016
@AndriySvyryd AndriySvyryd reopened this Jan 11, 2017
@Eilon
Copy link
Member

Eilon commented Jan 19, 2017

This patch bug is approved. Please use the normal code review process w/ a PR and make sure the fix is in the correct branch, then close the bug and mark it as done.

@AndriySvyryd AndriySvyryd changed the title StackOverflowException on 1.2.0-* bits StackOverflowException with InversePropertyAttribute on 1.1.0 Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

5 participants