You are not logged in.

#1 2025-05-19 16:10:30

bowlin
Member
Registered: 2025-02-27
Posts: 47

Dwm keeps crashing. [Solved]

Hey. Yesterday everything was fine but today when I booted up my PC dwm crashed in a couple of minutes and took me to the tty. Tried it again and again and the same thing happened.

journalctl -b -e | grep dwm :
https://bpa.st/XL4Q


Thanks.

Last edited by bowlin (2025-05-26 09:48:08)

Offline

#2 2025-05-19 16:50:28

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,820
Website

Re: Dwm keeps crashing. [Solved]

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2025-05-19 21:38:15

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

Please don't grep, parts of the backtrace are missing.
https://wiki.archlinux.org/title/Core_d … _core_dump

Sanity check: have you tried to rebuild dwm? (chances are this is the consequence of an update?)

Offline

#4 2025-05-21 00:12:37

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

Sorry about that. Also tried rebuilding dwm but it made no difference, although I was able to use my system for a long time without any trouble. Until it happened again.

coredumpctl info $pid:
https://bpa.st/NEAA

Edit: Also haven't pulled any updates to my build.

Last edited by bowlin (2025-05-21 00:13:15)

Offline

#5 2025-05-21 07:01:35

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

Is this vanilla dwm or do you apply any patches?

Offline

#6 2025-05-21 09:01:47

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

I have several patches applied:
urg-border, autostart,  barpadding,  movestack,  restartsig,  vanitygaps, alwayscenter, bar-height, hide_vacant_tags, pertag and swallow.

It has worked just fine and I haven't even patched anything into it recently. Only made minor changes, mainly regarding bar padding and font etc.

Offline

#7 2025-05-21 09:05:11

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

Make sure to build and install the debug package for an extended backtrace and likely share your dwm.c along it.

Offline

#8 2025-05-21 09:20:12

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

By the debug package you're implying gdb? And the crash doesn't happen as often now. Typing in a dwm session right now.

For starters here's my dwm.c:
https://bpa.st/24MA

Offline

#9 2025-05-21 13:43:12

seth
Member
Registered: 2012-09-03
Posts: 64,524

Offline

#10 2025-05-22 15:37:47

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

Tinkered around for a bit with it, and this is what I got:

(gdb) bt
#0  0x000064eb8dc4ff7d in updatewmhints ()
#1  0x000064eb8dc51953 in propertynotify ()
#2  0x000064eb8dc4dd5c in main ()

Offline

#11 2025-05-22 19:24:26

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

You don't have to manually run gdb, the point is to have a debug enabled build to get more information than just the function.
See the links I posted (debuginfod is likely less relevant since it's a local build)

You might also want to try the vanilla dwm.c to see whether it's indeed related to your local modifications.

Offline

#12 2025-05-22 23:44:50

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

The latter link is related to makepkg though, no? Not sure what I need to do in terms of enabling debugging in my build. Modify the c -flags?
Also can't seem to recreate the crash anymore, don't know why.

Offline

#13 2025-05-23 07:03:19

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

How do you build dwm? Manually?
Add "-gdwarf" to the CFLAGS

Offline

#14 2025-05-23 17:11:52

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

I compile it manually: "sudo make install", the crash happened again although I didn't get to modifying the CFLAGS yet tongue Will modify now and recompile & restart.

Edits:

Isn't "-g" enough? and I do need it by itself anyways, right?

Here's what I got: https://bpa.st/BIGQ

Also it's somehow related to opening windows or links etc. The crash happened twice in a row when I did the same thing, tried to open a new window on Steam. Switched to openbox for the time being.

Last edited by bowlin (2025-05-23 18:31:17)

Offline

#15 2025-05-23 20:02:28

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

#0  0x00005fc341393f7d in updatewmhints (c=0x5fc3446bd7c0) at dwm.c:2432
2432                                    XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);

So eiher "c" is a dangeling pointer or the scheme[][] matrix is bogus or the index out of bounds.
And it's gonna be the urg-border patch, resp. your config.h where colors is gonna be a 2x3 matrix, not 3x3?

Offline

#16 2025-05-23 20:23:05

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

That went a bit over my head, but here's my config.def.h (config.h is exactly the same)

https://bpa.st/MFHA

Offline

#17 2025-05-23 20:27:35

seth
Member
Registered: 2012-09-03
Posts: 64,524

Re: Dwm keeps crashing. [Solved]

/*static const char *colors[][3]      = {*/
	/*               fg         bg         border   */
	/*[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
        [SchemeUrg]  = { col_gray4, col_cyan,  col_urgborder  },
};*/

#include "/home/jere/.cache/wal/colors-wal-dwm.h"

The problem will be in /home/jere/.cache/wal/colors-wal-dwm.h which likely will lack some [SchemeUrg] line?

Offline

#18 2025-05-25 01:26:09

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

Now that pywal got into the picture.. I just realized that I switched from the archived pywal (no longer maintained iirc) to pywal16. That might aswell be at play here. Although I'm not quite sure as to what changed, since both of them work relatively the same. Colors-wal-dwm.h should be the same on both atleast structurally as far as I now.

Edit:
Saying all of that, did a bit of digging around and it indeed seems like pywal16 handles it differently. There is a separate file (colors-wal-dwm-urg.h) for the urg patch. Those lines related to it are missing in the file I included. The pywal related instructions on github were 99% the same so I thought only minor stuff had changed.

I'll change the line to include colors-wal-dwm-urg.h instead and report back.

Offline

#19 2025-05-26 09:47:54

bowlin
Member
Registered: 2025-02-27
Posts: 47

Re: Dwm keeps crashing. [Solved]

That seemed to be the culprit here, thanks a bunch for helping me get to the bottom of it! Now I know at the very least how to get a bit of information out of a crash dump.

Offline

Board footer

Powered by FluxBB