Skip to content

visualize fails for certain UIImage pointers #215

Closed
@cbowns

Description

@cbowns

(Refs #205 and #177 )

Swift 4 code in Xcode 9.2 running on an iOS 10.3 device. I have a UIImage? I'm trying to visualize from the device, and it sometimes fails. (I don't know if it's related to the image optional or not: sometimes it works just fine!)

The error text is reliably the same:

(lldb) visualize image
error: error: Execution was interrupted, reason: breakpoint 1.1.
The process has been returned to the state before expression evaluation.
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 150, in _visualize
    _showImage(target)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 38, in _showImage
    imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
TypeError: cannot concatenate 'str' and 'NoneType' objects

Even if I backtick it, or force-unwrap:

(lldb) visualize image
error: error: Execution was interrupted, reason: breakpoint 1.1.
The process has been returned to the state before expression evaluation.
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 150, in _visualize
    _showImage(target)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 38, in _showImage
    imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
TypeError: cannot concatenate 'str' and 'NoneType' objects

(lldb) visualize image!
error: error: Execution was interrupted, reason: breakpoint 1.1.
The process has been returned to the state before expression evaluation.
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 150, in _visualize
    _showImage(target)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 38, in _showImage
    imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
TypeError: cannot concatenate 'str' and 'NoneType' objects

(lldb) visualize `image`
error: error: Execution was interrupted, reason: breakpoint 1.1.
The process has been returned to the state before expression evaluation.
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 150, in _visualize
    _showImage(target)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 38, in _showImage
    imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
TypeError: cannot concatenate 'str' and 'NoneType' objects

(lldb) visualize `image!`
error: error: Execution was interrupted, reason: breakpoint 1.1.
The process has been returned to the state before expression evaluation.
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 150, in _visualize
    _showImage(target)
  File "/usr/local/Cellar/chisel/HEAD-2bc1bf6/libexec/commands/FBVisualizationCommands.py", line 38, in _showImage
    imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
TypeError: cannot concatenate 'str' and 'NoneType' objects

Activity

cbowns

cbowns commented on Jun 5, 2018

@cbowns
Author

This is a dupe of #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cbowns

        Issue actions

          `visualize` fails for certain UIImage pointers · Issue #215 · facebook/chisel