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

[1] 11390 segmentation fault (core dumped) ./a.out #1

Open
ghost opened this issue Oct 17, 2021 · 10 comments
Open

[1] 11390 segmentation fault (core dumped) ./a.out #1

ghost opened this issue Oct 17, 2021 · 10 comments

Comments

@ghost
Copy link

ghost commented Oct 17, 2021

doesn't work

i was using PopOS 21.04 and
gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0

@ShrirajHegde
Copy link

Same on Fedora 34 gcc (GCC) 11.2.1 20210728

@donno2048
Copy link

Same on Debian 9.5 with gcc version 6.3.0 and Ubuntu 20.04 with gcc version 9.3.0

@goll72
Copy link

goll72 commented Oct 22, 2021

@ShrirajHegde Fedora now uses wayland by default and this program uses X11 so it won't work unless you install Xwayland.

@ShrirajHegde
Copy link

I'm an Nvidia user, so no Wayland for me.

@goll72
Copy link

goll72 commented Oct 22, 2021

I had a segmentation fault issue that I solved by replacing ":0" in XOpenDisplay() with NULL so that it uses the default in $DISPLAY. Probably unrelated but idk.
I also get a segmentation fault if I walk off the map, not sure if that's the one you are talking about or not.

@koply
Copy link

koply commented Oct 30, 2021

Same on Ubuntu 20.04.2 5.4.72-microsoft-standard-WSL2 kernel. gcc version 9.3.0

Also goll72's solution solved my problem. Works fine but a little slow. I tried this with gnome-terminal on XServer for Windows.

@Toompy
Copy link

Toompy commented Oct 30, 2021

Also throws a segfault on debian 5.0.3 on WSL, with gcc 8.3.0 (can it even work on WSL?..)

@TheKrafter
Copy link

TheKrafter commented Nov 3, 2021

doesn't work

i was using PopOS 21.04 and gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0

same here with Intel iGPU (Intel 3rd Gen Core processor Graphics Controller)

@ii64
Copy link

ii64 commented Nov 9, 2021

5.10.43.3-microsoft-standard-WSL2
Could you try to debug it? it seems it has a problem with XQueryKeymap
0000000000001180 XQueryKeymap@plt:
1184: f2 ff 25 2d 4e 00 00 bnd jmpq *0x4e2d(%rip) # 5fb8
12e6: e8 95 fe ff ff callq 1180 XQueryKeymap@plt

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7d58cc0 in XQueryKeymap () from /lib/x86_64-linux-gnu/libX11.so.6

frame:
Stack level 0, frame at 0x7fffffffd590:
rip = 0x7ffff7d58cc0 in XQueryKeymap; saved rip = 0x5555555552eb
called by frame at 0x7fffffffd5f0
Arglist at 0x7fffffffd538, args:
Locals at 0x7fffffffd538, Previous frame's sp is 0x7fffffffd590
Saved registers:
rbx at 0x7fffffffd578, rbp at 0x7fffffffd580, rip at 0x7fffffffd588

register:
rax 0x0 0
rbx 0x7fffffffd5b0 140737488344496
rcx 0xffffffffffffffb0 -80
rdx 0x7fffffffd5b0 140737488344496
rsi 0x7fffffffd5b0 140737488344496
rdi 0x0 0
rbp 0x0 0x0
rsp 0x7fffffffd540 0x7fffffffd540
r8 0x0 0
r9 0x0 0
r10 0xfffffffffffffcce -818
r11 0x7ffff7b137a0 140737348974496
r12 0x5555555551c0 93824992235968
r13 0x7fffffffd790 140737488344976
r14 0x0 0
r15 0x0 0
rip 0x7ffff7d58cc0 0x7ffff7d58cc0 <XQueryKeymap+32>
eflags 0x10246 [ PF ZF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0

@ii64
Copy link

ii64 commented Nov 9, 2021

WSL + WSL graphic
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants