Skip to content

App crashes when inserting text from contextMenuButtonItems #1724

Closed
@EgorK0rshun

Description

@EgorK0rshun

Is there an existing issue for this?

Flutter Quill version

9.2.11 and 9.1.1+

Steps to reproduce

  1. Try tom paste text from contextMenuButtonItems for 32-bit CPU Type devices

Expected results

Сorrect text insertion

Actual results

App crashed

Code sample

Code sample
onPaste:
          pasteEnabled ? () => pasteText(SelectionChangedCause.toolbar) : null,
          
 ...
 
   if (clipboard != null) {
      // TODO: Bug, Doesn't replace the selected text, it just add a new one
      final reader = await clipboard.read();
  Future<ClipboardReader> read() async {
    final reader = await raw.ClipboardReader.instance.newClipboardReader();
    ...
    }
    
    ...
    
  Future<DataReader> newClipboardReader() async {
    final handle = await _channel.invokeMethod('newClipboardReader');
    return DataReader(handle: DataReaderHandle.deserialize(handle));
  }

Screenshots or Video

Code screenshots Снимок экрана 2024-02-06 в 17 28 19 Снимок экрана 2024-02-06 в 17 28 43 Снимок экрана 2024-02-06 в 17 29 13 Снимок экрана 2024-02-06 в 17 29 37

Logs

Logs
F/libc  ( 6090): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 6170 (1.ui), pid 6090 (od.tracker.free)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/m01qser/m01q:12/SP1A.210812.016/M015FXXS5CWH1:user/release-keys'
Revision: '0'
ABI: 'arm'
Processor: '2'
Timestamp: 2024-02-06 17:04:40.475913920+0300
Process uptime: 150s
Cmdline: app
pid: 6090, tid: 6170, name: 1.ui >>> app <<<
uid: 10861
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
  r0 00000000 r1 00000001 r2 00000000 r3 acf3b4f0
  r4 92565558 r5 b8f40ec1 r6 adb88041 r7 00000000
  r8 ace87565 r9 b2ec0288 r10 b2ebff00 r11 af0f9788
  ip 00000000 sp af0f9770 lr ace91161 pc 92565558
backtrace:
   #00 pc 00065558 [anon:dart-code]
   #01 pc 001c615d /data/app/~~PMUCPy7YsEtK8cRxP4zJfg==app-Donw89GI5Mz5yynxQQ8XLg==/base.apk
   #02 pc 0006554e [anon:dart-code]
Lost connection to device.
the Dart compiler exited unexpectedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions