Skip to content

nil in LPShortString in BlockContentTypeToTextBuffer #51

@Nashev

Description

@Nashev

I have tried to use FastMM_LogStateToFile which have a nested calls of BlockContentTypeToTextBuffer procedure in my code for explore some memory leaks, and have faced with situation, when in LPShortString after line

LPShortString := PShortString(PPointer(PByte(LClass) + vmtClassName)^); 

was nil and further manipulation with it fails and prevent to write a memory usage dump.

I do not remember now, what the object leads to this misbehaviour, but when I added a code like

      if LPShortString = nil then
        Result := AppendTextToBuffer('<nil class name>', Length('<nil class name>'), Result, APTargetBufferEnd)
      else
        begin

it wrote one line about this nil, and all others data was very useful for my purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions