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

thread 'main' panicked at 'str::ToGlibPtr<*const c_char>: unexpected '' #15

Open
icepie opened this issue Jun 8, 2022 · 7 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@icepie
Copy link

icepie commented Jun 8, 2022

日志

thread 'main' panicked at 'str::ToGlibPtr<*const c_char>: unexpected '' character: NulError(32, [10, 17, 18, 15, 230, 182, 144, 226, 149, 176, 229, 164, 167, 231, 153, 189, 232, 143, 156, 10, 10, 10, 8, 37, 196, 128, 196, 128, 7, 195, 153, 16, 0])', /home/icepie/.cargo/git/checkouts/gtk-rs-core-7be42ca38bd6361c/41d9307/glib/src/translate.rs:509:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

复现方式

貌似收到某些消息, 就会 panic

补充

RUST_BACKTRACE=1 的时候还没遇到, 等它再 panic 我就放上来

@icepie
Copy link
Author

icepie commented Jun 8, 2022

RUST_BACKTRACE=1

thread 'main' panicked at 'str::ToGlibPtr<*const c_char>: unexpected '' character: NulError(28, [10, 11, 10, 9, 38, 195, 191, 195, 191, 93, 226, 128, 162, 10, 12, 18, 10, 32, 230, 161, 131, 230, 161, 131, 233, 133, 177, 16, 0])', /home/icepie/.cargo/git/checkouts/gtk-rs-core-7be42ca38bd6361c/41d9307/glib/src/translate.rs:509:32
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4dd8b420c027001e47b0d811a7e55e2fe1de1395/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/4dd8b420c027001e47b0d811a7e55e2fe1de1395/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/4dd8b420c027001e47b0d811a7e55e2fe1de1395/library/core/src/result.rs:1785:5
   3: libadwaita::auto::avatar::Avatar::set_text
   4: relm4::factory::collections::vec_deque::FactoryVecDeque<Widget,C,ParentMsg>::render_changes
   5: gtk_qq::app::main::chatroom::Chatroom::push_message
   6: relm4::component::traits::Component::update_with_view
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   8: glib::main_context_futures::TaskSource::dispatch
   9: g_main_context_dispatch
  10: <unknown>
  11: g_main_context_iteration
  12: g_application_run
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  14: gtk_qq::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@lomirus lomirus added the bug Something isn't working label Jun 8, 2022
@lomirus
Copy link
Owner

lomirus commented Jun 8, 2022

疑似为好友/群友的昵称/备注/群名片问题,能提供一下导致程序 panic 的消息的发送者的昵称相关信息吗

@icepie
Copy link
Author

icepie commented Jun 8, 2022

这个不好知道...因为不确定什么时候触发

@icepie
Copy link
Author

icepie commented Jun 8, 2022

或许可以录制一下窗口

@lomirus
Copy link
Owner

lomirus commented Jun 8, 2022

如果录制窗口的话,导致 panic 的消息并不会渲染到屏幕上,因此并没有什么用。

你可以试着当程序 panic 的时候在手机等其他客户端上检查收到了谁的消息(如果实在是消息数量太多以至于不方便查找的话,我可以开一个 debug branch 把收到的消息打印到控制台上)

@icepie
Copy link
Author

icepie commented Jun 8, 2022

如果录制窗口的话,导致 panic 的消息并不会渲染到屏幕上,因此并没有什么用。

你可以试着当程序 panic 的时候在手机等其他客户端上检查收到了谁的消息(如果实在是消息数量太多以至于不方便查找的话,我可以开一个 debug branch 把收到的消息打印到控制台上)

观察了一下下载群成员头像的地址, 感觉是这个群昵称的问题

Termux-Zero技术社区①    [活跃]

@icepie
Copy link
Author

icepie commented Jun 8, 2022

好像又不是因为它...

@lomirus lomirus added the help wanted Extra attention is needed label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants