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

Crash with VLC #755

Closed
sebaro opened this issue Nov 9, 2022 · 9 comments · Fixed by #765
Closed

Crash with VLC #755

sebaro opened this issue Nov 9, 2022 · 9 comments · Fixed by #765
Labels
relates:ewmh Issues is in EWMH/ICCCM2 handling code type:bug Something's broken!
Milestone

Comments

@sebaro
Copy link

sebaro commented Nov 9, 2022

FVWM crashes when closing VLC whle playing a video or when the video finishes playing.
The issue is with Qt version not CLI.

git-bisect:

320ae7aa230106647246d7b19b83a4630956fc93 is the first bad commit
commit 320ae7aa230106647246d7b19b83a4630956fc93
Author: Dominik Vogt <dominik.vogt@gmx.de>
Date:   Fri Nov 26 21:41:37 2021 +0100

    Fix fvwm missing DestroyNotify events that died before reparenting.

 fvwm/add_window.c | 39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)
@sebaro sebaro added the type:bug Something's broken! label Nov 9, 2022
@ThomasAdam ThomasAdam added this to FVWM3 Nov 10, 2022
@ThomasAdam ThomasAdam moved this to To do in FVWM3 Nov 10, 2022
@ThomasAdam ThomasAdam added this to the 1.0.6 milestone Nov 10, 2022
@ThomasAdam ThomasAdam added the relates:ewmh Issues is in EWMH/ICCCM2 handling code label Nov 10, 2022
@ThomasAdam
Copy link
Member

Hi @sebaro

I can't reproduce this. If you compile fvwm3 with debug symbols, can you get a corefile and hence a backtrace for me to analyse?

@sebaro
Copy link
Author

sebaro commented Nov 11, 2022

How do I get this? I tried with CFLAGS="-Og -g2 -ggdb" but this causes an issue with FvwmPager "malloc:zero size".

@ThomasAdam
Copy link
Member

How do I get this? I tried with CFLAGS="-Og -g2 -ggdb" but this causes an issue with FvwmPager "malloc:zero size".

I would say:

make CFLAGS="-O0 -ggdb"

Don't worry about FvwmPager -- if that's really a problem we can fix it after the fact.

@sebaro
Copy link
Author

sebaro commented Nov 12, 2022

With the latest git there's no crash with VLC but with the pager, when I open an app the pager disappears and on app minimize fvwm crashes.
Attached core dumps for 1.0.5 (vlc), git (pager):
core_.tar.gz

@ThomasAdam
Copy link
Member

@sebaro

Those files you've sent through aren't corefiles -- so I can't use them.

So are you now saying that vlc no longer crashes, but FvwmPager does?

Please heed the bug report instructions next time -- it does ask you to try the git version of fvwm3 before reporting bugs.

@ThomasAdam
Copy link
Member

Even with your new instructions, I can't make FvwmPager segfault.

Can you send me through your entire fvwm config, please?

@sebaro
Copy link
Author

sebaro commented Nov 13, 2022

This is in the vlc core dump:

Core was generated by `fvwm3'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f54e91f27ef in free () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f54e91f27ef in free () from /lib64/libc.so.6
#1  0x00007f54ea13b959 in XFree () from /usr/lib64/libX11.so.6
#2  0x0000557bc16fab32 in AddWindow ()
#3  0x0000557bc16e13b5 in HandleMapRequestKeepRaised ()
#4  0x0000557bc16e358e in dispatch_event ()
#5  0x0000557bc16e444c in HandleEvents ()
#6  0x0000557bc16c0513 in main ()

I don't get this with the latest git, but two issues with FvwmPager and IconBox.

FvwmPager disappears when opening an app, the problem is this option:

*FvwmPager: WindowBorderWidth 0

IconBox crashes fvwm with these two options:

Style * IconBackgroundRelief 0
Style * IconBackgroundPadding 0

My config
https://gist.github.com/sebaro/81190adcea808358938eb14d6ec391a2

@ThomasAdam
Copy link
Member

@sebaro

Regarding the FvwmPager issue, can you try the following:

diff --git a/libs/Graphics.c b/libs/Graphics.c
index 5bf7b6628..c929338aa 100644
--- a/libs/Graphics.c
+++ b/libs/Graphics.c
@@ -119,7 +119,7 @@ void do_relieve_rectangle_with_rotation(
        }
        max_w = min((w + 1) / 2, line_width);
        max_h = min((h + 1) / 2, line_width);
-       seg = fxmalloc(sizeof(XSegment) * line_width * 2);
+       seg = fxmalloc(sizeof(XSegment) * line_width * 2 + 1);
        /* from 0 to the lesser of line_width & just over half w */
 
        /* left */

When you say "IconBox crashes fvwm with these two options" -- what do you mean? IconBox is just an area for icons to reside when an application is iconified. Are you saying fvwm3 is crashing?

@sebaro
Copy link
Author

sebaro commented Nov 13, 2022

The patch works.

When you say "IconBox crashes fvwm with these two options" -- what do you mean? IconBox is just an area for icons to reside when an application is iconified. Are you saying fvwm3 is crashing?

Yes, fvwm3 crashes when I minimize/iconify apps. Commenting the "IconBackground" style options fixes this issue.
Edit: IconBox it's fine now, maybe related to the pager issue.

ThomasAdam added a commit that referenced this issue Nov 13, 2022
When computing the border rectangle of windows, set those to just 1
pixel, so that existing rendering routines continue to function.

Fixes #755
ThomasAdam added a commit that referenced this issue Nov 13, 2022
When computing the border rectangle of windows, set those to just 1
pixel, so that existing rendering routines continue to function.

Fixes #755
Repository owner moved this from To do to Done in FVWM3 Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates:ewmh Issues is in EWMH/ICCCM2 handling code type:bug Something's broken!
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants