mouse cursor gets trapped in a Motif drawing area when creating a popup menu

Bug #581032 reported by Yves Laprie
This bug report is a duplicate of:  Bug #553415: mouse trapped in box for Open Motif. Edit Remove
72
This bug affects 12 people
Affects Status Importance Assigned to Milestone
X.Org X server
Unknown
Unknown
Fedora
Unknown
Unknown
Ubuntu
Confirmed
Undecided
Unassigned
Nominated for Dapper by jpltanis
Nominated for Hardy by jpltanis
Nominated for Jaunty by jpltanis
Nominated for Karmic by jpltanis
Nominated for Lucid by Chris Carlin
Nominated for Maverick by Chris Carlin

Bug Description

This bug appeared when changing to Ubuntu 10.4 with OpenMotif and Lesstif as well.

The mouse is trapped in the Drawing area where a popup menu should appear.

To replicate this problem just use the program simple_popup.c from http://www.ist.co.uk/motif/books/vol6A/ch-19.fm.html.
I compiled this program with gcc simple_popup.c -lXm.
After clicking the button 3 (the right one) the pointer is trapped in the window without any popup menu.

In the previous version (9.10) the menu did appear correctly.

Best regards,
Yves

Revision history for this message
Yves Laprie (yveslaprie) wrote :

Thre is a bug somewhat similar reported in https://bugzilla.redhat.com/show_bug.cgi?id=543647. and called "Mouse cursor gets trapped in *tif menu button"

Revision history for this message
Yves Laprie (yveslaprie) wrote :
Revision history for this message
Jerry Dunmire (jerry-dunmire) wrote :

I see this problem with xastir. The problem as been fully diagnosed, and a fix developed, at the fedora core bugzilla site. See bug# 543647.

The problem is with xorg-x11 server 1.7.5 and has been fixed in a newer version (possibly 1.7.99, though that may be a fedora core number).

Revision history for this message
YvesDelannoy (yves-delannoy) wrote :

Please, Jerry, can you comment on the relation between bug# 543647 and the bug of this thread, concerning Motif?
 I cannot see why tag_sort_func is involved... and how to use the fix...

Otherwise, in ubuntu the latest X server version is in the package xserver-xorg 1:7.5+5ubuntu1 , seems like 1.7.5 with ubuntu customization... And on www.x.org/wiki they say that the next release (X11R7.6, or 1.7.6?) will be in october...

Revision history for this message
Jerry Dunmire (jerry-dunmire) wrote :

Hi Yves,
Sorry for the confusion, the bug number is not an Ubuntu bug number, but from the Fedora Core bugzilla site:
https://bugzilla.redhat.com/show_bug.cgi?id=543647

I have also found similar reports for other distros. The problem is fixed in X11 1.7.6.

I successfully applied a patch yesterday from one of the other distros. I don't have the details or patch I used at hand, and it is certainly not in the proper form for this forum. However if you are interested I can post the patch that I used, with some simple instructions, this evening after I get home.

Revision history for this message
Jerry Dunmire (jerry-dunmire) wrote :

Hi Yves,
Here are the notes I promised earlier today:

I found a patch discussed at http://bugs.archlinux.org/task/18598. The direct URL is http://bugs.archlinux.org/task/18598?getfile=4963. I believe the patch is from http://<email address hidden>/msg05737.html, but I did not verify.

I hacked the patch file so that I could make it apply in my environment. The hacked patch file is attached.

Here is a summary of how I built and installed a replacement .deb:

  $ sudo apt-get install build-essential fakeroot dpkg-dev devscripts
  $ apt-get source xserver-xorg-core
  $ sudo apt-get build-dep xserver-xorg-core
  $ cd xorg-server-1.7.6/
  $ patch -p1 </tmp/xorg-patch.patch
  $ dch -i
  $ dpkg-buildpackage -rfakeroot -uc -b
  $ cd ..
  $ sudo dpkg -i xserver-common_1.7.6-2ubuntu8_all.deb

This did fix the problem for me.

Let me know if you have any more questions.

Revision history for this message
Yves Laprie (yveslaprie) wrote : Re : [Bug 581032] Re: mouse cursor gets trapped in a Motif drawing area when creating a popup menu

Hi Jerry,

Thank for your solution. I am far from my office. I will thus test your patch next week.

Best regards,
Yves

________________________________
De : Jerry Dunmire <email address hidden>
À : <email address hidden>
Envoyé le : Mer 2 juin 2010, 4h 57min 29s
Objet : [Bug 581032] Re: mouse cursor gets trapped in a Motif drawing area when creating a popup menu

Hi Yves,
Here are the notes I promised earlier today:

I found a patch discussed at http://bugs.archlinux.org/task/18598. The
direct URL is http://bugs.archlinux.org/task/18598?getfile=4963. I
believe the patch is from http://www.mail-archive.com/xorg-
<email address hidden>/msg05737.html, but I did not verify.

I hacked the patch file so that I could make it apply in my environment.
The hacked patch file is attached.

Here is a summary of how I built and installed a replacement .deb:

  $ sudo apt-get install build-essential fakeroot dpkg-dev devscripts
  $ apt-get source xserver-xorg-core
  $ sudo apt-get build-dep xserver-xorg-core
  $ cd xorg-server-1.7.6/
  $ patch -p1 </tmp/xorg-patch.patch
  $ dch -i
  $ dpkg-buildpackage -rfakeroot -uc -b
  $ cd ..
  $ sudo dpkg -i xserver-common_1.7.6-2ubuntu8_all.deb

This did fix the problem for me.

Let me know if you have any more questions.

** Patch added: "this patch was applied manually and is not properly formated for release."
  http://launchpadlibrarian.net/49534821/xorg-server.patch

--
mouse cursor gets trapped in a Motif drawing area when creating a popup menu
https://bugs.launchpad.net/bugs/581032
You received this bug notification because you are a direct subscriber
of the bug.

Status in Ubuntu: New

Bug description:
This bug appeared when changing to Ubuntu 10.4 with OpenMotif and Lesstif as well.

The mouse is trapped in the Drawing area where a popup menu should appear.

To replicate this problem just use the program simple_popup.c from http://www.ist.co.uk/motif/books/vol6A/ch-19.fm.html.
I compiled this program with gcc simple_popup.c -lXm.
After clicking the button 3 (the right one) the pointer is trapped in the window without any popup menu.

In the previous version (9.10) the menu did appear correctly.

Best regards,
Yves

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/ubuntu/+bug/581032/+subscribe

Revision history for this message
Monker1980 (j-s-forrest) wrote :

Jerry,

I tried following your steps, but the patching step failed, saying 1 out of 1 hunk failed. I take it this isn't right?

Thanks,
James

Revision history for this message
Jerry Dunmire (jerry-dunmire) wrote :

Hi James,
You're right- I goofed. Sorry for wasting your time.
I had a file name collision between the original patch and my hacked version. Attached is the correct (and renamed) file.

Two other notes-You will also have to install xserver-xorg-core_1.7.6-2ubuntu8_i386.deb which will be in the same directory as xserver-common_1.7.6-2ubuntu8_all.deb:
  $ sudo dpkg -i xserver-xorg-core_1.7.6-2ubuntu8_i386.deb

and you will need to reboot (restarting the X server will probably work).

There are other .deb files created by the dpkg-buildpackage step, but I did not install them. I don't know it that will cause other problems, but I haven't seen any yet.

Finally- I did try to build the simple_popup program that Yves used to report the problem, but the program would not run for me. I tried both before and after installing the patched xserver debs. The run time error I get is:

$ ./simple_popup
Warning: XmManager ClassInitialize: XmeTraitSet failed

Error: attempt to add non-widget child "DropSiteManager" to parent "simple_popup" which supports only widgets

Note that I only installed the lesstif package and not Motif.

Hope this post corrects enough of my mistakes that others can get something work.

Revision history for this message
Monker1980 (j-s-forrest) wrote :

Jerry,

Thanks for your quick reply. I'll try this when I'm back in the office tomorrow.

One other thing - I am running 64bit Lucid, but my files all end in 7 instead of 8 e.g. xserver-xorg-core_1.7.6-2ubuntu7.

Not sure why this is.

James

Revision history for this message
Monker1980 (j-s-forrest) wrote :

OK - so I had already followed the steps suggested by Hein Zelle here (https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-180/+bug/553415), which initially didn't appear to work. But the crucial bit, as Jerry said, was to reboot the machine. On turning on my PC this morning the motif problem is fixed. So I didn't need to use Jerry's reposted patch in the end.

Revision history for this message
Thomas Witzel (witzel-thomas) wrote :

Hi,
I came up with basically the same solution as Jerry a while ago and have been anxiously waiting for a new xorg-server release from Ubuntu. What has to be done to get this pushed ? Maybe its not considered serious, but many scientific applications are still Motif based, so 10.04 workstations are almost useless without the patch in our environment. While we can patch easily, its harder to pass along a patch for our users along with the apps :-)

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
YvesDelannoy (yves-delannoy) wrote :

I followed exactly jerry's instructions (post #6) in my Ubuntu 10.04 64bit system.

Unfortunatly the dpkg-buildpackage command, after a lot of successful compilations, failed with the following last lines :
  man: manp.c :1045 : get_manpath_from_path: L'assertion « len » a échoué.

  Aborted

  dh_installman: man --recode UTF-8 ./xvfb\-run\.1 > xvfb\-run\.1\.new returned exit code 134

  make: *** [binary-arch] Erreur 2

  dpkg-buildpackage: erreur: fakeroot debian/rules binary a produit une erreur de sortie de type 2

A copy of the complete output is attached to this post

The I was able to install xserver-common_1.7.6-2ubuntu7_all.deb but not xserver-xorg-core_1.7.6-2ubuntu7_amd64.deb , which is not present in my ~/tmp directory

Revision history for this message
YvesDelannoy (yves-delannoy) wrote :

  Following the preceding post, it seems that there is a permission problem in the source package for xserver-xorg (which is downloaded by 'apt-get source xserver-xorg-core').
  In brief, a man page was installed as executable what prevented it to be recoded in UTF-8 (perhaps it is related to my locale, fr_FR.UTF-8), and perhaps it would disappear if you build the packages as root...
  But nevertheless, a workaround is to modify the procedure from post #6 as follow (mv, sed and chmod added) :

  $ sudo apt-get install build-essential fakeroot dpkg-dev devscripts
  $ apt-get source xserver-xorg-core
  $ sudo apt-get build-dep xserver-xorg-core
  $ cd xorg-server-1.7.6/
  $ patch -p1 </tmp/xorg-patch.patch
$ mv debian/rules debian/rules.orig
$ sed -e '244s/install/install -m 644/' debian/rules.orig > debian/rules
$ chmod 755 debian/rules
  $ dpkg-buildpackage -rfakeroot -uc -b
  $ cd ..
  $ sudo dpkg -i xserver-common_1.7.6-2ubuntu7_all.deb
  $ sudo dpkg -i xserver-xorg-core_1.7.6-2ubuntu7_amd64.deb

  Of course, you sould replace /tmp/xorg-patch.patch by the path to the patch file downloaded from post #9; and you should do all that from a temporary directory where you have rights. Note that I don't use dch -i because I'm not the maintainer of the package, and consequently the new version is different from the one of post #6
  In the last command, replace amd64 by i386 if you're working with a 32 bit version of ubuntu.

Revision history for this message
YvesDelannoy (yves-delannoy) wrote :

Well, just another comment added to post #14, I think it is better to install all the packages that were generated, to maintain their coherence, ie replace the two last operations by :
  sudo dpkg -i xserver-common_1.7.6-2ubuntu7_all.deb
  sudo dpkg -i xdmx_1.7.6-2ubuntu7_amd64.deb xdmx-tools_1.7.6-2ubuntu7_amd64.deb xnest_1.7.6-2ubuntu7_amd64.deb \
    xserver-xephyr_1.7.6-2ubuntu7_amd64.deb xserver-xfbdev_1.7.6-2ubuntu7_amd64.deb \
    xserver-xorg-core_1.7.6-2ubuntu7_amd64.deb xserver-xorg-core-dbg_1.7.6-2ubuntu7_amd64.deb \
    xserver-xorg-dev_1.7.6-2ubuntu7_amd64.deb xvfb_1.7.6-2ubuntu7_amd64.deb
(or the same with i386 in place of amd64 if you're working on a 32bit system)

and then I blocked them from beeing updated (in synaptics, this is available in the "package" menu)... Of course, have to un-block them when a corrected version will be available online!

And by the way, it works! no more mouse trap!

Revision history for this message
Chris Carlin (crcarlin) wrote :

Packages including the patch are now in my ppa: https://launchpad.net/~crcarlin/+archive/ppa

I'm still messing around with versioning since the other packages in my repository require this patched version to work.

Revision history for this message
Chris Carlin (crcarlin) wrote :

So it looks like this bug affects a lot of motif applications, causing them to basically lock up X (my users tend to hit the reset button instead of figuring out how to kill from a text console). The bug was tracked to its source and a working patch was offered.

Redhat accepted the patch and closed the bug.

I think it's therefore reasonable to nominate the fix for release.

Revision history for this message
Graham Inggs (ginggs) wrote :

I came across this problem with the commercial Fluent preprocessor, GAMBIT 2.4.6, on Ubuntu 10.04.
It worked previously with Ubuntu 9.10. Installing Chris Carlin's xorg-server - 2:1.7.6-2ubuntu7.3~ppa0 package solves the problem with Ubuntu 10.04.

Revision history for this message
Chris Carlin (crcarlin) wrote :

Sorry for the spam everyone, but I wanted to make a note for next time I forget what the status of this thing is: the bug doesn't show up in a Maverick installation.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.