-
Notifications
You must be signed in to change notification settings - Fork 18
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
Segfault after 1820 alt-Tab switches in wmaker 0.95.9 #22
Comments
Maybe something with the following code at the beginning of
This is the only new code. The other changes are only switch from DEFINE constant to Maybe something in Or something with |
on KVM VM it crashes after 2184 switches with debian standard live ISO (with xterm xfonts-base xdotool xbase-clients lxdm wmaker installed) and arch linux |
I've noticed frequent crashes while alt-tabbing for quite a while too, but never got around to spending any time debugging it. It's interesting that it's so easily reproducible and occurs after a fixed number of attempts! Thanks for all of the info -- that should definitely help! |
Hello all. I have compiled different commits to test, when the crash appears. I have found, that the crash does not happen in commit 3665410 ("make switchpanel configurable"), but curiously after the commit 31f16b6 ("higher resolution images for switch panel"). Binary files a/WindowMaker/Pixmaps/swback.png and b/WindowMaker/Pixmaps/swback.png differ Old files are: swback2.png PNG 64x90 64x90+0+0 8-bit sRGB 4298B 0.000u 0:00.000 And new files are: swback2.png PNG 300x300 300x300+0+0 8-bit sRGB 8653B 0.000u 0:00.000 The code probably does not allocate correct size for the images and therefore makes it segfault? I have installed the released wmaker-0.95.9 from debian repo and wmaker crashed again after 2184 switches. I have then replaced the new 300x300 switchpanel images with the 64x64/64x90 old images and now it does not crashed after 3000 switches. The issue are really the new images and the old images are simple fast fix. Could you, Haroldo @h-g-s , please check this issue, why the wmaker does crash with the new bigger images? Thank you very much. Regards, Robert. |
Thanks for the repro steps, I don't think it's related to the commit mentioned above about the "higher resolution images for switch panel". On my side I am not using those and wmaker is still crashing. Looks to be when the underlying view is freeing especially the gray color that was used as background color.
|
The number of calls to WMRetainColor for a color in use should the same as the number of calls to WMReleaseColor to free that color. In case of discrepancy, random crashes can happen and memory is not freed properly. To debug that issue I checked the retained colors when the switchpanel is opened and then checked if those colors are properly released once the panel is closed. This patch fixes the issue mentioned at window-maker/wmaker#22
@dmaciejak thank you for debugging. As I have written, I am no developer :) But for me replacing the new hires images with the old ones has helped and I have no crashes since then. But it's great that you could find the problem. |
Fixed in 2a14004. |
Hello all,
I am surprised, that none other has the same issue in 0.95.9 as me. I have first found this issue on Gentoo after update wmaker 0.95.8 to 0.95.9. After downgrade to 0.95.8 wmaker was again OK.
Now I have same issue in Debian 11, again with wmaker 0.95.9-2.
I have noticed random wmaker restarts after pressing alt-tab (to switch app). It does not happen everytime, but only after some time. I thought it could happen after any count of alt-tab switches but of-course I could you count the alt-tabs during my work.
Now I have created easy bash script using xdotool to simulate pressing alt-tab and counting the number.
a=0 ; pid="$( pgrep -f '/usr/lib/WindowMaker/wmaker.*real' )" ; while ps -p "$pid" fh -o pid,lstart,etime,cmd &>/dev/null ; do xdotool key 'alt+Tab' ; echo "$a" ; sleep 0.01 ; a=$(($a+1)) ; done ; echo "$a"
I have found, that wmaker creashes with segfault everytime exactly after 1820 switches. Could you test the script yourself and check if you get the same segfault?
Could you compile wmaker with debug symbols and find out the reason of the segfault?
I presume something with the new feature "switchpanel configurable" ("SwitchPanelIconSize"), but I am no programmer to find it out myself.
Can you find the problem?
Thank you very much.
Regards,
Robert Wolf.
The text was updated successfully, but these errors were encountered: