krille-chan / fluffychat

The cutest instant messenger in the [matrix]
https://fluffychat.im/
GNU Affero General Public License v3.0
1.21k stars 220 forks source link

Keyboard shortcuts don't work as expected #859

Open RyanGibb opened 9 months ago

RyanGibb commented 9 months ago

Bug Description

I get many error messages like:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      _isPressed.<anonymous closure> (package:keyboard_shortcuts/keyboard_shortcuts.dart:51)
#1      WhereIterator.moveNext (dart:_internal/iterable.dart:441)
#2      _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55)
#3      _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135)
#4      RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:705)
#5      KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1018)
#6      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:212)
#7      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:567)
#8      _invoke2 (dart:ui/hooks.dart:202)
#9      _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45)
#10     _Channel.push (dart:ui/channel_buffers.dart:135)
#11     ChannelBuffers.push (dart:ui/channel_buffers.dart:331)
#12     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:736)
#13     _dispatchPlatformMessage (dart:ui/hooks.dart:114)

Steps to Reproduce

Type a shortcut like CTRL+F

Expected Behavior

Keyboard shortcut action to be triggered from https://github.com/krille-chan/fluffychat/commit/824fcfc27cc50cb7005a9fe7c901dffbd1ecd0fa

App Version

1.14.1

Additional Platform Information

NixOS

Additional Context

No response

krille-chan commented 9 months ago

App version 1.14.1 is very old. Please try the current version 1.17.2. NixOS is not built by us. We only provide Snap and Flatpak, while only Snap is being well maintained and tested before a release

RyanGibb commented 9 months ago

Ah, it looks like 1.17.2 isn't packaged on NixOS yet, but trying 1.17.1 I get the following when typing CTRL-F:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 1318153, tid: 140507939980992, name io.flutter.ui
os: linux arch: x64 comp: no sim: no
build_id: '1a09bcfbe5e19c263cc6cbed1e0c8f1f'
isolate_dso_base: 7fca8dd9d000, vm_dso_base: 7fca8dd9d000
isolate_instructions: 7fca8e54f880, vm_instructions: 7fca8e549000
    #00 abs 00007fca8ea58167 virt 0000000000cbb167 _kDartIsolateSnapshotInstructions+0x5088e7
    #01 abs 00007fca8ea57eac virt 0000000000cbaeac _kDartIsolateSnapshotInstructions+0x50862c
    #02 abs 00007fca8ee41a19 virt 00000000010a4a19 _kDartIsolateSnapshotInstructions+0x8f2199
    #03 abs 00007fca8ea57aaf virt 0000000000cbaaaf _kDartIsolateSnapshotInstructions+0x50822f
    #04 abs 00007fca8edc0751 virt 0000000001023751 _kDartIsolateSnapshotInstructions+0x870ed1
    #05 abs 00007fca8edbfe31 virt 0000000001022e31 _kDartIsolateSnapshotInstructions+0x8705b1
    #06 abs 00007fca8e63a707 virt 000000000089d707 _kDartIsolateSnapshotInstructions+0xeae87
    #07 abs 00007fca8edbf0fe virt 00000000010220fe _kDartIsolateSnapshotInstructions+0x86f87e
    #08 abs 00007fca8edbe1d0 virt 00000000010211d0 _kDartIsolateSnapshotInstructions+0x86e950
    #09 abs 00007fca8e57a19c virt 00000000007dd19c _kDartIsolateSnapshotInstructions+0x2a91c
    #10 abs 00007fca8e57a0b8 virt 00000000007dd0b8 _kDartIsolateSnapshotInstructions+0x2a838
    #11 abs 00007fca8e579a65 virt 00000000007dca65 _kDartIsolateSnapshotInstructions+0x2a1e5
    #12 abs 00007fca8e5797b2 virt 00000000007dc7b2 _kDartIsolateSnapshotInstructions+0x29f32
    #13 abs 00007fca8ed536a7 virt 0000000000fb66a7 _kDartIsolateSnapshotInstructions+0x803e27
    #14 abs 00007fca8e5796f8 virt 00000000007dc6f8 _kDartIsolateSnapshotInstructions+0x29e78
    #15 abs 00007fca8e57b398 virt 00000000007de398 _kDartIsolateSnapshotInstructions+0x2bb18

I'll try this with 1.17.2 when it's packaged on my distribution.

RyanGibb commented 6 months ago

I've reproduced this with 1.18.0 on Wayland/Sway.