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

[SR-12406] [SwiftPM?] lldb <uninitialized> object? #4429

Closed
zntfdr opened this issue Mar 25, 2020 · 1 comment
Closed

[SR-12406] [SwiftPM?] lldb <uninitialized> object? #4429

zntfdr opened this issue Mar 25, 2020 · 1 comment
Labels
bug Something isn't working LLDB for Swift

Comments

@zntfdr
Copy link

zntfdr commented Mar 25, 2020

Previous ID SR-12406
Radar https://feedbackassistant.apple.com/feedback/7639388
Original Reporter @zntfdr
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: 48cf3968020a0421091235763ecbae5f

Issue Description:

Hi all!
I have the following piece of code (to be put in a Swift executable `main.swift` file) that used to work fine in previous versions of Xcode but doesn't work correctly on 11.4.

import GameplayKit

if #available(OSX 10.12, *) {
  let quad = GKQuad(quadMin: .zero, quadMax: .one)
  let tree = GKQuadtree(boundingQuad: quad, minimumCellSize: 1)
  let valuePosition = SIMD2<Float>.one / 2 
  tree.add(1 as NSObject, at: valuePosition)
  print(tree.elements(at: valuePosition))
}

It uses GameplayKit to add an element at one position and ask for all the elements in that same position:

with older Xcode versions this works fine and return the element that was just added, in 11.4 it returns an empty array instead.

Interesting parts:

  • if I use Xcode 11.4 with an old Swift 5.2 snapshot (I've tried with swift-5.2-DEVELOPMENT-SNAPSHOT-2020-02-15-a), it works correctly (aka return the element).

  • If I run the same code in a iOS app (in Xcode 11.4 with the Xcode toolchain) it works fine as well.

This seems to be an issue when running a Swift Executable, the same issue can be repeated by running the tests of this repository. Which fail on Xcode 11.4, but pass in earlier Xcode versions, or Xcode 11.4 with an old toolchain.

While trying to figure out what has changed I've noticed that if I try to print the `tree` object in lldb it returns `<uninitialized>`, I'm not entirely sure what it means but could this be the issue?

@zntfdr
Copy link
Author

zntfdr commented Feb 23, 2021

Resolved via FB7639388. It works on Xcode 12.4+

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

1 participant