Skip to content

Null check operator used on a null value #195

@crioux

Description

@crioux
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
package:xterm/src/utils/circular_buffer.dart 105:28                            IndexAwareCircularBuffer.[]
package:xterm/src/core/buffer/buffer.dart 135:17                               Buffer.currentLine
package:xterm/src/core/buffer/buffer.dart 121:18                               Buffer.writeChar
package:xterm/src/terminal.dart 389:13                                         Terminal.writeChar
package:xterm/src/core/escape/parser.dart 53:15                                EscapeParser._processChar
package:xterm/src/core/escape/parser.dart 46:9                                 EscapeParser._process
package:xterm/src/core/escape/parser.dart 31:5                                 EscapeParser.write
package:xterm/src/terminal.dart 228:13                                         Terminal.write

Getting this stack trace when I create a Terminal as such:

final globalDebugTerminal = Terminal(
  maxLines: 50000,
);

I have a log that is filling this globalDebugTerminal up without having any TerminalView widget created, and then when i go and create a TerminalView widget to view the contents as such:

            TerminalView(globalDebugTerminal,
                textStyle: kDefaultTerminalStyle,
                controller: _terminalController,
                //autofocus: true,
                backgroundOpacity: _showEllet ? 0.75 : 1.0,
                onSecondaryTapDown: (details, offset) async {
              await copySelection(context);
            })

It throws the exception above.

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

    Issue actions