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 when opening applications #2351

Open
leafi opened this issue May 10, 2024 · 3 comments
Open

Crash when opening applications #2351

leafi opened this issue May 10, 2024 · 3 comments
Labels
Milestone

Comments

@leafi
Copy link

leafi commented May 10, 2024

Describe the bug
After a recent Arch Linux system update (a range of packages, inc. gcc & glibc), I can no longer launch any graphical programs in Wayfire without Wayfire crashing.

wf-shell autolaunch works without issue.

I moved to latest master via the AUR arch linux packages (wf-config-git, wayfire-git, wayfire-plugins-extra-git, wf-shell-git) to see if any recent bug fixes fixed this, and when they didn't, I added the debugging options (sanitizer, debug) + makepkg options (debug !strip) to try and get a backtrace with actual information.

To Reproduce
Steps to reproduce the behavior:

  1. Start Wayfire as usual
  2. Launch alacritty via Super+Enter, or launch the GNOME file manager by clicking on its wf-panel icon, or launch gVim from the wf-panel application menu
  3. Wayfire crashes with a memory error in transaction-manager in Wayfire

Expected behavior
No crash, yes program!

Screenshots or stacktrace

The attached log file was created with Wayfire via a nested session, which seems to behave identically to running on bare metal for this issue.

wayfire.log

Excerpt(s):

II 10-05-24 18:02:36.480 - [src/view/xdg-shell/xdg-toplevel-view.cpp:29] new xdg_shell_stable surface: Alacritty app-id: Alacritty
=================================================================
==216079==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x5020000bdc88 at pc 0x601b7d18c487 bp 0x7ffe23b504d0 sp 0x7ffe23b504c0
READ of size 8 at 0x5020000bdc88 thread T0
    #0 0x601b7d18c486 in std::unique_ptr<wf::txn::transaction_t, std::default_delete<wf::txn::transaction_t> >::~unique_ptr() /usr/include/c++/14.1.1/bits/unique_ptr.h:397
...
    #5 0x601b7d1992d4 in wf::txn::transaction_manager_t::impl::on_tx_apply::{lambda(wf::txn::transaction_applied_signal*)#1}::operator()(wf::txn::transaction_applied_signal*) const ../src/core/txn/transaction-manager-impl.hpp:127
    #6 0x601b7d1992d4 in void std::__invoke_impl<void, wf::txn::transaction_manager_t::impl::on_tx_apply::{lambda(wf::txn::transaction_applied_signal*)#1}&, wf::txn::transaction_applied_signal*>(std::__invoke_other, wf::txn::transaction_manager_t::impl::on_tx_apply::{lambda(wf::txn::transaction_applied_signal*)#1}&, wf::txn::transaction_applied_signal*&&) /usr/include/c++/14.1.1/bits/invoke.h:61
...
    #10 0x601b7d1480a0 in wf::signal::connection_t<wf::txn::transaction_applied_signal>::emit(wf::txn::transaction_applied_signal*) ../src/api/wayfire/signal-provider.hpp:107
...
    #16 0x601b7ce208d4 in wf::safe_list_t<wf::signal::connection_base_t*>::for_each(std::function<void (wf::signal::connection_base_t*&)>) ../src/api/wayfire/nonstd/safe-list.hpp:78
    #17 0x601b7d13f828 in void wf::signal::provider_t::emit<wf::txn::transaction_applied_signal>(wf::txn::transaction_applied_signal*) ../src/api/wayfire/signal-provider.hpp:159
    #18 0x601b7d13f828 in wf::txn::transaction_t::apply(bool) ../src/core/txn/transaction.cpp:77
    #19 0x601b7cdebfb0 in std::function<void ()>::operator()() const /usr/include/c++/14.1.1/bits/std_function.h:591
    #20 0x601b7cdebfb0 in wf::wl_timer<false>::set_timeout(unsigned int, std::function<void ()>) ../src/util.cpp:108
    #21 0x601b7d1493cf in wayfire_default_transaction_t::get_timer_setter()::{lambda(unsigned long, std::function<void ()>)#1}::operator()(unsigned long, std::function<void ()>) const ../src/core/txn/transaction.cpp:95
...
    #26 0x601b7d141a4a in wf::txn::transaction_t::commit() ../src/core/txn/transaction.cpp:57
    #27 0x601b7d191483 in wf::txn::transaction_manager_t::impl::do_commit(std::unique_ptr<wf::txn::transaction_t, std::default_delete<wf::txn::transaction_t> >) ../src/core/txn/transaction-manager-impl.hpp:109
    #28 0x601b7d191483 in wf::txn::transaction_manager_t::impl::consider_commit() ../src/core/txn/transaction-manager-impl.hpp:86
    #29 0x601b7d199350 in wf::txn::transaction_manager_t::impl::on_tx_apply::{lambda(wf::txn::transaction_applied_signal*)#1}::operator()(wf::txn::transaction_applied_signal*) const ../src/core/txn/transaction-manager-impl.hpp:128
...

and, er, a LOT more stack frames.

SUMMARY: AddressSanitizer: heap-buffer-overflow /usr/include/c++/14.1.1/bits/unique_ptr.h:397 in std::unique_ptr<wf::txn::transaction_t, std::default_delete<wf::txn::transaction_t> >::~unique_ptr()

Wayfire version
Latest git master.

The wayfire-git package seems to use a Meson-selected version of wlroots, and builds that with Wayfire.

Other notes
I have no idea how my system update made Wayfire go from the relevant code portion always working, to never working. The updated libraries have pretty much nothing to do with graphics or the desktop at all.

Please send help.

@leafi leafi added the bug label May 10, 2024
@ammen99
Copy link
Member

ammen99 commented May 10, 2024

It would be nice to upload a full stacktrace/log from Wayfire, it might show something more.

@leafi
Copy link
Author

leafi commented May 10, 2024

Hey @ammen99, I did try to attach a full log. Try the "wayfire.log" link in the middle of my original message - I think that's it

@ammen99
Copy link
Member

ammen99 commented May 10, 2024

Hey @ammen99, I did try to attach a full log. Try the "wayfire.log" link in the middle of my original message - I think that's it

Oh sorry I missed that, I'll take a look.

@ammen99 ammen99 modified the milestones: 0.10, 0.9 May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants