Closed vdawg-git closed 10 months ago
Still the case for 0.2.0
.
Side note: Printing the version with hyprpicker -h
would be nice :D
build in debug and provide a stacktrace
I did make all
and then make debug
as make debug
did not work initially.
Then I ran ./build/hyprpicker
, but I still only get fish: Job 1, './build/hyprpicker' terminated by signal SIGSEGV (Address boundary error)
.
coredumpctl
like in hyprland: https://github.com/hyprwm/Hyprland/blob/main/docs/ISSUE_GUIDELINES.md
Message: Process 116187 (hyprpicker) of user 1000 dumped core.
Stack trace of thread 116187:
#0 0x0000558a3c3298c4 n/a (hyprpicker + 0x98c4)
#1 0x00007f9e0f4974f6 n/a (libffi.so.8 + 0x74f6)
#2 0x00007f9e0f493f5e n/a (libffi.so.8 + 0x3f5e)
#3 0x00007f9e0f496b73 ffi_call (libffi.so.8 + 0x6b73)
#4 0x00007f9e0f713645 n/a (libwayland-client.so.0 + 0x7645)
#5 0x00007f9e0f713e73 n/a (libwayland-client.so.0 + 0x7e73)
#6 0x00007f9e0f71413c wl_display_dispatch_queue_pending (libw>
#7 0x0000558a3c32796a n/a (hyprpicker + 0x796a)
#8 0x0000558a3c3247e2 n/a (hyprpicker + 0x47e2)
#9 0x00007f9e0f020cd0 n/a (libc.so.6 + 0x27cd0)
#10 0x00007f9e0f020d8a __libc_start_main (libc.so.6 + 0x27d8a)
#11 0x0000558a3c3248d5 n/a (hyprpicker + 0x48d5)
ELF object binary architecture: AMD x86-64
Here you go, freshly served with Javascript syntax highlighting
doesnt look like a debug build
Is make debug
not enough for a debug build?
Oct 30, 2023, 17:08 by @.***:
doesnt look like a debug build
— Reply to this email directly, > view it on GitHub https://github.com/hyprwm/hyprpicker/issues/38#issuecomment-1785548362> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AGZXUC3765VNCIRARRACV5LYB7GHRAVCNFSM6AAAAAA2HJZ65CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGU2DQMZWGI> . You are receiving this because you authored the thread.> Message ID: > <hyprwm/hyprpicker/issues/38/1785548362> @> github> .> com>
should be. Also try coredumpctl debug <pid>
and then once in (gdb)
doing bt -full
#0 0x000000000040c768 in CHyprpicker::recheckACK() (this=0x5d2570) at /home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp:83
XCURSOR_SIZE = 24
ls = std::unique_ptr<CLayerSurface> = {get() = 0x5da770}
__for_range = std::vector of length 1, capacity 1 = {std::unique_ptr<CLayerSurface> = {get() = 0x5da770}}
__for_begin = std::unique_ptr<CLayerSurface> = {get() = 0x5da770}
__for_end = std::unique_ptr<CLayerSurface> = {get() = 0x0}
#1 0x00000000004082fc in Events::handleSCFlags(void*, zwlr_screencopy_frame_v1*, unsigned int) (data=0x5da770, frame=0x5d8440, flags=0)
at /home/vdawg/dev/tmp/hyprpicker/src/events/Events.cpp:336
PLS = 0x5da770
#2 0x00007f5252ce94f6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#3 0x00007f5252ce5f5e in ffi_call_int (cif=cif@entry=0x7fff7c5e1b70, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0)
at ../src/x86/ffi64.c:673
classes = {X86_64_INTEGERSI_CLASS, 32767, 1389250236, 32594}
stack = <optimized out>
argp = 0x7fff7c5e19c0 ""
arg_types = <optimized out>
gprcount = 3
ssecount = <optimized out>
ngpr = 1
nsse = 0
i = <optimized out>
avn = <optimized out>
flags = <optimized out>
reg_args = <optimized out>
#4 0x00007f5252ce8b73 in ffi_call (cif=cif@entry=0x7fff7c5e1b70, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fff7c5e1c40)
at ../src/x86/ffi64.c:710
arg_types = 0x7fff7c5e1b90
i = <optimized out>
nargs = 3
max_reg_struct_size = <optimized out>
#5 0x00007f5253281645 in wl_closure_invoke (closure=closure@entry=0x5d9380, target=<optimized out>,
target@entry=0x5d8440, opcode=opcode@entry=1, data=<optimized out>, flags=1) at ../wayland-1.22.0/src/connection.c:1025
count = <optimized out>
cif = {abi = FFI_UNIX64, nargs = 3, arg_types = 0x7fff7c5e1b90, rtype = 0x7f5252cea1a0 <ffi_type_void>, bytes = 0, flags = 0}
ffi_types = {0x7f5252cea2a0 <ffi_type_pointer>, 0x7f5252cea2a0 <ffi_type_pointer>, 0x7f5252cea240 <ffi_type_uint32>, 0x0, 0x0, 0x7f52532869f0, 0x6433c0, 0x7f52532827c0 <wl_display_read_events+192>, 0x0, 0x5d2ff0, 0x8, 0x5d3108, 0x0, 0x7fff7c5e1cc0, 0x7f52532869f0, 0x643490, 0x8, 0x643490, 0x643498, 0x7f5200000000, 0x7fff0000001c, 0x0}
ffi_args = {0x7fff7c5e1b50, 0x7fff7c5e1b58, 0x5d9398, 0x0, 0x75, 0x0, 0x7fff7c5e1ca0, 0x2, 0x7fff7c5e1cc0, 0x0, 0x40000000, 0x6c61d4b9ca29ee00, 0x5d3c58, 0x538, 0x5d3190, 0xac8, 0x8000000000012, 0x100000001, 0x7f5200000004, 0x1150, 0x5da4c0, 0x7f52527cb7c8 <_int_free_merge_chunk+152>}
implementation = <optimized out>
#6 0x00007f5253281e73 in dispatch_event (display=display@entry=0x5d2ff0, queue=0x5d30e0) at ../wayland-1.22.0/src/wayland-client.c:1631
closure = 0x5d9380
proxy = 0x5d8440
opcode = 1
proxy_destroyed = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--c
#7 0x00007f525328213c in dispatch_queue (queue=0x5d30e0, display=0x5d2ff0) at ../wayland-1.22.0/src/wayland-client.c:1777
count = 0
ret = <optimized out>
#8 wl_display_dispatch_queue_pending (display=0x5d2ff0, queue=0x5d30e0) at ../wayland-1.22.0/src/wayland-client.c:2019
ret = <optimized out>
#9 0x000000000040c2a4 in CHyprpicker::init() (this=0x5d2570) at /home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp:45
#10 0x0000000000410583 in main(int, char**, char**) (argc=4, argv=0x7fff7c5e1f98, envp=0x7fff7c5e1fc0) at /home/vdawg/dev/tmp/hyprpicker/src/main.cpp:64
This does indeed look better
Also this which I got before bt -full
:
warning: Section `.reg-xstate/130870' in core file too small.
#0 0x000000000040c768 in CHyprpicker::recheckACK (this=0x5d2570) at /home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp:83
83 ls->pCursorImg = wl_cursor_theme_get_cursor(wl_cursor_theme_load(getenv("XCURSOR_THEME"), XCURSOR_SIZE * ls->m_pMonitor->scale, m_pWLSHM), "crosshair")->images[0];
thanks
-- Configuring hyprpicker!
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/vdawg/dev/tmp/hyprpicker/build
cmake --build ./build --config Debug --target all -j 10
[1/3] Building CXX object CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o
FAILED: CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o
/usr/bin/c++ -DGIT_BRANCH=\"main\" -DGIT_COMMIT_HASH=\"8a7799ae20f3e2e2e716271c21fc9213319ca2a4\" -DGIT_COMMIT_MESSAGE="\" core: support conversions from 10-bit formats\"" -DGIT_DIRTY=\"dirty\" -I/home/vdawg/dev/tmp/hyprpicker/. -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/sysprof-6 -isystem /usr/include/pixman-1 -isystem /usr/include/pango-1.0 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -pg -no-pie -fno-builtin -g -std=c++23 -DWLR_USE_UNSTABLE -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -MD -MT CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o -MF CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o.d -o CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o -c /home/vdawg/dev/tmp/hyprpicker/src/events/Events.cpp
/home/vdawg/dev/tmp/hyprpicker/src/events/Events.cpp: In function ‘void Events::handlePointerEnter(void*, wl_pointer*, uint32_t, wl_surface*, wl_fixed_t, wl_fixed_t)’:
/home/vdawg/dev/tmp/hyprpicker/src/events/Events.cpp:99:18: error: ‘s’ was not declared in this scope; did you mean ‘ls’?
99 | if (!s->pCursorImg)
| ^
| ls
/home/vdawg/dev/tmp/hyprpicker/src/events/Events.cpp: In lambda function:
/home/vdawg/dev/tmp/hyprpicker/src/events/Events.cpp:381:20: warning: unused variable ‘TRFLIP’ [-Wunused-variable]
381 | const auto TRFLIP = PLS->m_pMonitor->transform >= 4;
| ^~~~~~
[2/3] Building CXX object CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o
FAILED: CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o
/usr/bin/c++ -DGIT_BRANCH=\"main\" -DGIT_COMMIT_HASH=\"8a7799ae20f3e2e2e716271c21fc9213319ca2a4\" -DGIT_COMMIT_MESSAGE="\" core: support conversions from 10-bit formats\"" -DGIT_DIRTY=\"dirty\" -I/home/vdawg/dev/tmp/hyprpicker/. -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/sysprof-6 -isystem /usr/include/pixman-1 -isystem /usr/include/pango-1.0 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -pg -no-pie -fno-builtin -g -std=c++23 -DWLR_USE_UNSTABLE -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -MD -MT CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o -MFCMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o.d -o CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o -c /home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp
/home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp: In member function ‘void CHyprpicker::recheckACK()’:
/home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp:86:22: error: ‘CURSOR’ was not declared in this scope
86 | if (!CURSOR)
| ^~~~~~
/home/vdawg/dev/tmp/hyprpicker/src/hyprpicker.cpp:89:21: error: ‘CURSOR’ was not declared in this scope
89 | if (CURSOR)
| ^~~~~~
ninja: build stopped: subcommand failed.
make: *** [Makefile:57: debug] Error 1
Thank you. I applied the patch, but it fails to build
Works! Nice, thank you :)
Curious, is this fix currently on the version that is part of the nix packages? I just installed it from unstable nix and it fails with the same error.
It is not. Since we haven't had a release, we haven't updated it.
After updating to the latest version, I have the same problem!
`Program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt -full
(cif=cif@entry=0x7ffe5a666720, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
classes = {X86_64_INTEGERSI_CLASS, 32766, 92895052, 29683}
stack = <optimized out>
argp = 0x7ffe5a666570 ""
arg_types = <optimized out>
gprcount = 3
ssecount = <optimized out>
ngpr = 1
nsse = 0
i = <optimized out>
avn = <optimized out>
flags = <optimized out>
reg_args = <optimized out>
at ../src/x86/ffi64.c:710
arg_types = 0x7ffe5a666740
i = <optimized out>
nargs = 3
max_reg_struct_size = <optimized out>
target@entry=0x61f2eb6d6240, opcode=opcode@entry=0, data=<optimized out>, flags=1) at ../wayland-1.23.0/src/connection.c:1228
count = 1
cif = {abi = FFI_UNIX64, nargs = 3, arg_types = 0x7ffe5a666740, rtype = 0x73f30589d1a0 <ffi_type_void>, bytes = 0, flags = 0}
ffi_types = {0x73f30589d2a0 <ffi_type_pointer>, 0x73f30589d2a0 <ffi_type_pointer>, 0x73f30589d240 <ffi_type_uint32>, 0xc, 0x61f2eb661470, 0x0, 0x8, 0x61f2eb661598, 0x7ffe5a666950, 0x73f305f31ba8 <wl_display_read_events+184>, 0xc, 0x73f305f2fabe <close_fds+142>, 0x61f2eb66679c, 0x61f2eb661660, 0x24, 0x61f2eb661518, 0x61f2eb68bf40, 0x7ffe5a666890, 0xc, 0x61f2eb68be78, 0x61f2eb68bf4c, 0x61f2eb661470}
ffi_args = {0x7ffe5a666700, 0x7ffe5a666708, 0x61f2eb692ff8, 0x0, 0x73f305f39a98 <wl_display_events+24>, 0x61f2eb661598, 0x0, 0x0, 0x75, 0x0, 0x7ffe5a666870, 0x2, 0x7ffe5a666890, 0x80, 0x0, 0x100000001, 0x61f2eb664214, 0x4fc, 0x61f2eb663710, 0xaec, 0xc000100000001, 0xf0}
implementation = <optimized out>
closure = 0x61f2eb692fe0
proxy = 0x61f2eb6d6240
opcode = 0
proxy_destroyed = <optimized out>
--Type
ret = <optimized out>
`
When I launch
hyprpicker
I just get this error message.How can I provide better logs?