fvwm3 icon indicating copy to clipboard operation
fvwm3 copied to clipboard

Special characters leads FvwmIconMan, FvwmIdent crash.

Open llc0930 opened this issue 1 year ago • 18 comments

Upfront Information

  • Fvwm3 version fvwm3 1.0.4 (released) with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, XRandR, XRender, XCursor, XFT, NLS
  • Linux distribution or BSD name/version Linux 5.18.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.14-1 (2022-07-23) x86_64 GNU/Linux
  • Platform 12th Gen Intel(R) Core(TM) i5-12500

Expected Behaviour

No unexpected crashes.

Actual Behaviour

Special characters leads FvwmIconMan, FvwmIdent crash.

Steps to Reproduce

  1. Open any program whose title contains special characters. e.g., use browser open following link: 【歌枠🎤初見さん大歓迎】歌枠!ボカロ/アニソン/J-POP!【新人Vtuber/水羽そら】
  2. FvwmIconMan crash, FvwmIdent can't open.
  • Does the problem also happen with Fvwm2? I didn't try.

Does Fvwm3 crash?

Only module, I think.

Extra Information

  • Screen capture: 螢幕截圖2022-07-30 03-32-23 螢幕截圖2022-07-30 03-33-42

llc0930 avatar Jul 29 '22 20:07 llc0930

Emm, like #622.

llc0930 avatar Jul 29 '22 21:07 llc0930

I use "xft:Noto Sans Mono CJK TC" for all fonts, include browser. I found only two situations:

  1. Can be displayed without color Screenshot 2022-07-29 at 23-09-28 Find all Unicode Characters from Hieroglyphs to Dingbats – Unicode Compart FvwmIconMan 螢幕截圖2022-07-30 07-10-04 FvwmIdent 螢幕截圖2022-07-30 07-08-58
  2. Can't be displayed without color Screenshot 2022-07-29 at 23-16-34 Find all Unicode Characters from Hieroglyphs to Dingbats – Unicode Compart FvwmIconMan crash, FvwmIdent can't open.

llc0930 avatar Jul 29 '22 23:07 llc0930

Seems to work OK for me:

fi_000

If you're still seeing crashes, you'll need to get me a stacktrace from a corefile.

ThomasAdam avatar Jul 30 '22 14:07 ThomasAdam

(gdb) bt full #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 set = {__val = {0, 0, 0, 0, 0, 0, 21110936785932829, 140577212518416, 21110988325554571, 140577151701008, 21111039865139264, 9416433858932169728, 7, 140724890518352, 256, 140724890518592}} pid = <optimized out> tid = <optimized out> ret = <optimized out> #1 0x00007fdaaf3af546 in __GI_abort () at abort.c:79 save_stage = 1 act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {140724890509632, 0, 140724890509632, 94476856495008, 140577218393001, 11, 94476857352464, 137438953472, 94476856593968, 94476856495008, 9416433858932169728, 8, 117094908947468288, 32, 9416433858932169728, 94476857361824}}, sa_flags = 287065520, sa_restorer = 0x7ffd111c45b0} sigs = {__val = {32, 9416433858932169728, 94476857324496, 140724890518352, 256, 140724890518592, 94476856495008, 2361183241434822607, 206158430224, 140724890518560, 140724890518352, 9416433858932169728, 140724890518368, 9416433858932169728, 27263283, 94476824564384}} #2 0x000055ed198f2cfe in ?? () No symbol table info available. --Type <RET> for more, q to quit, c to continue without paging-- #3 0x000055ed198f2de7 in ?? () No symbol table info available. #4 0x000055ed198cee0b in ?? () No symbol table info available. #5 0x00007fdaaf76171b in _XError () from /lib/x86_64-linux-gnu/libX11.so.6 No symbol table info available. #6 0x00007fdaaf75e387 in ?? () from /lib/x86_64-linux-gnu/libX11.so.6 No symbol table info available. #7 0x00007fdaaf75e425 in ?? () from /lib/x86_64-linux-gnu/libX11.so.6 No symbol table info available. #8 0x00007fdaaf75eed2 in _XEventsQueued () from /lib/x86_64-linux-gnu/libX11.so.6 No symbol table info available. #9 0x00007fdaaf7405ca in XFlush () from /lib/x86_64-linux-gnu/libX11.so.6 No symbol table info available. #10 0x000055ed198d4091 in ?? () No symbol table info available. #11 0x000055ed198c6dd3 in ?? () No symbol table info available. #12 0x000055ed198c55b5 in ?? () No symbol table info available. #13 0x00007fdaaf3b081d in __libc_start_main (main=0x55ed198c5130, argc=6, argv=0x7ffd111c4a08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd111c49f8) at ../csu/libc-start.c:332 self = <optimized out> result = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = {94476824437664, -5775481537633071515, 94476824237648, 0, 0, 0, 5774595610087640677, 5795007173262167653}, mask_was_saved = 0}}, priv = {pad = { 0x0, 0x0, 0x6, 0x7ffd111c4a08}, data = {prev = 0x0, cleanup = 0x0, canceltype = 6}}} not_first_call = <optimized out> #14 0x000055ed198c567a in ?? () No symbol table info available.

llc0930 avatar Jul 30 '22 16:07 llc0930

Yeah, that's no good to me -- not only is the formatting abysmal, but also you'll need to ensure you build fvwm3 with debug symbols: adding -ggdb -O0 to CFLAGS.

ThomasAdam avatar Jul 30 '22 16:07 ThomasAdam

It still crashes for me. The issue seems to depend on the font being used, maybe try to use some other fonts. Though this issue has been reported multiple times. Wonder if it is more than just the font but the actual xft library fvwm is being compiled against.

somiaj avatar Jul 30 '22 16:07 somiaj

I'm going to compile the git version and give it a try.

llc0930 avatar Jul 30 '22 16:07 llc0930

Still crash. FvwmIconMan.txt FvwmIdent.txt

llc0930 avatar Jul 30 '22 17:07 llc0930

The patch is fine, now the remaining problem is the balloon. 2022-08-04-23:08:55

But sometimes the back of the title still disappears. 2022-08-04-23:12:38

Is there a way to set fallback font in config? I can use other font to display emoji normally, but I prefer other char to display with my orgin font. 🥺 2022-08-04-23:16:44

llc0930 avatar Aug 04 '22 15:08 llc0930

Also, although I don't think any normal person would do that. Set the font to "Noto Color Emoji", FvwmIconMan still will crash.

llc0930 avatar Aug 04 '22 16:08 llc0930

We're still looking at this and the patch is an initial POC. Thanks for the feedback. Setting a fallback emoji font is a nice idea.

topcat001 avatar Aug 04 '22 17:08 topcat001

After I installed other fonts that can display emoji normally, the fallback function was normal without the patch. 2022-08-05-01:53:00-s

But when the window gets focus or switch between desks, pages, the back part of the title still disappears. 2022-08-05-01:53:25-s

By the way, after try "fonts-symbola" with apt, finally I choose manually installed "NotoEmoji". At least their styles are now consistent. I'm not sure why the colored version "fonts-noto-color-emoji" is causing the problem.

llc0930 avatar Aug 04 '22 18:08 llc0930

Thanks for the testing. The patch isn't quite right, but I'll work with @topcat001 to get something which is, next week.

ThomasAdam avatar Aug 04 '22 18:08 ThomasAdam

Thanks for your work, fvwm is a great project.

llc0930 avatar Aug 04 '22 18:08 llc0930

@lolicon0930 I noticed the title disappearing problem too. Do you also get it with your installed fonts but without the patch?

topcat001 avatar Aug 04 '22 18:08 topcat001

@topcat001 Yes, as mentioned by https://github.com/fvwmorg/fvwm3/issues/680#issuecomment-1205633816 above.

llc0930 avatar Aug 04 '22 19:08 llc0930

Ok thanks. So I think that is a separate issue from the crash that I was trying to fix. As I said I see it too and will look into it. The other crash with the icon manager with a pure emoji font is also interesting. I will try to reproduce it, thanks!

topcat001 avatar Aug 04 '22 19:08 topcat001

This is actually an issue in XFT that was fixed three years ago, and merged 3 months ago.

https://gitlab.freedesktop.org/xorg/lib/libxft/-/commit/6a08279ee80dbd1a226592d7f18c862c2e4a7d3a

Upgrade to xft 2.3.6 to get color emoji's working correctly.

somiaj avatar Nov 06 '22 23:11 somiaj