Skip to content

Got event from unknown fd 8, ptr 0x8, u32 8, u64 8 with events 17 #21

Open
@bakkeby

Description

@bakkeby

Hi, me again (sorry).

I am not going to bug you with too many details, but I am playing around with setting / updating different statuses on my bar using the IPC patch instead of going through the X root name. I also have button clicks integrated.

Now I have it so that I can use the mouse wheel on the volume icon to increase or decrease the volume and everything works fine. Mouse clicks (wheel) will trigger shell scripts to adjust the volume and in turn call dwm-msg to update the specific status element.

What I found was that if I scroll the mouse wheel a bit faster dwm seemingly crashes. After some investigation I came to the conclusion that it doesn't actually crash - it exists gracefully after receiving an event from an unknown file descriptor according to the output of:

Got event from unknown fd 8, ptr 0x8, u32 8, u64 8 with events 17

This is in relation to this code within the run function:

dwm-ipc/dwm.c

Lines 1458 to 1464 in b3eebba

} else {
fprintf(stderr, "Got event from unknown fd %d, ptr %p, u32 %d, u64 %lu",
event_fd, events[i].data.ptr, events[i].data.u32,
events[i].data.u64);
fprintf(stderr, " with events %d\n", events[i].events);
return;
}

I don't quite grasp why exactly it comes through as an unknown file descriptor - it's the same fd value as being processed with normal messages as far as I can see. I presume that it has something to do with how multiple messages are queued up in the stream of data.

In any case I just wanted to say that I worked around this issue by removing that return statement (and ultimately ignoring such unknown events).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions