wwylele / mhrice

Monster Hunter Rise information website
http://mhrice.info
Apache License 2.0
106 stars 8 forks source link

getting "Segmentation fault" error when running commands #48

Closed xh-lin closed 5 months ago

xh-lin commented 5 months ago

hi, I'm getting "Segmentation fault" when running gen-resources. Does anyone know why? This is my log: gen-resources Segmentation fault.log error:

thread '<unnamed>' panicked at src/gpu/mod.rs:47:10:
Failed to create GL context
stack backtrace:
   0:     0x55667c790c46 - std::backtrace_rs::backtrace::libunwind::trace::hbee8a7973eeb6c93
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x55667c790c46 - std::backtrace_rs::backtrace::trace_unsynchronized::hc8ac75eea3aa6899
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55667c790c46 - std::sys_common::backtrace::_print_fmt::hc7f3e3b5298b1083
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x55667c790c46 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbb235daedd7c6190
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55667c7c0b50 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
   5:     0x55667c7c0b50 - core::fmt::write::h3ed6aeaa977c8e45
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
   6:     0x55667c78d9af - std::io::Write::write_fmt::h78b18af5775fedb5
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/io/mod.rs:1810:15
   7:     0x55667c790a24 - std::sys_common::backtrace::_print::h5d645a07e0fcfdbb
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x55667c790a24 - std::sys_common::backtrace::print::h85035a511aafe7a8
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x55667c7922a7 - std::panicking::default_hook::{{closure}}::hcce8cea212785a25
  10:     0x55667c792009 - std::panicking::default_hook::hf5fcb0f213fe709a
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:292:9
  11:     0x55667c792738 - std::panicking::rust_panic_with_hook::h095fccf1dc9379ee
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:779:13
  12:     0x55667c792612 - std::panicking::begin_panic_handler::{{closure}}::h032ba12139b353db
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
  13:     0x55667c791146 - std::sys_common::backtrace::__rust_end_short_backtrace::h9259bc2ff8fd0f76
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
  14:     0x55667c792370 - rust_begin_unwind
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
  15:     0x55667a6b67e5 - core::panicking::panic_fmt::h784f20a50eaab275
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
  16:     0x55667a6b67a3 - core::panicking::panic_display::h251010ce5e0560d5
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:196:5
  17:     0x55667a6b67a3 - core::panicking::panic_str::h6f89534c81f0edc4
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:171:5
  18:     0x55667a6b67a3 - core::option::expect_failed::hc85eb6037a3050f7
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:1980:5
  19:     0x55667be933cf - mhrice::gpu::gpu_thread::h0b58cfc70e8b7d8b
  20:     0x55667bccec86 - std::sys_common::backtrace::__rust_begin_short_backtrace::h484b0571a3bb35de
  21:     0x55667b6c84f6 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4d474c70c784e45c
  22:     0x55667c797775 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h12de4fc57affb195
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
  23:     0x55667c797775 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3c619f45059d5cf1
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
  24:     0x55667c797775 - std::sys::unix::thread::Thread::new::thread_start::hbac657605e4b7389
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys/unix/thread.rs:108:17
  25:     0x7f9fcb671609 - start_thread
  26:     0x7f9fcb447353 - clone
  27:                0x0 - <unknown>
thread '<unnamed>' panicked at src/gpu/mod.rs:79:14:
called `Result::unwrap()` on an `Err` value: SendError { .. }
stack backtrace:
   0:     0x55667c790c46 - std::backtrace_rs::backtrace::libunwind::trace::hbee8a7973eeb6c93
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x55667c790c46 - std::backtrace_rs::backtrace::trace_unsynchronized::hc8ac75eea3aa6899
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55667c790c46 - std::sys_common::backtrace::_print_fmt::hc7f3e3b5298b1083
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x55667c790c46 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbb235daedd7c6190
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55667c7c0b50 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
   5:     0x55667c7c0b50 - core::fmt::write::h3ed6aeaa977c8e45
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
   6:     0x55667c78d9af - std::io::Write::write_fmt::h78b18af5775fedb5
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/io/mod.rs:1810:15
   7:     0x55667c790a24 - std::sys_common::backtrace::_print::h5d645a07e0fcfdbb
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x55667c790a24 - std::sys_common::backtrace::print::h85035a511aafe7a8
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x55667c7922a7 - std::panicking::default_hook::{{closure}}::hcce8cea212785a25
  10:     0x55667c792009 - std::panicking::default_hook::hf5fcb0f213fe709a
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:292:9
  11:     0x55667c792738 - std::panicking::rust_panic_with_hook::h095fccf1dc9379ee
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:779:13
  12:     0x55667c792612 - std::panicking::begin_panic_handler::{{closure}}::h032ba12139b353db
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
  13:     0x55667c791146 - std::sys_common::backtrace::__rust_end_short_backtrace::h9259bc2ff8fd0f76
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
  14:     0x55667c792370 - rust_begin_unwind
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
  15:     0x55667a6b67e5 - core::panicking::panic_fmt::h784f20a50eaab275
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
  16:     0x55667a6b6d33 - core::result::unwrap_failed::h03d8a5018196e1cd
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
  17:     0x55667be91272 - mhrice::gpu::monster_hitzone::gen_hitzone_diagram::hf1a3c7d17cf13e35
  18:     0x55667b310d7e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once::hdecbe36647aebfbe
  19:     0x55667bc0b942 - rayon::iter::plumbing::bridge_producer_consumer::helper::h53ca11f5359cac06
  20:     0x55667aeb58c6 - rayon_core::join::join_context::{{closure}}::hd668b248cacb9294
  21:     0x55667aeb66e7 - rayon_core::registry::in_worker::h64e698b52d0332e0
  22:     0x55667bc0bb12 - rayon::iter::plumbing::bridge_producer_consumer::helper::h53ca11f5359cac06
  23:     0x55667aefcc8f - <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::h2cb97ec158eab404
  24:     0x55667a6b1418 - rayon_core::registry::WorkerThread::wait_until_cold::ha3129239b01c8e1f
  25:     0x55667c6fb9e2 - rayon_core::registry::ThreadBuilder::run::hd6a5eab9becb441b
  26:     0x55667c700e7a - std::sys_common::backtrace::__rust_begin_short_backtrace::hcf46d2ddab80f0d7
  27:     0x55667c6ff06f - core::ops::function::FnOnce::call_once{{vtable.shim}}::h7809fa4e94fa04f4
  28:     0x55667c797775 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h12de4fc57affb195
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
  29:     0x55667c797775 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3c619f45059d5cf1
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
  30:     0x55667c797775 - std::sys::unix::thread::Thread::new::thread_start::hbac657605e4b7389
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys/unix/thread.rs:108:17
  31:     0x7f9fcb671609 - start_thread
  32:     0x7f9fcb447353 - clone
  33:                0x0 - <unknown>
wwylele commented 5 months ago

The gen-resources requires OpenGL to render the monster hitzone images. From the log you attached, it seems that it failed to initialize Open GL ("Failed to create GL context").

It looks like you are running under WSL, which probably explains why it can't talk to GPU. I have only tested this with native Windows build and native Linux build.

xh-lin commented 5 months ago

@wwylele thanks for explaining. That makes sense