Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash regarding phone_number_input.rs #559

Closed
NettoHikari opened this issue Jun 13, 2023 · 5 comments · Fixed by #560
Closed

Crash regarding phone_number_input.rs #559

NettoHikari opened this issue Jun 13, 2023 · 5 comments · Fixed by #560
Labels
bug Something isn't working
Milestone

Comments

@NettoHikari
Copy link

Hey there.

Description:

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

What happens:

  • Try to launch Paper Plane
  • Login window appears briefly
  • Then the app crashes

What is expected to happen:

  • Try to launch Paper Plane
  • Be able to log in to Telegram

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.
@melix99 melix99 added the bug Something isn't working label Jun 13, 2023
@melix99 melix99 added this to the 0.1 milestone Jun 13, 2023
marhkb added a commit that referenced this issue Jun 14, 2023
We shouldn't assume that the current locale has an equivalent country
code. We need to check this and set an invalid country code in this
case to fix a crash.

Fixes #559
@marhkb
Copy link
Collaborator

marhkb commented Jun 14, 2023

Hi! What's the output of

locale

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

@marhkb marhkb added the needs info OP was asked to provide mor information label Jun 15, 2023
@NettoHikari
Copy link
Author

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 marhkb removed the needs info OP was asked to provide mor information label Jun 18, 2023
@marhkb
Copy link
Collaborator

marhkb commented Jun 18, 2023

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
Copy link
Author

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
Copy link

JamiKettunen commented Jun 20, 2023

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

marhkb added a commit that referenced this issue Jun 20, 2023
We shouldn't assume that the current locale has an equivalent country
code. We need to check this and set an invalid country code in this
case to fix a crash.

Fixes #559
krlade pushed a commit to krlade/paper-plane that referenced this issue Sep 23, 2023
We shouldn't assume that the current locale has an equivalent country
code. We need to check this and set an invalid country code in this
case to fix a crash.

Fixes paper-plane-developers#559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants