paper-plane-developers / paper-plane

Chat over Telegram on a modern and elegant client
GNU General Public License v3.0
963 stars 39 forks source link

Crash regarding phone_number_input.rs #559

Closed NettoHikari closed 1 year ago

NettoHikari commented 1 year ago

Hey there.

Description:

Whenever trying to run the application on Arch Linux (Flatpak or AUR versions), the application immediately crashes.

What happens:

What is expected to happen:

Console output:

netto@shirako ~ % flatpak run app.drey.PaperPlane 
[ 3][t 0][1686633921.409691333][Client.cpp:280][&td_requests]   Begin to wait for updates with timeout 2.000000
[ 3][t 4][1686633921.665278911][Td.cpp:2504][#1][!MultiTd]  Create Td with layer 158, database version 14 and version 47 on 4 threads
[ 3][t 4][1686633921.665344715][Td.cpp:3973][#1][!Td][&td_requests] Sending update: updateOption {
  name = "version"
  value = optionValueString {
    value = "1.8.14"
  }
}
[ 3][t 4][1686633921.665362596][Td.cpp:3973][#1][!Td][&td_requests] Sending update: updateOption {
  name = "commit_hash"
  value = optionValueString {
    value = "8517026415e75a8eec567774072cbbbbb52376c1"
  }
}
[ 3][t 4][1686633921.665367126][Td.cpp:3973][#1][!Td][&td_requests] Sending update: updateAuthorizationState {
  authorization_state = authorizationStateWaitTdlibParameters {
  }
}
[ 3][t 0][1686633921.665373086][Client.cpp:293][&td_requests]   End to wait for updates, returning object 0 0x7f16bc101b50
[ 3][t 4][1686633921.665380001][Td.cpp:2894][#1][!Td][&td_requests] Receive request 1: setLogVerbosityLevel {
  new_verbosity_level = 2
}
[ 2][t 1][1686633921.724634647][TdDb.cpp:380][#1][!RunOnSchedulerWorker]    Set PRAGMA user_version = 14
[ 2][t 4][1686633921.731457710][AuthDataShared.cpp:115][#1][!Td]    DcId{1} [auth_key_id:0][state:Empty][created_at:0][last_used:0]
[ 2][t 4][1686633921.732379436][Session.cpp:269][#1][!SessionProxy:1:main]  Generate new session_id 10731605343174637452 for auth key 0 for main DC1

(paper-plane:2): Gtk-WARNING **: 07:25:21.732: No IM module matching GTK_IM_MODULE=ibus found
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/phone_number_input.rs:137:73
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
marhkb commented 1 year ago

Hi! What's the output of

locale

Could you test https://github.com/paper-plane-developers/paper-plane/suites/13611102677/artifacts/750489403 ?

NettoHikari commented 1 year ago

Hi! Sorry for the late reply. I somehow overlooked the notification in my inbox.

The output of locale is:

netto@shirako ~ % locale
LANG=de_DE.UTF-8
LC_CTYPE=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE=C
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES=de_DE.UTF-8
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

The version you linked starts up just fine and seems to work througout. Please tell me if I can be of any more assistance!

Regards - Netto

marhkb commented 1 year ago

The locale output looks ok to me. Can you also run the command in the sandbox?

flatpak run --branch=beta --command=locale app.drey.PaperPlane
NettoHikari commented 1 year ago

Here you go:

netto@shirako ~ % flatpak run --branch=beta --command=locale app.drey.PaperPlane
LANG=de_DE.UTF-8
LC_CTYPE=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE=C
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES=de_DE.UTF-8
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
JamiKettunen commented 1 year ago

I'm hitting this same crash on the v0.1.0-beta.3 (39a8fad5) flatpak under Chimera Linux but also NOT on a glibc Void Linux setup (also via flatpak).

There's currently no locale command on the Chimera Linux system as it uses musl libc; for Chimera Linux flatpak run --command=locale app.drey.PaperPlane returns C.UTF-8 (and LC_COLLATE=C with unset LC_ALL) while on Void it's en_US.UTF-8 (and LC_COLLATE=C with unset LC_ALL) which matches the Void native locale output fwiw.

EDIT: Actually I just tried replicating the broken env on Void and sure enough it also crashes with flatpak run --env=LC_ALL=C.UTF-8 app.drey.PaperPlane, similarly even bringing the known working one over to Chimera with --env=LC_ALL=en_US.UTF-8 doesn't crash it anymore