OpenByteDev / burnt-sushi

Spotify AdBlocker for Windows
MIT License
274 stars 10 forks source link

Closes immediately after startup (v0.3.1) #15

Closed insaneinvader closed 4 months ago

insaneinvader commented 7 months ago

So I run the app from PowerShell and the output is:

PS C:\Program Files\OpenByte\BurntSushi> .\BurntSushi.exe
PS C:\Program Files\OpenByte\BurntSushi> [DEBUG] Attached to console
[INFO] BurntSushi v0.3.1
[INFO] Looking for Spotify...
thread 'main' panicked at src\blocker.rs:52:17:
internal error: entered unreachable code: Spotify scanner should never stop on its own
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The content of the log file is:

2024-03-27 20:42:47 [INFO] BurntSushi v0.3.1
2024-03-27 20:42:47 [INFO] Looking for Spotify...
2024-03-27 20:42:47 [INFO] No new release found

The solution is:

Just run the app with administrator privileges and it works fine. Human-readable feedback from the app would be appreciated, e.g.: "Administrator privileges required." Maybe a note in the readme file will suffice.

OpenByteDev commented 7 months ago

It isnt mentioned in the readme as administrator priviledges shouldnt be required. I am surprised that it fixes your issues...

OpenByteDev commented 7 months ago

Can you try again with .\BurntSushi.exe --log-level trace

OpenByteDev commented 7 months ago

Do you have Spotify installed via the Windows Store?

insaneinvader commented 7 months ago

I've run the app with the .\BurntSushi.exe --log-level trace command and the terminal output is the same:

PS C:\Program Files\OpenByte\BurntSushi> [DEBUG] Attached to console
[INFO] BurntSushi v0.3.1
[TRACE] Running from C:\Program Files\OpenByte\BurntSushi\BurntSushi.exe
[INFO] Looking for Spotify...
[INFO] No new release found
thread 'main' panicked at src\blocker.rs:52:17:
internal error: entered unreachable code: Spotify scanner should never stop on its own
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

but the log file was not created at all.

The Spotify is installed from the MS Store but is not running.

insaneinvader commented 7 months ago

After restarting Windows and updating all MS Store apps, the problem completely disappeared to the point where I can't reproduce it. I've restarted the system and reinstalled the blocker app several times over the last few days and the problem still persists. Spotify update seems to have finally helped.

guihkx commented 7 months ago

I have the same issue (or a similar one).

BurntSushi is set to run at startup, but I disabled that behavior for Spotify (which I installed via the MS app store).

For me, the crash is easily reproducible:

  1. Make sure Spotify is not running
  2. Launch BurntSushi
  3. Launch the Task Manager

Can you try again with .\BurntSushi.exe --log-level trace

That didn't give much information due to lack of debugging symbols, unfortunately:

> $env:RUST_BACKTRACE = 'full'
> .\BurntSushi.exe --log-level trace
[DEBUG] Attached to console
[INFO] BurntSushi v0.3.1
[TRACE] Running from C:\Program Files\OpenByte\BurntSushi\BurntSushi.exe
[INFO] Looking for Spotify...
[INFO] No new release found
thread 'main' panicked at src\blocker.rs:52:17:
internal error: entered unreachable code: Spotify scanner should never stop on its own
stack backtrace:
   0:     0x7ff6aeba93e9 - <unknown>
   1:     0x7ff6ae989fad - <unknown>
   2:     0x7ff6aeb8d421 - <unknown>
   3:     0x7ff6aebaa96a - <unknown>
   4:     0x7ff6aebaa739 - <unknown>
   5:     0x7ff6aebab501 - <unknown>
   6:     0x7ff6aebaafbb - <unknown>
   7:     0x7ff6aebaaf39 - <unknown>
   8:     0x7ff6aebaaf26 - <unknown>
   9:     0x7ff6aec4cf17 - <unknown>
  10:     0x7ff6ae8d3d66 - <unknown>
  11:     0x7ff6ae8690df - <unknown>
  12:     0x7ff6ae886b65 - <unknown>
  13:     0x7ff6ae9064ed - <unknown>
  14:     0x7ff6ae87d7a7 - <unknown>
  15:     0x7ff6ae84e576 - <unknown>
  16:     0x7ff6ae87d1b5 - <unknown>
  17:     0x7ff6aec45dcc - <unknown>
  18:     0x7ffe0bef7344 - BaseThreadInitThunk
  19:     0x7ffe0cca26b1 - RtlUserThreadStart

Perhaps it'd be interesting to also provide .pdb files in upcoming releases.

guihkx commented 7 months ago

Here's a better stack trace:

stack backtrace:
   0:     0x7ff60e98501a - std::backtrace_rs::backtrace::dbghelp64::trace
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:99
   1:     0x7ff60e98501a - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff60e98501a - std::sys_common::backtrace::_print_fmt
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\sys_common\backtrace.rs:68
   3:     0x7ff60e98501a - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\sys_common\backtrace.rs:44
   4:     0x7ff60e9a80f9 - core::fmt::rt::Argument::fmt
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\core\src\fmt\rt.rs:142
   5:     0x7ff60e9a80f9 - core::fmt::write
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\core\src\fmt\mod.rs:1153
   6:     0x7ff60e980671 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\io\mod.rs:1843
   7:     0x7ff60e984e06 - std::sys_common::backtrace::print
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\sys_common\backtrace.rs:34
   8:     0x7ff60e986fb8 - std::panicking::default_hook::closure$1
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\panicking.rs:271
   9:     0x7ff60e986bfa - std::panicking::default_hook
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\panicking.rs:291
  10:     0x7ff60e9874fd - std::panicking::rust_panic_with_hook
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\panicking.rs:788
  11:     0x7ff60e98737b - std::panicking::begin_panic_handler::closure$0
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\panicking.rs:649
  12:     0x7ff60e98592f - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\sys_common\backtrace.rs:171
  13:     0x7ff60e987068 - std::panicking::begin_panic_handler
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\panicking.rs:645
  14:     0x7ff60e9c7c67 - core::panicking::panic_fmt
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\core\src\panicking.rs:72
  15:     0x7ff60dfeb434 - BurntSushi::blocker::impl$0::run::async_fn$0
                               at D:\a\burnt-sushi\burnt-sushi\burnt-sushi\src\blocker.rs:52
  16:     0x7ff60e02bb92 - BurntSushi::run::async_fn$0::closure$1
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\macros\select.rs:524
  17:     0x7ff60df9322f - tokio::future::poll_fn::impl$1::poll<enum2$<BurntSushi::run::async_fn$0::__tokio_select_util::Out<tuple$<>,enum2$<core::result::Result<tuple$<>,enum2$<ctrlc::error::Error> > >,tuple$<>,enum2$<core::result::Result<tuple$<>,tokio::sync::oneshot::error::Recv
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\future\poll_fn.rs:58
  18:     0x7ff60e027b44 - BurntSushi::run::async_fn$0
                               at D:\a\burnt-sushi\burnt-sushi\burnt-sushi\src\main.rs:153
  19:     0x7ff60e02aea1 - BurntSushi::main::async_block$0
                               at D:\a\burnt-sushi\burnt-sushi\burnt-sushi\src\main.rs:125
  20:     0x7ff60df02e96 - core::future::future::impl$1::poll<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > >
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\core\src\future\future.rs:123
  21:     0x7ff60dfc26a0 - tokio::runtime::scheduler::current_thread::impl$8::block_on::closure$0::closure$0::closure$0<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > > >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:659
  22:     0x7ff60dfc239b - tokio::runtime::coop::with_budget
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\coop.rs:107
  23:     0x7ff60dfc239b - tokio::runtime::coop::budget
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\coop.rs:73
  24:     0x7ff60dfc239b - tokio::runtime::scheduler::current_thread::impl$8::block_on::closure$0::closure$0<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > > >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:659
  25:     0x7ff60dfbff0b - tokio::runtime::scheduler::current_thread::Context::enter<enum2$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::scheduler::current_thread::impl$8::block_on::closure$0::closure_env$0<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0>
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:404
  26:     0x7ff60dfc1670 - tokio::runtime::scheduler::current_thread::impl$8::block_on::closure$0<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > > >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:658
  27:     0x7ff60dfc1400 - tokio::runtime::scheduler::current_thread::impl$8::enter::closure$0<tokio::runtime::scheduler::current_thread::impl$8::block_on::closure_env$0<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > > >,enum2$<core::option::Option<tuple$<> >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:737
  28:     0x7ff60e0766e6 - tokio::runtime::context::scoped::Scoped<enum2$<tokio::runtime::scheduler::Context> >::set<enum2$<tokio::runtime::scheduler::Context>,tokio::runtime::scheduler::current_thread::impl$8::enter::closure_env$0<tokio::runtime::scheduler::current_thread::impl$8:
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\context\scoped.rs:40
  29:     0x7ff60e03b085 - tokio::runtime::context::set_scheduler::closure$0<tuple$<alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core,alloc::alloc::Global>,enum2$<core::option::Option<tuple$<> > > >,tokio::runtime::scheduler::current_thread::impl$8::enter::closure_e
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\context.rs:176
  30:     0x7ff60df660b9 - std::thread::local::LocalKey<tokio::runtime::context::Context>::try_with<tokio::runtime::context::Context,tokio::runtime::context::set_scheduler::closure_env$0<tuple$<alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core,alloc::alloc::Global>,
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\std\src\thread\local.rs:284
  31:     0x7ff60df6523e - std::thread::local::LocalKey<tokio::runtime::context::Context>::with<tokio::runtime::context::Context,tokio::runtime::context::set_scheduler::closure_env$0<tuple$<alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core,alloc::alloc::Global>,enum
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\std\src\thread\local.rs:260
  32:     0x7ff60e03b030 - tokio::runtime::context::set_scheduler<tuple$<alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core,alloc::alloc::Global>,enum2$<core::option::Option<tuple$<> > > >,tokio::runtime::scheduler::current_thread::impl$8::enter::closure_env$0<tokio:
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\context.rs:176
  33:     0x7ff60dfc0e14 - tokio::runtime::scheduler::current_thread::CoreGuard::enter<tokio::runtime::scheduler::current_thread::impl$8::block_on::closure_env$0<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > > >,enum2$<core::option::Option<tuple$<> > > >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:737
  34:     0x7ff60dfc1433 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on<core::pin::Pin<ref_mut$<enum2$<BurntSushi::main::async_block_env$0> > > >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:646
  35:     0x7ff60dfbf528 - tokio::runtime::scheduler::current_thread::impl$0::block_on::closure$0<enum2$<BurntSushi::main::async_block_env$0> >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:175
  36:     0x7ff60df84077 - tokio::runtime::context::runtime::enter_runtime<tokio::runtime::scheduler::current_thread::impl$0::block_on::closure_env$0<enum2$<BurntSushi::main::async_block_env$0> >,tuple$<> >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\context\runtime.rs:65
  37:     0x7ff60dfbefe4 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on<enum2$<BurntSushi::main::async_block_env$0> >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\scheduler\current_thread\mod.rs:167
  38:     0x7ff60e076be1 - tokio::runtime::runtime::Runtime::block_on<enum2$<BurntSushi::main::async_block_env$0> >
                               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.36.0\src\runtime\runtime.rs:348
  39:     0x7ff60dfadbdd - BurntSushi::main
                               at D:\a\burnt-sushi\burnt-sushi\burnt-sushi\src\main.rs:88
  40:     0x7ff60e03e61b - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\core\src\ops\function.rs:250
  41:     0x7ff60df92efe - core::hint::black_box
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\core\src\hint.rs:338
  42:     0x7ff60df92efe - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\std\src\sys_common\backtrace.rs:155
  43:     0x7ff60dff9321 - std::rt::lang_start::closure$0<tuple$<> >
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\std\src\rt.rs:159
  44:     0x7ff60e978e75 - std::rt::lang_start_internal
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a/library\std\src\rt.rs:141
  45:     0x7ff60dff92fa - std::rt::lang_start<tuple$<> >
                               at /rustc/ab5bda1aa70f707014e2e691e43bc37a8819252a\library\std\src\rt.rs:158
  46:     0x7ff60dfadcb9 - main
  47:     0x7ff60e9c5490 - invoke_main
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  48:     0x7ff60e9c5490 - __scrt_common_main_seh
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  49:     0x7ffd8b127344 - BaseThreadInitThunk
  50:     0x7ffd8b2626b1 - RtlUserThreadStart
philippeop commented 4 months ago

If anyone encounters this issue, close Task Manager, BurntSushi will start normally

participle38 commented 4 months ago

I encountered this too, but I have the regular Windows version of Spotify downloaded from the Spotify website, not the MS Store version. BurntSushi only crashes if Spotify is not already running.


PS E:\portables> $env:RUST_BACKTRACE="full"
PS E:\portables> .\BurntSushi.exe --log-level trace
PS E:\portables> [DEBUG] Attached to console
[INFO] BurntSushi v0.3.1
[TRACE] Running from E:\portables\BurntSushi.exe
[INFO] Looking for Spotify...
[INFO] No new release found
thread 'main' panicked at src\blocker.rs:52:17:
internal error: entered unreachable code: Spotify scanner should never stop on its own
stack backtrace:
0:  0x7ff6d70293e9 - <unknown>
1:  0x7ff6d6e09fad - <unknown>
2:  0x7ff6d700d421 - <unknown>
3:  0x7ff6d702a96a - <unknown>
4:  0x7ff6d702a739 - <unknown>
5:  0x7ff6d702b501 - <unknown>
6:  0x7ff6d702afbb - <unknown>
7:  0x7ff6d702af39 - <unknown>
8:  0x7ff6d702af26 - <unknown>
9:  0x7ff6d70ccf17 - <unknown>
10:  0x7ff6d6d53d66 - <unknown>
11:  0x7ff6d6ce90df - <unknown>
12:  0x7ff6d6d06b65 - <unknown>
13:  0x7ff6d6d864ed - <unknown>
14:  0x7ff6d6cfd7a7 - <unknown>
15:  0x7ff6d6cce576 - <unknown>
16:  0x7ff6d6cfd1b5 - <unknown>
17:  0x7ff6d70c5dcc - <unknown>
18:  0x7ffb25867374 - BaseThreadInitThunk
19:  0x7ffb2755cc91 - RtlUserThreadStart