question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visualize command gives error: use of undeclared identifier 'CFTypeRef'

See original GitHub issue

This may be related to https://github.com/facebook/chisel/issues/163

When I run vi label were label is some UILabel, I’m getting this:

(lldb) vi label
error: error: use of undeclared identifier 'CFTypeRef'
error: use of undeclared identifier 'label'
Traceback (most recent call last):
  File "/Users/zev/Projects/chisel/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/Users/zev/Projects/chisel/commands/FBVisualizationCommands.py", line 183, in run
    _visualize(arguments[0])
  File "/Users/zev/Projects/chisel/commands/FBVisualizationCommands.py", line 151, in _visualize
    if fb.evaluateBooleanExpression('(unsigned long)CFGetTypeID((CFTypeRef)' + target + ') == (unsigned long)CGImageGetTypeID()'):
  File "/Users/zev/Projects/chisel/fblldbbase.py", line 84, in evaluateBooleanExpression
    return (int(evaluateIntegerExpression('(BOOL)(' + expression + ')', printErrors)) != 0)
  File "/Users/zev/Projects/chisel/fblldbbase.py", line 76, in evaluateIntegerExpression
    output = evaluateExpression('(int)(' + expression + ')', printErrors).replace('\'', '')
AttributeError: 'NoneType' object has no attribute 'replace'

Here’s a screenshot. As you can see, label is a UILabel that is currently in scope.

screen shot 2016-09-28 at 6 28 25 pm

I tried with both the latest release from Homebrew and master. I’m using Xcode 8.0 and Swift 3.

Here’s a trivial sample project which you can use to reproduce this bug: https://cl.ly/hbOV

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ZevEisenbergcommented, Sep 29, 2016

Any chance it’s something like having to call expr import CoreGraphics?

0reactions
kastiglionecommented, Sep 29, 2016

Thanks, it is possible that Chisel needs to do that. It will probably have to be expr @import CoreGraphics since Chisel commands generate objc. If this does work, I guess we’ll need some central location to manage and execute the imports, on behalf of commands.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an 'undeclared identifier' error and how do I fix it?
The compiler emits an 'undeclared identifier' error when you have attempted to use some identifier (what would be the name of a function,...
Read more >
Compiler Error C2065 - Microsoft Learn
This error can occur if your identifier isn't properly scoped. If you see C2065 when you use cout , a scope issue is...
Read more >
Build error on MacOS - Google Groups
I am getting this error, when I run autoninja command, ... error: use of undeclared identifier 'MTLGPUFamilyApple7'. macOS v11.2.1.
Read more >
G4UnitDefinition not working as expected - Geant4 Forum
I am trying to define new units to use in my simulation similar to ... Which gives the error: “error C2065: 'Rj': undeclared...
Read more >
62183 (ruby30 @3.0.0: error: use of undeclared identifier 'fmt'
For some reason, making a soft link from /Library/Developer/CommandLineTools/usr/bin/clang to /opt/local/clang seemed to trigger the right behavior. Amusingly, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found