fix: Adjust recursive cycle detection to fix EXC_BAD_ACCESS#181
Open
maximkrouk wants to merge 1 commit intoGraphQLSwift:mainfrom
Open
fix: Adjust recursive cycle detection to fix EXC_BAD_ACCESS#181maximkrouk wants to merge 1 commit intoGraphQLSwift:mainfrom
maximkrouk wants to merge 1 commit intoGraphQLSwift:mainfrom
Conversation
Prev implementation triggered EXC_BAD_ACCESS exception on line 711 > `fieldPathIndexByTypeName[inputObj.name] = fieldPath.count` could not access `count` since `fieldPath` was `<uninitialized>` even tho it clearly was This commit wraps this logic into a class so `createInputObjectCircularRefsValidator` function no longer mutably captures a value type
maximkrouk
commented
Apr 14, 2026
| } | ||
|
|
||
| visitedTypes.insert(inputObj) | ||
| fieldPathIndexByTypeName[inputObj.name] = fieldPath.count |
Author
There was a problem hiding this comment.
Exception was raised here on fieldPath.count access, for some reason it was only reproducible in release builds, debug ones worked fine 💁♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prev implementation triggered EXC_BAD_ACCESS exception on line 711
This commit wraps this logic into a class so
createInputObjectCircularRefsValidatorfunction no longer mutably captures a value typeNote
I also added
.editorconfigfile, this will help potential contributors to avoid switching their default formatting to "4-spaces" while working on graphql package