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-6657] Couldn't load 'self' because its value couldn't be evaluated #4501

Open
swift-ci opened this issue Dec 22, 2017 · 13 comments
Open
Assignees
Labels
bug Something isn't working LLDB for Swift

Comments

@swift-ci
Copy link

Previous ID SR-6657
Radar rdar://problem/36256619
Original Reporter robdashnash (JIRA User)
Type Bug

Attachment: Download

Environment

Xcode Version 9.2 (9C40b)
macOS 10.13.2

Additional Detail from JIRA
Votes 1
Component/s LLDB for Swift
Labels Bug
Assignee @adrian-prantl
Priority Medium

md5: 377c2c0d373101032aa087833faa8b7d

Issue Description:

At runtime, the value could not be evaluated.

public protocol CardableScene: class where Self: UIViewController {
  var showsNavigationBar: Bool { get }
}

public extension CardableScene {
  
  var showsNavigationBar: Bool {
    return navigationItem.title != nil
  }
}

(lldb) po scene.showsNavigationBar
2017-12-20 07:30:23.558169+0000 DanceClass[1194:29854] +[DanceClass.DanceClassViewController navigationItem]: unrecognized selector sent to class 0x109344cd0
error: warning: couldn't get required object pointer (substituting NULL): Couldn't load 'self' because its value couldn't be evaluated

@swift-ci
Copy link
Author

Comment by Rob Nash (JIRA)

FYI

The protocol 'CardableScene' currently shows 'redundant layout constraint" warning, as explained here

https://bugs.swift.org/browse/SR-6265?focusedCommentId=31224&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-31224

However, it has been suggested in the comments that this issue is not related.

@belkadan
Copy link

belkadan commented Jan 2, 2018

@swift-ci create

@belkadan
Copy link

belkadan commented Jan 2, 2018

Do you have a complete project where this reproduces? That'll make it easier to be sure we're looking at the same thing.

@swift-ci
Copy link
Author

swift-ci commented Jan 3, 2018

Comment by Rob Nash (JIRA)

Ye sure @belkadan project attached. Run the workspace on an iPhone simulator of your choice and take a look at DanceClassViewController.swift

override func viewDidLoad() {
        super.viewDidLoad()
        navigationItem.title = "Class"
} [^Archive.zip] 

@belkadan
Copy link

belkadan commented Jan 3, 2018

It looks like that one isn't the problem one, but breaking at Card.swift:17 lets me try the "p scene.showsNavigationBar" that causes the problem. Accessing plain Objective-C methods like "p scene.view" also produces this error.

@belkadan
Copy link

belkadan commented Jan 3, 2018

(Thanks!)

@swift-ci
Copy link
Author

Comment by Alex Reilly (JIRA)

Any updates on this? Still experiencing it on the current Xcode (9.3)

Full error that I'm experiencing:

(lldb) po newDatasource.values
objc[60841]: Method cache corrupted. This may be a message to an invalid object, or a memory error somewhere else.
objc[60841]: receiver 0x7b14000f0230, SEL 0x10fef5a70, isa 0x111f6bf98, cache 0x111f6bfa8, buckets 0x7b1400101030, mask 0x3, occupied 0x1
objc[60841]: receiver 0 bytes, buckets 80 bytes
objc[60841]: selector 'release'
objc[60841]: isa '_TtGCs13ManagedBufferGVs17_HeapBufferHeaderVs18_StringBufferIVars_Vs6UInt16_'
objc[60841]: Method cache corrupted. This may be a message to an invalid object, or a memory error somewhere else.
expression produced error: warning: couldn't get required object pointer (substituting NULL): Couldn't load 'self' because its value couldn't be evaluated

error: Execution was interrupted, reason: signal SIGABRT.
The process has been returned to the state before expression evaluation.

@belkadan
Copy link

That's probably a different issue, Alex. Can you file that separately with your own reproducer?

@dcci
Copy link
Mannequin

dcci mannequin commented Sep 20, 2018

This bug is an unfortunate series of events. I plan to work on this 🙂

@dcci
Copy link
Mannequin

dcci mannequin commented Sep 20, 2018

(I have ideas on how to fix this, it's just not trivial).

@dcci
Copy link
Mannequin

dcci mannequin commented May 29, 2019

I never got around to this, but I have ideas on how to fix. It would be a good starter bug.

@swift-ci
Copy link
Author

Comment by Andrey Yakushev (JIRA)

Same problem in Xcode 11.1, during XCTests (sorry, can't show code - NDA). But looks very close (but with Foundation classes instead of UIKit)

@adrian-prantl
Copy link
Member

The radar linked with this issue is marked as fixed — Is this accurate?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
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

3 participants