~anteater/mms-stack-bugs#74: 
Could not determine country of subscriber phone number on ModemManager

Attempting to run vgmms on my PinePhone results in vgmms crashing immediately

❯ RUST_BACKTRACE=full vgmms
thread 'main' panicked at 'could not determine country of subscriber phone number', src/state.rs:464:14
stack backtrace:
   0:     0xaaaad0394c6c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0abdaf351060f472
   1:     0xaaaad03b0e04 - core::fmt::write::h718bf4a1a458f8e7
   2:     0xaaaad0392354 - std::io::Write::write_fmt::h3c112e91315c8b3f
   3:     0xaaaad0396bf8 - std::panicking::default_hook::{{closure}}::hb10d02d7b31561f3
   4:     0xaaaad0396710 - std::panicking::default_hook::ha708ea2379fd3fe3
   5:     0xaaaad03971d8 - std::panicking::rust_panic_with_hook::h74a333325fd91970
   6:     0xaaaad0396d88 - std::panicking::begin_panic_handler::{{closure}}::hf9fdc9617b532a12
   7:     0xaaaad03950ec - std::sys_common::backtrace::__rust_end_short_backtrace::h27648b4105fb11a4
   8:     0xaaaad0396cf0 - rust_begin_unwind
   9:     0xaaaad01a57d8 - core::panicking::panic_fmt::h3ed05079b492a2c4
  10:     0xaaaad01a5724 - core::option::expect_failed::h0172d9425723555f
  11:     0xaaaad02501a0 - <vgmms::state::VgmmsState as core::default::Default>::default::h0d611ea9b24d87a7
  12:     0xaaaad01e61ac - <std::sync::rwlock::RwLock<T> as core::default::Default>::default::h4f5d4f4652ee70c9
  13:     0xaaaad01d3bb4 - vgtk::component::PartialComponentTask<C,P>::new::h0a2e808914ea521a
  14:     0xaaaad022e168 - vgtk::start::hfd14612066e358ee
  15:     0xaaaad021cda8 - vgmms::main::h364e11a520e2c6f0
  16:     0xaaaad0253eb0 - std::sys_common::backtrace::__rust_begin_short_backtrace::h20159f93a0560bee
  17:     0xaaaad01fb7c8 - std::rt::lang_start::{{closure}}::h5366e7fb8ef2d180
  18:     0xaaaad03974e8 - std::rt::lang_start_internal::h26dc693b11227bbb
  19:     0xaaaad021d47c - main
  20:     0xffffab453538 - __libc_start_main
  21:     0xaaaad01a5d54 - <unknown>
Status
REPORTED
Submitter
~ccf100
Assigned to
No-one
Submitted
3 years ago
Updated
2 years ago
Labels
vgmms

~anteater 3 years ago

This is strange. I've just added some debugging code to print what it thinks your number is at that point, so you can verify whether your number is at least what you expect.

If you aren't comfortable listing private information like your subscriber country in public, you can contact me privately at nt8r@protonmail.com.

~ccf100 3 years ago

I will email you the debug info

~anteater 3 years ago

I never received an e-mail, but I did think more about this. Does your number or area code begin with a 0? It's possible vgmms' handling of leading zeroes is incorrect.

~ccf100 3 years ago

My area code is +1 (337)

~ccf100 3 years ago

After compiling commit ffaf37f6d60738e1c10c3cec2a8e40962087518b, Now it returns:

thread 'main' panicked at 'could not determine country of subscriber phone number 337#######', src/state.rs:494:14
stack backtrace:
   0:     0xaaaad59eba2c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h34ff4ffa0c6684b3
   1:     0xaaaad5a07724 - core::fmt::write::hf64ae5aa72af7afb
   2:     0xaaaad59e8e58 - std::io::Write::write_fmt::h98b951a49675a1ac
   3:     0xaaaad59ed94c - std::panicking::default_hook::{{closure}}::h4620c808db6dbc54
   4:     0xaaaad59ed464 - std::panicking::default_hook::hb319646754a63c80
   5:     0xaaaad59edfb0 - std::panicking::rust_panic_with_hook::h5d8c02eb6cc5c4c1
   6:     0xaaaad59edadc - std::panicking::begin_panic_handler::{{closure}}::hb554d531f2c9a6a4
   7:     0xaaaad59ebec8 - std::sys_common::backtrace::__rust_end_short_backtrace::h4c289d752e92acd9
   8:     0xaaaad59eda44 - rust_begin_unwind
   9:     0xaaaad57f5df0 - core::panicking::panic_fmt::h79cae306732cd667
  10:     0xaaaad57f5d3c - core::option::expect_failed::h39c2c9b476b2336e
  11:     0xaaaad588acdc - <vgmms::state::VgmmsState as core::default::Default>::default::h11b71a53f62f561e
  12:     0xaaaad58b6244 - <alloc::sync::Arc<T> as core::default::Default>::default::h807760eef3769c17
  13:     0xaaaad5825308 - vgtk::component::PartialComponentTask<C,P>::new::hadc8eea273cca47b
  14:     0xaaaad587f934 - vgtk::start::h8f26c2bba35d5e43
  15:     0xaaaad587136c - vgmms::main::h6dd37d3bd65b9bdd
  16:     0xaaaad583f6e8 - std::sys_common::backtrace::__rust_begin_short_backtrace::hab7a0de9c96e8015
  17:     0xaaaad5857698 - std::rt::lang_start::{{closure}}::hee544b4f0fe737ea
  18:     0xaaaad59ee36c - std::rt::lang_start_internal::h0c0b6d2539b89d6e
  19:     0xaaaad5871a44 - main
  20:     0xffff9a714538 - __libc_start_main
  21:     0xaaaad57f63c8 - <unknown>

~ccf100 3 years ago*

I replaced my number with #'s, leaving the area code intact

~anteater 2 years ago

I haven't gotten around to vgmms maintenance in quite some time, but now that I look at your follow-up, the problem is clear: the number as returned from the modem has no country code! We currently obtain the default country for parsing other numbers from the user's number, but in this case we'll need to have a further fallback source of the information. A user could specify a default country in settings, or there may be a locale-based way to default things.

~anteater 2 years ago

~ccf100: Are you using ofono or ModemManager?

Register here or Log in to comment, or comment via email.