Skip to content

[Bug]: panic: core::option::Option::unwrap() on a None value in riti_context_new_with_config #466

Description

@itshimelz

OpenBangla Keyboard Version

openbangla-keyboard-git (latest AUR version)

Operating System and Version

Arch Linux

Environment Details (for GNU/Linux Users)

Wayland (Hyprland)

Input Method Framework

Fcitx

Describe the Bug

immediately upon initialization or when reloading the OpenBangla engine. The crash is a Rust panic originating from the riti engine's FFI layer.

Steps to Reproduce

  1. Install openbangla-keyboard-git and fcitx5-openbangla-git.
  2. Configure Fcitx5 with OpenBangla as an input method.
  3. Start the Fcitx5 daemon: fcitx5 -d.
  4. Observe the immediate process abort/crash.

Logs or Screenshots

I2026-05-15 22:45:40.068544 instance.cpp:1420] Override Enabled Addons: {}
I2026-05-15 22:45:40.072916 instance.cpp:1421] Override Disabled Addons: {}
I2026-05-15 22:45:40.076443 addonmanager.cpp:204] Loaded addon wayland
I2026-05-15 22:45:40.079535 xcbconnection.cpp:198] Connecting to X11 display, display name::1.
I2026-05-15 22:45:40.079612 xcbconnection.cpp:203] X11 display: :1 is xwayland.
I2026-05-15 22:45:40.079699 addonmanager.cpp:204] Loaded addon xcb
I2026-05-15 22:45:40.081265 addonmanager.cpp:204] Loaded addon quickphrase
I2026-05-15 22:45:40.081424 addonmanager.cpp:204] Loaded addon imselector
I2026-05-15 22:45:40.082463 keyboard.cpp:229] Attempting to load keyboard from: ["/usr/share/xkeyboard-config-2"] Rule: evdev
I2026-05-15 22:45:40.089305 addonmanager.cpp:204] Loaded addon keyboard
I2026-05-15 22:45:40.089835 addonmanager.cpp:204] Loaded addon clipboard
I2026-05-15 22:45:40.090090 addonmanager.cpp:204] Loaded addon waylandim
I2026-05-15 22:45:40.090303 addonmanager.cpp:204] Loaded addon unicode
I2026-05-15 22:45:40.091075 addonmanager.cpp:204] Loaded addon dbus
Checking update for input methods and addons
I2026-05-15 22:45:40.105096 addonmanager.cpp:204] Loaded addon fcitx4frontend
I2026-05-15 22:45:40.106017 addonmanager.cpp:204] Loaded addon ibusfrontend
I2026-05-15 22:45:40.106775 addonmanager.cpp:204] Loaded addon xim
I2026-05-15 22:45:40.107297 addonmanager.cpp:204] Loaded addon dbusfrontend
I2026-05-15 22:45:40.145470 inputmethodmanager.cpp:210] Found 749 input method(s) in addon keyboard
I2026-05-15 22:45:40.171718 addonmanager.cpp:204] Loaded addon kimpanel
I2026-05-15 22:45:40.172017 addonmanager.cpp:204] Loaded addon virtualkeyboard
I2026-05-15 22:45:40.197242 classicui.cpp:89] Created classicui for x11 display::1
I2026-05-15 22:45:40.197306 classicui.cpp:110] Created classicui for wayland display:
I2026-05-15 22:45:40.197323 addonmanager.cpp:204] Loaded addon classicui
I2026-05-15 22:45:40.197792 addonmanager.cpp:204] Loaded addon notificationitem
I2026-05-15 22:45:40.198321 addonmanager.cpp:204] Loaded addon notifications
I2026-05-15 22:45:40.206537 dbusmodule.cpp:841] Service name change: org.fcitx.Fcitx5  :1.103
I2026-05-15 22:45:40.209612 kimpanel.cpp:116] Kimpanel new owner: 
I2026-05-15 22:45:40.209703 virtualkeyboard.cpp:218] VirtualKeyboard new owner: 
I2026-05-15 22:45:40.209765 portalsettingmonitor.cpp:97] A new portal show up, start a new query.
I2026-05-15 22:45:40.209985 portalsettingmonitor.cpp:97] A new portal show up, start a new query.

thread '<unnamed>' (40049) panicked at src/fixed/method.rs:109:66:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread '<unnamed>' (40049) panicked at library/core/src/panicking.rs:225:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x7fd062505b4a - <<std[a765fd5928b5b598]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[35a6834026b90a1d]::fmt::Display>::fmt
   1:     0x7fd0625477fa - core[35a6834026b90a1d]::fmt::write
   2:     0x7fd062517e82 - <std[a765fd5928b5b598]::sys::stdio::unix::Stderr as std[a765fd5928b5b598]::io::Write>::write_fmt
   3:     0x7fd0624d6973 - std[a765fd5928b5b598]::panicking::default_hook::{closure#0}
   4:     0x7fd0624f802c - std[a765fd5928b5b598]::panicking::default_hook
   5:     0x7fd0624f81eb - std[a765fd5928b5b598]::panicking::panic_with_hook
   6:     0x7fd0624d6a5a - std[a765fd5928b5b598]::panicking::panic_handler::{closure#0}
   7:     0x7fd0624cd9e9 - std[a765fd5928b5b598]::sys::backtrace::__rust_end_short_backtrace::<std[a765fd5928b5b598]::panicking::panic_handler::{closure#0}, !>
   8:     0x7fd0624d7fdd - __rustc[168cb6d8736c2077]::rust_begin_unwind
   9:     0x7fd062477f8d - core[35a6834026b90a1d]::panicking::panic_nounwind_fmt
  10:     0x7fd062477ecb - core[35a6834026b90a1d]::panicking::panic_nounwind
  11:     0x7fd062478097 - core[35a6834026b90a1d]::panicking::panic_cannot_unwind
  12:     0x7fd0624971a5 - riti_context_new_with_config
                               at /usr/src/debug/openbangla-keyboard-git/openbangla-keyboard/src/engine/riti/src/ffi.rs:21:1
  13:     0x7fd06247b6d9 - _ZN5fcitx16OpenBanglaEngine12reloadConfigEv
                               at /usr/src/debug/openbangla-keyboard-git/openbangla-keyboard/src/engine/fcitx/openbangla.cpp:509:15
  14:     0x7fd06247bdc5 - _ZN5fcitx16OpenBanglaEngineC2EPNS_8InstanceE
                               at /usr/src/debug/openbangla-keyboard-git/openbangla-keyboard/src/engine/fcitx/openbangla.cpp:379:15
  15:     0x7fd06247bfa0 - _ZN5fcitx17OpenBanglaFactory6createEPNS_12AddonManagerE
                               at /usr/src/debug/openbangla-keyboard-git/openbangla-keyboard/src/engine/fcitx/openbangla.h:91:52
  16:     0x7fd06bb1add8 - <unknown>
  17:     0x7fd06bb1c5c2 - <unknown>
  18:     0x7fd06bb1cba2 - _ZN5fcitx12AddonManager5addonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
  19:     0x7fd06baf18f2 - <unknown>
  20:     0x7fd06b9f9d0a - <unknown>
  21:     0x7fd06b117305 - <unknown>
  22:     0x7fd06b11c213 - sd_event_dispatch
  23:     0x7fd06b11c489 - sd_event_run
  24:     0x7fd06b11c670 - sd_event_loop
  25:     0x7fd06ba28a8c - _ZN5fcitx9EventLoop4execEv
  26:     0x7fd06bae599e - _ZN5fcitx8Instance4execEv
  27:     0x562d30278c8e - <unknown>
  28:     0x7fd06b227741 - <unknown>
  29:     0x7fd06b227879 - __libc_start_main
  30:     0x562d3027a095 - <unknown>
  31:                0x0 - <unknown>
thread caused non-unwinding panic. aborting.
=========================
Fcitx 5.1.19 -- Get Signal No.: 6
Date: try "date -d @1778863541" if you are using GNU date ***
ProcessID: 40049
/usr/bin/fcitx5(+0x14ce8) [0x562d3027ace8]
/usr/lib/libc.so.6(+0x3e8f0) [0x7fd06b23e8f0]
/usr/lib/libc.so.6(+0x9a29c) [0x7fd06b29a29c]
/usr/lib/libc.so.6(gsignal+0x20) [0x7fd06b23e7d0]
/usr/lib/libc.so.6(abort+0x26) [0x7fd06b225681]
/usr/lib/fcitx5/openbangla.so(+0x76e4a) [0x7fd062476e4a]
/usr/lib/fcitx5/openbangla.so(+0x76be9) [0x7fd062476be9]
/usr/lib/fcitx5/openbangla.so(_RNvNtCsen3zWVbX5MG_3std9panicking15panic_with_hook+0x1d7) [0x7fd0624f832d]
/usr/lib/fcitx5/openbangla.so(+0xd6a5a) [0x7fd0624d6a5a]
/usr/lib/fcitx5/openbangla.so(+0xcd9e9) [0x7fd0624cd9e9]
/usr/lib/fcitx5/openbangla.so(+0xd7fdd) [0x7fd0624d7fdd]
/usr/lib/fcitx5/openbangla.so(_RNvNtCs4BzXErkODQn_4core9panicking18panic_nounwind_fmt+0x2d) [0x7fd062477f8d]
/usr/lib/fcitx5/openbangla.so(+0x77ecb) [0x7fd062477ecb]
/usr/lib/fcitx5/openbangla.so(+0x78097) [0x7fd062478097]
/usr/lib/fcitx5/openbangla.so(riti_context_new_with_config+0x395) [0x7fd0624971a5]
/usr/lib/fcitx5/openbangla.so(+0x7b6d9) [0x7fd06247b6d9]
/usr/lib/fcitx5/openbangla.so(+0x7bdc5) [0x7fd06247bdc5]
/usr/lib/fcitx5/openbangla.so(+0x7bfa0) [0x7fd06247bfa0]
/usr/lib/libFcitx5Core.so.7(+0x87dd8) [0x7fd06bb1add8]
/usr/lib/libFcitx5Core.so.7(+0x895c2) [0x7fd06bb1c5c2]
/usr/lib/libFcitx5Core.so.7(_ZN5fcitx12AddonManager5addonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x1d2) [0x7fd06bb1cba2]
/usr/lib/libFcitx5Core.so.7(+0x5e8f2) [0x7fd06baf18f2]
/usr/lib/libFcitx5Utils.so.2(+0x47d0a) [0x7fd06b9f9d0a]
/usr/lib/libsystemd.so.0(+0x41305) [0x7fd06b117305]
/usr/lib/libsystemd.so.0(sd_event_dispatch+0x153) [0x7fd06b11c213]
/usr/lib/libsystemd.so.0(sd_event_run+0x129) [0x7fd06b11c489]
/usr/lib/libsystemd.so.0(sd_event_loop+0x60) [0x7fd06b11c670]
/usr/lib/libFcitx5Utils.so.2(_ZN5fcitx9EventLoop4execEv+0x2c) [0x7fd06ba28a8c]
/usr/lib/libFcitx5Core.so.7(_ZN5fcitx8Instance4execEv+0x5e) [0x7fd06bae599e]
/usr/bin/fcitx5(+0x12c8e) [0x562d30278c8e]
/usr/lib/libc.so.6(+0x27741) [0x7fd06b227741]
/usr/lib/libc.so.6(__libc_start_main+0x89) [0x7fd06b227879]

Additional Context

It appears that riti_context_new_with_config is attempting to unwrap a configuration or dictionary path that is returning None. This might be due to a missing directory in /usr/share/openbangla-keyboard/ or an unitialized default configuration during a fresh install on the -git branch.

Activity

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions