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 on launch (macOS) #109

Closed
toffaletti opened this issue Mar 19, 2023 · 25 comments
Closed

thread 'main' panicked on launch (macOS) #109

toffaletti opened this issue Mar 19, 2023 · 25 comments
Labels
bug Something isn't working macOS Something related to macOS operating system renderer Problem related to the renderer used by the GUI library
Milestone

Comments

@toffaletti
Copy link

Describe the bug
sniffnet panics immediately on launch on MacBook Pro w/ M1 Pro

To Reproduce
Describe steps to reproduce the bug, e.g.:

❯ RUST_BACKTRACE=full sniffnet

  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.1.2  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
thread 'main' panicked at '', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.14.1/src/metal/adapter.rs:485:13
stack backtrace:
   0:        0x10271bf6c - __mh_execute_header
   1:        0x102469748 - __mh_execute_header
   2:        0x102701d94 - __mh_execute_header
   3:        0x10271bcc4 - __mh_execute_header
   4:        0x10270c3fc - __mh_execute_header
   5:        0x10270c0dc - __mh_execute_header
   6:        0x10244bb80 - __mh_execute_header
   7:        0x10270cb7c - __mh_execute_header
   8:        0x10271c63c - __mh_execute_header
   9:        0x10271c5ac - __mh_execute_header
  10:        0x10270c7cc - __mh_execute_header
  11:        0x1028206c8 - __mh_execute_header
  12:        0x1027f1314 - __mh_execute_header
  13:        0x1027fe5f8 - __mh_execute_header
  14:        0x1027fb32c - __mh_execute_header
  15:        0x1024361a8 - __mh_execute_header
  16:        0x1026af910 - __mh_execute_header
  17:        0x10244ab30 - __mh_execute_header
  18:        0x102686da8 - __mh_execute_header
  19:        0x10244de20 - __mh_execute_header

Desktop (please complete the following information):

  • OS: macOS 13.3
@GyulyVGC
Copy link
Owner

It seems a problem related with your graphical adapter.
Metal is supported by the library I used for the GUI, so I'm struggling to figure out why you receive this error.

@GyulyVGC GyulyVGC added renderer Problem related to the renderer used by the GUI library bug Something isn't working labels Mar 19, 2023
@exomaniac
Copy link

exomaniac commented Apr 4, 2023

same for me. Macbook Pro 16" m2Max.
Installed via Homebrew

`
RUST_BACKTRACE=full sniffnet

/---------------------------------------------------------
| _____ _ __ __ _ |
| / | () / | / | | | |
| | (
_ __ _ | |
| |
_ __ ___ | |_ |
| ___ \ | '_ \ | | | | | | | ' \ / _ \ | | |
| ____) | | | | | | | | | | | | | | | | / | | |
| |
__/ |
| || || || || || || _| __| |
| |
| ___________ |
| /
\ |
| | ___________ | |
| | | | | |
| | | v1.1.2 | | |
| | |
| |________________________ |
| _/ by Giuliano Bellini ) |
| / ''''''''''' \ / |
| / ::::::::::::: \ =D-' |
| (
) |
_
___________________________________________________/
thread 'main' panicked at '', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.14.1/src/metal/adapter.rs:485:13
stack backtrace:
0: 0x100a4ff6c - __mh_execute_header
1: 0x10079d748 - __mh_execute_header
2: 0x100a35d94 - __mh_execute_header
3: 0x100a4fcc4 - __mh_execute_header
4: 0x100a403fc - __mh_execute_header
5: 0x100a400dc - __mh_execute_header
6: 0x10077fb80 - __mh_execute_header
7: 0x100a40b7c - __mh_execute_header
8: 0x100a5063c - __mh_execute_header
9: 0x100a505ac - __mh_execute_header
10: 0x100a407cc - __mh_execute_header
11: 0x100b546c8 - __mh_execute_header
12: 0x100b25314 - __mh_execute_header
13: 0x100b325f8 - __mh_execute_header
14: 0x100b2f32c - __mh_execute_header
15: 0x10076a1a8 - __mh_execute_header
16: 0x1009e3910 - __mh_execute_header
17: 0x10077eb30 - __mh_execute_header
18: 0x1009bada8 - __mh_execute_header
19: 0x100781e20 - __mh_execute_header`

@GyulyVGC
Copy link
Owner

GyulyVGC commented Apr 4, 2023

May I ask how did you guys install the app? Cargo, disk image, or Homebrew? @toffaletti @exomaniac

@exomaniac
Copy link

@GyulyVGC of course. Installed via homebrew. Thank you for your work!

@GyulyVGC
Copy link
Owner

GyulyVGC commented Apr 4, 2023

@GyulyVGC of course. Installed via homebrew. Thank you for your work!

I just noticed you already mentioned it in the previous message, sorry for having asked again.
I think that even the person who originally opened the issue had it installed via Homebrew.
I don't think it's due to how the Homebrew team packaged Sniffnet, but if you could try downloading it via cargo or dmg it'd be nice.
In the meantime, I'll do some research.

@exomaniac
Copy link

I just did a build myself. This runs fine. ill try the other options also

@GyulyVGC
Copy link
Owner

GyulyVGC commented Apr 4, 2023

I just did a build myself. This runs fine. ill try the other options also

Oh, that's nice to know. I guess it's a problem related with the brew package then.
I will contact them!
Thank you very much.

@exomaniac
Copy link

No Problem. The .dmg from the github release also works fine

@chenrui333
Copy link

This issue looks similar to this one, gfx-rs/wgpu#3556

If you run release build against the latest artifact, you can see the same thing

$ RUST_BACKTRACE=full cargo run --release
    Finished release [optimized] target(s) in 0.47s
     Running `target/release/sniffnet`
...

thread 'main' panicked at '', /Users/rui/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.14.1/src/metal/adapter.rs:485:13
stack backtrace:
   0:        0x1005540e0 - __mh_execute_header

@chenrui333
Copy link

Also looks like iced is not using latest wgpu dependency, not quite sure why.

@adwhit
Copy link

adwhit commented Apr 12, 2023

I just tried to run in the most naive way possible -

git clone git clone https://github.com/GyulyVGC/sniffnet
cd sniffnet
cargo run --release

... and I got the little ascii art intro followed by an instant segfault. I didn't really expect it to work but I didn't expect that.

Runing: macOS Monterey v12.6.3, commit: d383aa8

@chenrui333
Copy link

chenrui333 commented Apr 12, 2023

yeah, that happened to me as well. I believe that is a wgpu issue.

@GyulyVGC
Copy link
Owner

Hopefully this problem will be solved with the next release of iced (see here)

@GyulyVGC GyulyVGC changed the title thread 'main' panicked on launch thread 'main' panicked on launch (macOS) Apr 13, 2023
@GyulyVGC
Copy link
Owner

Could you guys kindly try if the main branch now works?
Iced has been updated together with wgpu and this may solve the issue.

@adwhit
Copy link

adwhit commented Apr 14, 2023

Working for me now 👍

@GyulyVGC
Copy link
Owner

Working for me now 👍

Amazing.
If @chenrui333 confirms as well, I'll publish a new release next week so that the brew package will work well again.

@ElhamAryanpur
Copy link

ElhamAryanpur commented Apr 14, 2023

Ayy glad its working!

Love the sniffnet

@igorclark
Copy link

Hello! FYI I installed just now with cargo install sniffnet and got the same error on macOS 13.3/M1 Pro. I'm not a Rust person so I'm not sure but maybe this is because a cargo registry needs to be updated with the fixed version, or something like that? Anyway, no big problem, just trying it out, but reporting in case it's useful. Cheers :-)

$ RUST_BACKTRACE=full sniffnet

  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.1.3  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
thread 'main' panicked at '', /Users/igor/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.14.1/src/metal/adapter.rs:485:13
stack backtrace:
   0:        0x102a52c80 - __mh_execute_header
   1:        0x1026e4e60 - __mh_execute_header
   2:        0x102a38c44 - __mh_execute_header
   3:        0x102a529d8 - __mh_execute_header
   4:        0x102a432a0 - __mh_execute_header
   5:        0x102a42f80 - __mh_execute_header
   6:        0x102a2c4f0 - __mh_execute_header
   7:        0x102a43a20 - __mh_execute_header
   8:        0x102a53350 - __mh_execute_header
   9:        0x102a532c0 - __mh_execute_header
  10:        0x102a43670 - __mh_execute_header
  11:        0x102b666e8 - __mh_execute_header
  12:        0x102b3732c - __mh_execute_header
  13:        0x102b446dc - __mh_execute_header
  14:        0x102b41410 - __mh_execute_header
  15:        0x102995b1c - __mh_execute_header
  16:        0x102998d38 - __mh_execute_header
  17:        0x102a2aee8 - __mh_execute_header
  18:        0x1026a6d54 - __mh_execute_header
  19:        0x102a27b44 - __mh_execute_header

@GyulyVGC
Copy link
Owner

GyulyVGC commented Apr 14, 2023

Hello! FYI I installed just now with cargo install sniffnet and got the same error on macOS 13.3/M1 Pro. I'm not a Rust person so I'm not sure but maybe this is because a cargo registry needs to be updated with the fixed version, or something like that? Anyway, no big problem, just trying it out, but reporting in case it's useful. Cheers :-)

Hi @igorclark.
Exactly. I'll update the version on crates in the next few days.
However, you can immediately use the last commit from GitHub by cloning the repo and building the app with

cargo run --release

@igorclark
Copy link

Ah, yep, that works great! Thanks, sorry for the noise 😬

@GyulyVGC
Copy link
Owner

Don't worry at all man! And thanks for the further confirmation that the issue has been fixed.
I'll close it once next version is released.

@GyulyVGC GyulyVGC added this to the v1.1.4 milestone Apr 15, 2023
@GyulyVGC
Copy link
Owner

A new release has just been published.
Thanks to you all guys for having pointed out the problem.
Closing the issue.

@chenrui333
Copy link

Hopefully this problem will be solved with the next release of iced (see here)

exactly what I was looking for :), thanks @GyulyVGC!

@GyulyVGC
Copy link
Owner

Hopefully this problem will be solved with the next release of iced (see here)

exactly what I was looking for :), thanks @GyulyVGC!

Awesome. And thanks!

@chenrui333
Copy link

I will help out with some linkage test failures with this formula upgrade PR, and we should be good to go from there. :)

@GyulyVGC GyulyVGC added the macOS Something related to macOS operating system label May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Something related to macOS operating system renderer Problem related to the renderer used by the GUI library
Projects
None yet
Development

No branches or pull requests

7 participants