Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

OOM error while trying to validate a change from principal to dependent #40

Closed
ddewaleffe opened this issue Dec 1, 2018 · 4 comments
Closed
Labels
bug Confirmed bug released Issue is resolved in a current release

Comments

@ddewaleffe
Copy link

ddewaleffe commented Dec 1, 2018

While try to reproduce for #34/#38, I happened to try changing End2 Role from Principal to Dependent..
and VS started to think for a long while until the popup on the screenshot appeared.

image

@msawczyn msawczyn added the investigating Looking into this label Dec 1, 2018
@msawczyn
Copy link
Owner

msawczyn commented Dec 1, 2018

Hmm. What was the cardinality on the other end of the association? Was it unidirectional or bidirectional?

@ddewaleffe
Copy link
Author

image

Relation is bidirectional. Other end is *.

If I try changing to NotSet, or NotApplicable there is no issue. Feedback is immediate with no change in model. Only when trying to change to from Principal to Dependent [I would think having the two sides defined as dependent does dot make much sense] is the OOM error happening.

I can send you the the full efmodel file if needed.

@msawczyn
Copy link
Owner

msawczyn commented Dec 3, 2018

Found it. You're right that it doesn't make sense to set both ends as dependent ... but the designer changes the other end when you set one end. Unfortunately, it then runs a verification to ensure that the cardinalities and roles are appropriate for each other, and sets the roles back when they're not. More unfortunately, that can trigger a bad recursion that blows the stack, causing an OOM error.

Manually changing roles is only appropriate in 1-1 and 0..1-0..1 cardinalities; otherwise, it's pretty well defined what those should be. So I've now hidden the ability to change roles except in those two circumstances. That change is now published in v1.2.6.20.

Thanks, as always, for the catch!

@msawczyn msawczyn added bug Confirmed bug released Issue is resolved in a current release and removed investigating Looking into this labels Dec 3, 2018
@ddewaleffe
Copy link
Author

I confirm that the 1.2.6.20 version fixes this.
Thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug released Issue is resolved in a current release
Projects
None yet
Development

No branches or pull requests

2 participants