[SailfishOS] Whisperfish crashes when sending an attachment with no filename extension
Today I noticed that images need to have a .jpeg or similar type of suffix to be sent successfully. I was having difficulties sending one particular photo to my friend, until I renamed it from picture to
picture.jpg
. [...] Whisperfish hangs the message and needs to be rebooted to send any new messages.
Reproduced with a renamed `Näyttökuva_20220810_001.png" to Näyttökuva_20220810_002" and trying to send it (to myself) using attaching a file -> pictures -> file.
thread 'main' paniced
[D] sendTypingToHeader:70 - onTypingChanged for 10 : []
[2022-09-18T13:25:57Z TRACE harbour_whisperfish::store] Called mark_session_read(10)
[D] sendTypingToHeader:70 - onTypingChanged for 10 : []
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::actor::messageactor] MessageActor::handle(QueueMessage { recipient: "+358xxx", message: "", attachment: "/home/defaultuser/Pictures/Screenshots/Näyttökuva_20220810_002" })
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::store] Called fetch_or_insert_session_by_recipient_id(1)
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::store] Called fetch__session_by_recipient_id(1)
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::store] Called create_message(..) for session XX
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::store] Creating message for timestamp 2022-09-18 13:25:58.378
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::store] Called mark_session_archived(XX, false)
[2022-09-18T13:25:58Z TRACE harbour_whisperfish::store] Inserted message id NNNNN
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: MailboxError(Mailbox has closed)', /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/core/src/ops/function.rs:227:5
Backtrace (src/worker/client.rs:955:30)
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/worker/client.rs:955:30
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: <harbour_whisperfish::worker::client::ClientActor as actix::handler::Handler<harbour_whisperfish::worker::client::SendMessage>>::handle::{{closure}}
4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
5: <actix::fut::future::map::Map<Fut,F> as actix::fut::future::ActorFuture<A>>::poll
6: <actix::fut::future::map::Map<Fut,F> as actix::fut::future::ActorFuture<A>>::poll
7: <actix::contextimpl::ContextFut<A,C> as core::future::future::Future>::poll
8: tokio::runtime::task::core::CoreStage<T>::poll
9: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
10: std::panicking::try
11: tokio::runtime::task::harness::Harness<T,S>::poll
12: std::thread::local::LocalKey<T>::with
13: tokio::task::local::LocalSet::tick
14: std::thread::local::LocalKey<T>::with
15: <tokio::task::local::LocalSet as core::future::future::Future>::poll
16: std::thread::local::LocalKey<T>::with
17: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
18: ProcessQtEvent
19: _ZN5Waker11customEventEP6QEvent
20: _ZN7QObject5eventEP6QEvent
21: _ZN16QCoreApplication6notifyEP7QObjectP6QEvent
22: _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent
23: _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
24: <unknown>
25: g_main_context_dispatch
26: <unknown>
27: g_main_context_iteration
28: _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
29: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE
30: _ZN16QCoreApplication4execEv
31: sailors::sailfishapp::QmlApp::exec
32: std::thread::local::LocalKey<T>::with
33: qmeta_async::run
34: harbour_whisperfish::gui::run
35: harbour_whisperfish::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: MailboxError(Mailbox has closed)', /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/core/src/ops/function.rs:227:5
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: <T as futures_util::fns::FnOnce1<A>>::call_once
4: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
5: tokio::runtime::task::core::CoreStage<T>::poll
6: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
7: std::panicking::try
8: tokio::runtime::task::harness::Harness<T,S>::poll
9: std::thread::local::LocalKey<T>::with
10: tokio::task::local::LocalSet::tick
11: std::thread::local::LocalKey<T>::with
12: <tokio::task::local::LocalSet as core::future::future::Future>::poll
13: std::thread::local::LocalKey<T>::with
14: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
15: ProcessQtEvent
16: _ZN5Waker11customEventEP6QEvent
17: _ZN7QObject5eventEP6QEvent
18: _ZN16QCoreApplication6notifyEP7QObjectP6QEvent
19: _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent
20: _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
21: <unknown>
22: g_main_context_dispatch
23: <unknown>
24: g_main_context_iteration
25: _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
26: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE
27: _ZN16QCoreApplication4execEv
28: sailors::sailfishapp::QmlApp::exec
29: std::thread::local::LocalKey<T>::with
30: qmeta_async::run
31: harbour_whisperfish::gui::run
32: harbour_whisperfish::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace
The message appears with attachment (expected) but no thumbnail (kinda expected?)
Additionally, when deleting the message above, Whisperfish segfaults at shutdown:
harbour-whisperfish terminated by signal SIGSEGV
[2022-09-18T13:26:41Z TRACE harbour_whisperfish::model::message] Dispatched actor::DeleteMessage(NNNNN, 1)
[2022-09-18T13:26:41Z TRACE harbour_whisperfish::store] Called delete_message(NNNNN)
[2022-09-18T13:26:41Z TRACE harbour_whisperfish::store] DELETE FROM `messages` WHERE `messages`.`id` = ? -- binds: [NNNNN]
[2022-09-18T13:26:41Z TRACE harbour_whisperfish::model::message] handle_delete_message(NNNNN) deleted 1 rows, remove qml idx 1
[W] unknown:15 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:15: TypeError: Cannot read property 'count' of null
[W] unknown:18 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:18: TypeError: Cannot read property 'count' of null
[W] unknown:60 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:60: TypeError: Cannot read property 'count' of null
[W] unknown:17 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:17: TypeError: Cannot read property 'count' of null
[W] unknown:18 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:18: TypeError: Cannot read property 'count' of null
[W] unknown:276 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:276: TypeError: Cannot read property 'count' of null
[W] unknown:288 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:288: TypeError: Cannot read property 'count' of null
[W] unknown:261 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:261: TypeError: Cannot read property 'count' of null
[W] unknown:247 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:247: TypeError: Cannot read property 'count' of null
[W] unknown:248 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:248: TypeError: Cannot read property 'count' of null
fish: Job 1, 'QT_LOGGING_TO_CONSOLE=1 harbour…' terminated by signal SIGSEGV (Address boundary error)
Backtrace (rustc-1.52.1-src/library/std/src/thread/local.rs:248:26)
[2022-09-18T13:58:14Z TRACE harbour_whisperfish::model::message] Dispatched actor::DeleteMessage(NNNNN, 0)
[2022-09-18T13:58:14Z TRACE harbour_whisperfish::store] Called delete_message(NNNNN)
[2022-09-18T13:58:14Z TRACE harbour_whisperfish::store] DELETE FROM `messages` WHERE `messages`.`id` = ? -- binds: [23193]
[2022-09-18T13:58:14Z TRACE harbour_whisperfish::model::message] handle_delete_message(NNNNN) deleted 1 rows, remove qml idx 0
[W] unknown:15 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:15: TypeError: Cannot read property 'count' of null
[W] unknown:18 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:18: TypeError: Cannot read property 'count' of null
[W] unknown:60 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:60: TypeError: Cannot read property 'count' of null
[W] unknown:17 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:17: TypeError: Cannot read property 'count' of null
[W] unknown:18 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:18: TypeError: Cannot read property 'count' of null
[W] unknown:276 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:276: TypeError: Cannot read property 'count' of null
[W] unknown:288 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:288: TypeError: Cannot read property 'count' of null
[W] unknown:261 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:261: TypeError: Cannot read property 'count' of null
[W] unknown:247 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:247: TypeError: Cannot read property 'count' of null
[W] unknown:248 - file:///usr/share/harbour-whisperfish/qml/components/message/AttachmentsLoader.qml:248: TypeError: Cannot read property 'count' of null
[2022-09-18T13:58:18Z INFO harbour_whisperfish] Shut down.
thread 'main' panicked at 'cannot access a Thread Local Storage value during or after destruction: AccessError', /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/thread/local.rs:248:26
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: std::thread::local::LocalKey<T>::with
4: tokio::task::local::<impl tokio::runtime::task::Schedule for alloc::sync::Arc<tokio::task::local::Shared>>::release
5: tokio::runtime::task::harness::Harness<T,S>::complete
6: tokio::runtime::task::harness::Harness<T,S>::shutdown
7: tokio::runtime::task::list::LocalOwnedTasks<S>::close_and_shutdown_all
8: <tokio::task::local::LocalSet as core::ops::drop::Drop>::drop::{{closure}}
9: <tokio::task::local::LocalSet as core::ops::drop::Drop>::drop
10: std::thread::local::fast::destroy_value
11: __call_tls_dtors
12: <unknown>
13: exit
14: __libc_start_main
15: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
fatal runtime error: failed to initiate panic, error 2401444448
Redirecting call to abort() to mozalloc_abort
fish: Job 1, 'QT_LOGGING_TO_CONSOLE=1 RUST_BA…' terminated by signal SIGSEGV (Address boundary error)
Edited by Matti Viljanen