Uh oh!
There was an error while loading. Please reload this page.
fix: Adjust recursive cycle detection to fix EXC_BAD_ACCESS - #181
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
| } | ||
| visitedTypes.insert(inputObj) | ||
| fieldPathIndexByTypeName[inputObj.name] = fieldPath.count |
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 💁♂️
Thanks for the PR! Out of curiosity, in which version of Swift were you experiencing the issue? |
maximkrouk
commented
Apr 27, 2026
I believe it was the latest one (seems to be From my Dockerfile: From my local env ( |
NeedleInAJayStack
commented
May 14, 2026
Hey, sorry about the delay. I'm also able to recreate this on Swift 6.3 in release mode, and I've validated that the fix works. It's kinda strange that it works - this seems like a bug with closure variable capture with the compiler, so I may raise it up to the Swift team as well. I'm going to go ahead and merge this. Thanks for contributing! |
Uh oh!
There was an error while loading. Please reload this page.
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