Menu

#174 xfig seg faults upon launch

xfig
open
nobody
None
2024-04-11
2024-03-17
Haris Ayub
No

Using xfig 3.2.9 on arch linux with the linux zen kernel version 6.7.9.

To reproduce: launch xfig.

console output:

Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-*-times-medium-r-normal--16-*-*-*-*-*-*-*,-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*" to type FontSet
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Warning: Cannot convert string "7x13bold" to type FontStruct
Segmentation fault (core dumped)

Journalctl output:

Mar 17 00:59:25 AppleMacbookProMid2015Archlinux kernel: Code: 41 5f c3 0f 1f 00 f3 0f 1e fa 48 8b 02 ff 60 30 66 0f 1f 44 00 00 f3 0f 1e fa 48 8b 02 ff 60 38 66 0f 1f 44 00 00 f3 0f 1e fa <48> 8b 07 ff 60 18 66 0f 1f 44 00 00 f3 0f 1e fa 48 8b 07 ff 60 20
Mar 17 00:59:25 AppleMacbookProMid2015Archlinux systemd[1]: Started Process Core Dump (PID 263404/UID 0).
Mar 17 00:59:25 AppleMacbookProMid2015Archlinux systemd-coredump[263405]: Process 263403 (xfig) of user 1000 dumped core.

                                                                          Stack trace of thread 263403:
                                                                          #0  0x00007e510df6eb94 XmbTextEscapement (libX11.so.6 + 0x5fb94)
                                                                          #1  0x00007e510e0f8bd9 n/a (libXaw3d.so.8 + 0x20bd9)
                                                                          #2  0x00007e510e065519 n/a (libXt.so.6 + 0x13519)
                                                                          #3  0x00007e510e06f7d7 n/a (libXt.so.6 + 0x1d7d7)
                                                                          #4  0x00007e510e06fbe0 _XtCreateWidget (libXt.so.6 + 0x1dbe0)
                                                                          #5  0x00007e510e06fe9b XtCreateWidget (libXt.so.6 + 0x1de9b)
                                                                          #6  0x000055c1e7445817 rebuild_file_menu (xfig + 0x81817)
                                                                          #7  0x000055c1e7448384 create_menu_item (xfig + 0x84384)
                                                                          #8  0x000055c1e73cdcf3 main (xfig + 0x9cf3)
                                                                          #9  0x00007e510c507cd0 n/a (libc.so.6 + 0x25cd0)
                                                                          #10 0x00007e510c507d8a __libc_start_main (libc.so.6 + 0x25d8a)
                                                                          #11 0x000055c1e73d08d5 _start (xfig + 0xc8d5)
                                                                          ELF object binary architecture: AMD x86-64
Mar 17 00:59:25 AppleMacbookProMid2015Archlinux systemd[1]: systemd-coredump@3-263404-0.service: Deactivated successfully.

Willing to offer any required information upon request.

Related

Tickets: #177

Discussion

  • tkl

    tkl - 2024-04-02

    Sorry for the late answer. I could not yet reproduce the issue. Could you (a) report your LC_CTYPE setting, (b) compile with debug symbols enabled to get a more meaningful stack trace? Probably (c), move away your $HOME/.xfigrc file before starting. The warning indicates that fonts are missing, on archlinux these would be contained in the packages xorg-fonts-75dpi and xorg-fonts-100dpi. There is a small probability that installing these packages mends the issue.

     
    • Haris Ayub

      Haris Ayub - 2024-04-02

      A) LC_CTYPE="en_GB.UTF-8"

      B) I am not sure how to enable debug symbols. After some research online I am aware that I am required to include a '-g' flag in the Makefile, however I am not sure how to do this.

      C) I removed the .xfigrc file and the problem still persists. I also reinstalled the required fonts as they were already installed. I also tried to use the xfig-git package. I was able to get xfig working by compiling a copy of the source code i downloaded from source forge, however I would prefer this application work via the aur.

       
  • fahasch

    fahasch - 2024-04-03

    This issue which I have reported to homebrew might be related. My LC_CTYPE is UTF-8. The stacktrace is

        frame #0: 0x00000001008b5500 libX11.6.dylib`XmbTextEscapement
        frame #1: 0x0000000100687424 libXaw3d.8.dylib`GetDefaultSize + 92
        frame #2: 0x000000010072b604 libXt.6.dylib`CallInitialize + 176
        frame #3: 0x000000010072a940 libXt.6.dylib`xtCreate + 524
        frame #4: 0x000000010072a64c libXt.6.dylib`_XtCreateWidget + 408
        frame #5: 0x000000010006140c xfig`rebuild_file_menu + 240
        frame #6: 0x0000000100061760 xfig`create_menu_item + 296
        frame #7: 0x00000001000610d8 xfig`init_main_menus + 480
        frame #8: 0x00000001000a2968 xfig`main + 3144
        frame #9: 0x00000001848610e0 dyld`start + 2360
    
     
  • tkl

    tkl - 2024-04-04

    Here xfig also segfaults if configured with --without-xaw3d (./configure --without-xaw3d [other options]). This is strange, because in the PKGBUILD 'xaw3d' is required as dependency.
    Could you confirm, that xfig works correctly if started with xfig -nointernational?
    To get a binary with debug symbols when installing from an aur package, try makepkg CFLAGS="-O0 -g" in the directory where the PKGBUILD resides.

     
  • fahasch

    fahasch - 2024-04-09

    I can confirm that xfig -nointernation does not segfault.

    Compiling without optimization (in addition to having the debug symbols), I still get the backtrace

    * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
      * frame #0: 0x00000001008b52e0 libX11.6.dylib`XmbTextEscapement
        frame #1: 0x0000000100687424 libXaw3d.8.dylib`GetDefaultSize + 92
        frame #2: 0x000000010072b604 libXt.6.dylib`CallInitialize + 176
        frame #3: 0x000000010072a940 libXt.6.dylib`xtCreate + 524
        frame #4: 0x000000010072a64c libXt.6.dylib`_XtCreateWidget + 408
        frame #5: 0x0000000100061404 xfig`rebuild_file_menu + 240
        frame #6: 0x0000000100061758 xfig`create_menu_item + 296
        frame #7: 0x00000001000610d0 xfig`init_main_menus + 480
        frame #8: 0x00000001000a2968 xfig`main + 3144
        frame #9: 0x000000019226e0e0 dyld`start + 2360
    (lldb)
    

    when the segfault occurs.

     
  • tkl

    tkl - 2024-04-11

    I am working on the issue. Fortunately, it is reproducible in my environment. The underlying cause is xfig, under some configurations, shipping itself outdated Xaw header files and even sources. For the time being, the workaround is to use xfig in non-international mode. This can be done either on the command line, as per the comment above, or by setting the resource: Fig.international: False and probably also Fig*international: False in the resource file. (E.g., $HOME/Figor /etc/X11/app-defaults/Fig.)

     

Log in to post a comment.