Bug 480845 - assertion failed in menubar when xemacs-uim loaded
assertion failed in menubar when xemacs-uim loaded
Product: Fedora
Classification: Fedora
Component: xemacs (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Jerry James
Fedora Extras Quality Assurance
: 520977 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2009-01-20 15:51 EST by Sjoerd Mullender
Modified: 2009-10-20 20:41 EDT (History)
6 users (show)

See Also:
Fixed In Version: 20090217-3.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-09 23:43:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sjoerd Mullender 2009-01-20 15:51:29 EST
Description of problem:
When xemacs-uim is installed, XEmacs dies with an assertion failed as soon as you either click on the menubar or open a new XEmacs frame.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.xemacs -vanilla
2.M-x load-library uim
3.click on menubar
Actual results:
Fatal error: assertion failed, file menubar-x.c, line 579, ABORT()

Expected results:
A menu.

Additional info:
Here is the top of the stack (with xemacs-debuginfo also installed):
#0  0x000000395f832f05 in raise () from /lib64/libc.so.6
#1  0x000000395f834a73 in abort () from /lib64/libc.so.6
#2  0x0000000000489d0f in really_abort () at emacs.c:4693
#3  assert_failed (file=<value optimized out>, line=<value optimized out>, 
    expr=<value optimized out>) at emacs.c:3986
#4  0x00000000005c8e0f in set_frame_menubar (f=0x1315fd0, deep_p=1, 
    first_time_p=0) at menubar-x.c:579
#5  0x00000000005c9105 in pre_activate_callback (widget=0x15fb300, 
    unused_id=<value optimized out>, client_data=0x0) at menubar-x.c:514
#6  0x0000003475c139b0 in XtCallCallbackList () from /usr/lib64/libXt.so.6
#7  0x00000000005de9bb in Start (w=0x2377, ev=0x7fffffffd610, 
    unused_params=<value optimized out>, unused_num_params=0xffffffffffffffff)
    at xlwmenu.c:3542
#8  0x0000003475c4c07d in ?? () from /usr/lib64/libXt.so.6
#9  0x0000003475c4c31d in ?? () from /usr/lib64/libXt.so.6
#10 0x0000003475c4cae6 in _XtTranslateEvent () from /usr/lib64/libXt.so.6
#11 0x0000003475c22215 in XtDispatchEventToWidget () from /usr/lib64/libXt.so.6
#12 0x0000003475c228af in ?? () from /usr/lib64/libXt.so.6
#13 0x0000003475c217b1 in XtDispatchEvent () from /usr/lib64/libXt.so.6
#14 0x0000003475c2f038 in XtAppProcessEvent () from /usr/lib64/libXt.so.6
#15 0x00000000005ac5c4 in emacs_Xt_next_event (emacs_event=0x1615ce0)
    at event-Xt.c:2785
#16 0x00000000004a18ef in event_stream_next_event () at event-stream.c:2001
Comment 1 Tim Taiwanese Liim 2009-01-28 17:23:08 EST
This happens on both i386 and x86_64.
Comment 2 Ville Skyttä 2009-02-02 12:58:09 EST
I don't have an environment available to test this at the moment (F-9 only here, and uim 1.5.x which has the xemacs subpackage does not build on F-9 in mock), so it might take some time until I can test.  In the meantime, I forwarded the report to the upstream xemacs-beta mailing list.
Comment 3 Ville Skyttä 2009-02-04 15:21:45 EST
Upstream recommends trying with XEmacs that has been built without XIM support.  Could you try these scratch builds out and report how it goes wrt. the assertion failure and if you notice any other regressions with the XIM-less build?

Comment 4 Sjoerd Mullender 2009-02-05 09:44:01 EST
With this noxim build I still get the assertion failed when I follow my recipe.
Comment 5 Fedora Admin XMLRPC Client 2009-06-15 14:00:09 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Andy Howell 2009-07-18 11:28:53 EDT
I get the same coredump when I select anything on the menu. I was getting a font error:

Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso10646-1, 				-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, 				*" 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



instead of 


sets rid of that error. It also got rid of this in the scratch buffer at startup:

(1) (xintl/error) Can't initialize XIM: Can't get fontset resource for Input Method

This is under F11 with xemacs-21.5.28-12.fc11.x86_64 and xemacs-21.5.29-1.fc12.x86_64

The abort is happening because compute_menubar_data is returning null. I tried to figure out why to no avail. After several levels of indirection, menu_item_descriptor_to_widget_value_1 is recursively called to build the menus from lisp objects. 

Its having problems with the "Cmds" menu when its trying to define the item "Define Global Abbrev for". It chokes at gui-x.c line 462 when it does the Feval.

      /* Shortcut to avoid evaluating suffix each time */
      if (STRINGP (pgui->suffix))
        suffix2 = pgui->suffix;
Dies here->          suffix2 = Feval (pgui->suffix);
          CHECK_STRING (suffix2);

Debugging lisp evaluation is beyond me :(
Comment 7 Matthias Scheutz 2009-08-03 16:29:32 EDT
I get the same with xemacs-21.5.28-12.fc11.i586, i.e., when I run xemacs and click anywhere on the menu bar, xemacs crashes immediately with the error:

  Fatal error: assertion failed, file menubar-x.c, line 579, 
                                                                                    Fatal error (6).

This does not happen with the -vanilla flag (even after loading the init file).
Comment 8 Jerry James 2009-08-31 17:21:28 EDT
Is anyone willing to try an experiment for me?  I suspect the problem is a buggy, and duplicated, function in /usr/share/xemacs/mule-packages/lisp/mule-base/mule-util.el.  If someone suffering from this problem is feeling brave, try editing that file to comment out the definitions of store-substring, truncate-string-to-width, and truncate-string.  You'll have to bytecompile the file afterwards.  Tell me if that fixes the problem.

I'm going to try this later myself, but if you're in a hurry, this information would be useful.
Comment 9 Tim Taiwanese Liim 2009-09-01 11:18:11 EDT
I did not suffer from this problem (removed xemacs-uim long ago
because it made xemacs unusable), but I tried your change any way.

After loading x-uim, before making any change in mule-util.el, I saw
the same core dump as in Comment #0.  
After commenting the 3 functions you mentioned, and bytecompiling
mule-util.el, I no longer see the core dump when clicking on the menu.

So your fix is good for the core dump.  Thanks a lot!
Comment 10 Jerry James 2009-09-01 15:12:16 EDT
I just pushed a new xemacs-packages-base to fix two other bugs, so the fix for this won't be in the next update.  However, I'll get to work rolling out yet another package with a fix for this bug in it.

Thanks for confirming the fix, Tim.  It has been applied upstream.
Comment 11 Matthias Scheutz 2009-09-01 15:23:46 EDT
For those of you out there who want menus back and don't have time to wait for the fix, the quick fix for me was to uninstall the package that is causing the problem


as I don't seem to use anyway...

Best, Matthias

PS Thanks to everybody who has helped to track this down, and thanks to Jerry for fixing it!
Comment 12 Fedora Update System 2009-09-01 15:36:55 EDT
xemacs-packages-base-20090217-3.fc11 has been submitted as an update for Fedora 11.
Comment 13 Fedora Update System 2009-09-02 20:30:27 EDT
xemacs-packages-base-20090217-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xemacs-packages-base'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9235
Comment 14 Tim Taiwanese Liim 2009-09-03 01:01:00 EDT
Re: Comment #13
I tried 
   su -c 'yum --enablerepo=updates-testing update xemacs-packages-base'
and in my /var/log/yum.log I have (I am in EDT = UTC-5)
    Sep 02 22:37:00 Updated: xemacs-packages-base-20090217-2.fc11.noarch
I thought I should get -3, not -2?  Did I missed anything?  Or should
I wait a bit longer for the update to propagate?
Comment 15 Jerry James 2009-09-03 09:53:38 EDT
The update probably just hadn't propagated to whatever mirror yum chose for you.  Try again and see if you get it.
Comment 16 Jerry James 2009-09-03 10:02:22 EDT
*** Bug 520977 has been marked as a duplicate of this bug. ***
Comment 17 Ram Bhamidipaty 2009-09-03 10:35:44 EDT
I can confirm that the version in fedora-testing has fixed the problem in
bug 520977.
Comment 18 Sjoerd Mullender 2009-09-06 06:56:53 EDT
xemacs-packages-base-20090217-3.fc11 seems to fix the problem for me.  I first installed xemacs-uim again, and restarted XEmacs.  This resulted in the crash I originally described.  After installing the update from updates-testing and restarting XEmacs, I don't get the crash anymore.
Comment 19 Fedora Update System 2009-09-09 23:43:06 EDT
xemacs-packages-base-20090217-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Shodry 2009-10-12 18:54:04 EDT
I have a problem with Updating the package:

[root@PCRodri ~]# yum --enablerepo=updates-testing update xemacs-packages-base
Loaded plugins: refresh-packagekit
updates-testing                                            | 3.4 kB     00:00     
updates-testing/primary_db                                 | 472 kB     00:06     
Setting up Update Process
No Packages marked for Update

This is on Fedora 10 x86_64

I'd like t know if it would be posible to solve that for Fedora 10... 

Comment 21 Shodry 2009-10-12 19:01:45 EDT
Already tried:

[root@PCRodri ~]# yum --enablerepo=updates-testing update xemacs-packages-base-20090217-3.fc11
Loaded plugins: refresh-packagekit
adobe-linux-i386                                         |  951 B     00:00     
http://mirror.ispbrasil.com.br/fedora/releases/10/Everything/x86_64/os/repodata/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
fedora                                                   | 2.8 kB     00:00     
rpmfusion-free                                           | 2.7 kB     00:00     
rpmfusion-free-updates                                   | 2.8 kB     00:00     
rpmfusion-nonfree                                        | 2.7 kB     00:00     
rpmfusion-nonfree-updates                                | 2.8 kB     00:00     
updates                                                  | 3.4 kB     00:00     
Setting up Update Process
Error: No Package Matching xemacs-packages-base-20090217-3.fc11
Comment 22 Jerry James 2009-10-12 22:57:05 EDT
Sorry, I haven't backported any of my recent XEmacs fixes to F-10, because it's been all I could do to keep up with F-11 and later.  I can roll out this particular fix, though.  If you are in a hurry, you can do the bit of work described in comment 8 to get up and running until the update is available.
Comment 23 Shodry 2009-10-13 08:52:51 EDT
Ok, I didn't know that the work explained in comment 8 fixed the problem...

Anyway, I'll try to fix it, but I'm not shure to be able... I would be grateful if you could make a detailed explanation of that way...

Thanks in advantage...
Comment 24 Tim Taiwanese Liim 2009-10-15 17:09:12 EDT
Here is a workaround you can use before Jerry ports the fix to F10.

  - remove xemacs-uim if you don't need uim.  If you don't know
    what uim is, you probably don't need it.

          yum erase xemacs-uim
Comment 25 Tim Taiwanese Liim 2009-10-15 17:58:38 EDT
Re: Comment #23
To do what Jerry said in Comment #8:

    # become root in gnome (or kde)  so you can 
    # write to /usr/shared/...

    # remove xemacs-uim so you can use xemacs menu
        yum erase xemacs-uim

    ls -l $f*  # output edited to fit into bugzilla comment field.
        -rw-r--r-- 1 21031 1999-07-23 02:55 mule-util.el
        -rw-r--r-- 1  6717 2007-05-18 14:24 mule-util.elc

    xemacs $f &   # must run with GUI so we have menu bar.
        # remove these functions
        #     store-substring
        #     truncate-string-to-width
        #     truncate-string
        # They are at line 72 to line 139, inclusive, in
        #     xemacs-packages-base-el-20070427-1.fc8.noarch 
    # in xemacs, from menu, choose 
    #    Lisp (right most one) --> Byte-compile This File
    # the status line of xemacs should say
    #    Wrote /usr/share/.../mule-util.elc

    ls -l $f*  # output edited to fit into bugzilla comment field.
        -rw-r--r-- 1 21031 1999-07-23 02:55 mule-util.el
        -rw-r--r-- 1  6662 2009-10-15 17:40 mule-util.elc

    # now restore xemacs-uim if you want it
        yum install xemacs-uim
Comment 26 Fedora Update System 2009-10-15 18:03:19 EDT
xemacs-packages-base-20070427-3.fc10 has been submitted as an update for Fedora 10.
Comment 27 Jerry James 2009-10-15 18:05:00 EDT
Thanks for helping out, Tim.  I've gone out on a limb here and done my first ever non-new-package push directly to stable to get this fixed ASAP.  Let me know if problems persist after the update becomes available.
Comment 28 Shodry 2009-10-15 22:14:50 EDT
Problem solved, thank you so much...
Comment 29 Fedora Update System 2009-10-20 20:41:46 EDT
xemacs-packages-base-20070427-3.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.