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

core: fixed segmentation fault in handle_pending_updates #1333

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

Monsterovich
Copy link
Contributor

@Monsterovich Monsterovich commented Sep 5, 2024

You can invoke it if you quickly switch between the full-screen window and other windows. Most likely the callback call occurs at the moment when the backend has already been destroyed.

Program received signal SIGSEGV, Segmentation fault.
handle_pending_updates (ps=0x5555556b4530, delta_t=0) at ../src/picom.c:1668
1668					ps->backend_data->ops.release_image(ps->backend_data,
(gdb) back
#0  handle_pending_updates (ps=0x5555556b4530, delta_t=0) at ../src/picom.c:1668
#1  0x0000555555594061 in draw_callback_impl (loop=0x7ffff7ea8720, ps=0x5555556b4530, revents=256) at ../src/picom.c:1724
#2  0x0000555555594bc4 in draw_callback (loop=0x7ffff7ea8720, w=0x5555556b4590, revents=256) at ../src/picom.c:1925
#3  0x00007ffff7e9c773 in ev_invoke_pending () from /lib/x86_64-linux-gnu/libev.so.4
#4  0x00007ffff7ea0041 in ev_run () from /lib/x86_64-linux-gnu/libev.so.4
#5  0x00005555555993cb in session_run (ps=0x5555556b4530) at ../src/picom.c:2738
#6  0x0000555555599752 in main (argc=1, argv=0x7fffffffde28) at ../src/picom.c:2853
(gdb) 0
Undefined command: "0".  Try "help".
(gdb) step 0

Program received signal SIGSEGV, Segmentation fault.
handle_pending_updates (ps=0x5555556b4530, delta_t=0) at ../src/picom.c:1668
1668					ps->backend_data->ops.release_image(ps->backend_data,
(gdb) list
1663				free(w->running_animation_instance);
1664				w->running_animation_instance = NULL;
1665				w->in_openclose = false;
1666				if (w->saved_win_image != NULL) {
1667					printf("%c\n", ps->backend_data);
1668					ps->backend_data->ops.release_image(ps->backend_data,
1669					                                    w->saved_win_image);
1670					w->saved_win_image = NULL;
1671				}
1672				if (w->state == WSTATE_UNMAPPED) {
(gdb) w
watch           wh              whatis          where           while           while-stepping  winheight       with            ws              
(gdb) p /s w
$1 = (struct win *) 0x55555570cff0
(gdb) p /s ps
$2 = (struct session *) 0x5555556b4530
(gdb) p /s ps->backend_data
$3 = (backend_t *) 0x0

@yshui
Copy link
Owner

yshui commented Sep 7, 2024

Thank you!

@yshui yshui merged commit c6fc045 into yshui:next Sep 7, 2024
15 checks passed
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

Successfully merging this pull request may close these issues.

2 participants