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

gpu driver crash #162

Closed
lenscas opened this issue Oct 10, 2021 · 21 comments
Closed

gpu driver crash #162

lenscas opened this issue Oct 10, 2021 · 21 comments
Labels
kind:bug Something isn't working

Comments

@lenscas
Copy link

lenscas commented Oct 10, 2021

Found a way for FishFight to crash my laptop. Just use the arrow keys to select Network, RT and that seems to crash my GPU driver. (Screen freezes and eventually goes black, while music which comes from youtube keeps working).

System info (copied from what hardinfo told me)

OS:
Kernel | Linux 5.4.150-1-MANJARO (x86_64)
Version | #1 SMP PREEMPT Thu Sep 30 16:13:54 UTC 2021
C Library | GNU C Library / (GNU libc) 2.33
Distribution | Manjaro Linux

Computer:
Processor | AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx
Memory | 7079MB (3353MB used)
Machine Type | Notebook
Operating System | Manjaro Linux
User Name | lenscas (Lenscas)
Date/Time | zo 10 okt 2021 14:24:15 CEST

Display:
Resolution | 1920x1080 pixels
OpenGL Renderer | AMD Radeon(TM) Vega 3 Graphics (RAVEN, DRM 3.35.0, 5.4.150-1-MANJARO, LLVM 12.0.1)
Session Display Server | [X11] The X.Org Foundation 12013000

OpenGL (GLX):
Vendor | AMD
Renderer | AMD Radeon(TM) Vega 3 Graphics (RAVEN, DRM 3.35.0, 5.4.150-1-MANJARO, LLVM 12.0.1)
Direct Rendering | Yes
Version (Compatibility) | 4.6 (Compatibility Profile) Mesa 21.2.3
Shading Language Version (Compatibility) | 4.60
Version (Core) | 4.6 (Core Profile) Mesa 21.2.3
Shading Language Version (Core) | 4.60
Version (ES) | OpenGL ES 3.2 Mesa 21.2.3
Shading Language Version (ES) | OpenGL ES GLSL ES 3.20
GLX Version | 1.4

I'm not sure what logs to look at (if any). So, feel free to tell me where I can find relevant logs :)

@erlend-sh erlend-sh added the kind:bug Something isn't working label Oct 10, 2021
@olefasting
Copy link
Member

Confirmed, but I only get it when going to Local Game and pressing LT to cycle to last tab index...
I have similar specs as the author (Ryzen 5/Vega 8)

@lenscas
Copy link
Author

lenscas commented Oct 10, 2021

Confirmed, but I only get it when going to Local Game and pressing LT to cycle to last tab index... I have similar specs as the author (Ryzen 5/Vega 8)

I didn't have more time to check if there are more things that causes a crash so... might have more laptop crashes waiting to be discovered.

@olefasting
Copy link
Member

I didn't really look into the error message, but I checked that it wasn't a simple index out of bounds error, so my guess is that this is a bug in Macroquad, not in our code....

@lenscas
Copy link
Author

lenscas commented Oct 10, 2021

I didn't really look into the error message, but I checked that it wasn't a simple index out of bounds error, so my guess is that this is a bug in Macroquad, not in our code....

what error message? What log? For me the laptop just dies so not sure what to look at to find out what breaks...

@olefasting
Copy link
Member

I get a backtrace in my IDE:

Found gamepad "/dev/input/event25": "8BitDo SN30 Pro for Android"
input_id: InputId { bustype: 5, vendor: 11720, product: 8448, version: 256 }
No mapping for 05000000c82d00000021000000010000, falling back to default!
thread 'main' panicked at 'internal error: entered unreachable code', src/gui/main_menu.rs:490:22
stack backtrace:
0: rust_begin_unwind
at /rustc/c3c0f80d6081092faff801542dd82f0e2420152b/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/c3c0f80d6081092faff801542dd82f0e2420152b/library/core/src/panicking.rs:96:14
2: core::panicking::panic
at /rustc/c3c0f80d6081092faff801542dd82f0e2420152b/library/core/src/panicking.rs:50:5
3: fishfight::gui::main_menu::game_type::{{closure}}::{{closure}}
at ./src/gui/main_menu.rs:490:22
4: macroquad::ui::widgets::window::Window::ui
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/ui/widgets/window.rs:60:9
5: macroquad::ui::widgets::window::::window
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/ui/widgets/window.rs:186:9
6: fishfight::gui::main_menu::game_type::{{closure}}
at ./src/gui/main_menu.rs:466:9
7: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
at /rustc/c3c0f80d6081092faff801542dd82f0e2420152b/library/core/src/future/mod.rs:80:19
8: fishfight::amain::{{closure}}
at ./src/main.rs:478:25
9: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
at /rustc/c3c0f80d6081092faff801542dd82f0e2420152b/library/core/src/future/mod.rs:80:19
10: macroquad::exec::resume
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/exec.rs:72:14
11: <macroquad::Stage as miniquad::event::EventHandlerFree>::draw::{{closure}}
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/lib.rs:614:24
12: <macroquad::Stage as miniquad::event::EventHandlerFree>::draw::maybe_unwind
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/lib.rs:605:21
13: <macroquad::Stage as miniquad::event::EventHandlerFree>::draw
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/lib.rs:610:26
14: sapp_linux::_sapp_call_frame
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/sapp-linux-0.1.13/src/lib.rs:2627:13
15: sapp_linux::_sapp_frame
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/sapp-linux-0.1.13/src/lib.rs:2639:5
16: sapp_run
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/sapp-linux-0.1.13/src/lib.rs:2783:9
17: miniquad::start
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/miniquad-0.3.0-alpha.37/src/lib.rs:433:14
18: macroquad::Window::from_config
at /home/oasf/.cargo/registry/src/github.com-1ecc6299db9ec823/macroquad-0.3.10/src/lib.rs:690:9
19: fishfight::main
at ./src/main.rs:443:1
20: core::ops::function::FnOnce::call_once
at /rustc/c3c0f80d6081092faff801542dd82f0e2420152b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

Process finished with exit code 101

@lenscas
Copy link
Author

lenscas commented Oct 10, 2021

so.. for you only the game dies?

Then I wonder if it is the same bug, or if it is the same bug what prevents the entire computer from crashing in your case.

@olefasting
Copy link
Member

Might be because the panic is handled differently when the process is handled by the IDE. You can try running the game with RUST_BACKTRACE=1 and you should get the same messages, unless it craches before it unwinds the stack

@olefasting
Copy link
Member

Also, there probably are differences in how things are handled between us, as we have different Vega APUs. What crashes the driver in one case, doesn't necessarily do so in the other case...

@lenscas
Copy link
Author

lenscas commented Oct 10, 2021

you have a different bug. If I go left, the game crashes for me as well rather than my driver.
That problem is caused by the line https://github.com/fishfight/FishFight/blob/50b491e9f0fbc85439547c3a443cd09b74fc387e/src/gui/main_menu.rs#L446

the index is set to MODE_SELECTION_TAB_COUNT (which is 3) however, in the match it is 0 indexed, so the index 2 is the highest that is being checked for.

Simply adding a - 1 to that line should fix it. However, I can't really test this as that will probably result in my laptop crashing again :(

@olefasting
Copy link
Member

Yeah, you are right, of course. I read the No mapping for... as the error. The error I got is my fault, actually, so I'll fix that....

@lenscas
Copy link
Author

lenscas commented Oct 10, 2021

Yeah, you are right, of course. I read the No mapping for... as the error. The error I got is my fault, actually, so I'll fix that....

the no mapping for is also something I have and seems to be related to gamepads. In my case, the game thinks my touchpad is a gamepad and for obvious reasons can't really deal with that.

@olefasting
Copy link
Member

olefasting commented Oct 10, 2021

Do you also have a /dev/input/js0, even when no gamepad is connected? This has been a problem for me, when using gamepad-rs with FishFight (other gamepad libs seem to be able to discern between this and real mappings), with both my new and my old laptop. This (linux registering touchpad as a joypad) might be the explanation for that, then

@lenscas
Copy link
Author

lenscas commented Oct 10, 2021

for me it is

Found gamepad "/dev/input/event12": "SynPS/2 Synaptics TouchPad"
input_id: InputId { bustype: 17, vendor: 2, product: 7, version: 417 }
No mapping for 110000000200000007000000a1010000, falling back to default!

however, from what I read /dev/input needs special permissions to read that increasingly more common is disabled by default?

I know for one of my projects that I couldn't read the mouse data that way until I manually gave my user the correct role, and that this role was explicitly not given by default.

Or, is that mouse specific and gamepads still use /dev/input?

(Also, maybe this should be discussed on a more appropriate issue?)

@PotatoTech
Copy link
Collaborator

Simply adding a - 1 to that line should fix it. However, I can't really test this as that will probably result in my laptop crashing again

This change has been made. As for the touchpad issue, the gamepad system has since been replaced. Are you still experiencing problems, @lenscas?

@lenscas
Copy link
Author

lenscas commented Oct 24, 2021

Simply adding a - 1 to that line should fix it. However, I can't really test this as that will probably result in my laptop crashing again

This change has been made. As for the touchpad issue, the gamepad system has since been replaced. Are you still experiencing problems, @lenscas?

the - 1 thing wouldn't solve my GPU driver crashing, as that was a fix for another bug that just caused the game to crash rather than the GPU driver.

However, the touchpad being seen as a gamepad problem is fixed 🎉

@olefasting
Copy link
Member

@lenscas if you have the opportunity, could you check if the issue is gone, now that the network tab is disabled, so that we can close this?

@olefasting
Copy link
Member

I'm closing this. We can reopen it if the is still an issue

@lenscas
Copy link
Author

lenscas commented Oct 30, 2021

yea, sorry for taking so long to check. Busy with other stuff.

I also doubt it would NOT be fixed by the removal of that screen. As far as I know, that screen was the only one that caused the crash and I fail to see how removing that screen would NOT result in that crash being removed.

@olefasting
Copy link
Member

Then it is the same error I had. It was connected to the network implementation. Unsure why it leads to a gpu driver crash, though

@lenscas
Copy link
Author

lenscas commented Oct 30, 2021

Perhaps it is something else that crashes and it just looks like a GPU driver crash?

All I had to go on was "screen goes black, music keeps playing" which to me sounds like a GPU crash but might just be something else.

@olefasting
Copy link
Member

Ah, ok. I thought you had it from logs, or something. Then it is probably the network implementations fault, as I have it pinned down to the update of the connection state. That is not going to be used, as we are going to use steam in stead, so I guess the mystery is solved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants