Bug 436998 - xfig-xaw3d is freezing
Summary: xfig-xaw3d is freezing
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xfig
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 464418 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-11 16:12 UTC by Sammy
Modified: 2008-10-24 23:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-24 23:52:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sammy 2008-03-11 16:12:10 UTC
The latest (3.2.5-7.fc8) xfig-xaw3d  freezes after starting the binary
and clicking on one of the drawing options, such as an ellipse.

The Xt based xfig does not freeze.

I am running F8+all updates and on a x86_64 system.
Thanks

Comment 1 Hans de Goede 2008-03-11 19:11:38 UTC
I cannot reproduce this. Do you have any other machines you could test this at,
to see if its machine specific? (Or if I'm doing something wrong with
reproducing it).



Comment 2 Sammy 2008-03-11 20:34:45 UTC
Yes. I just tested on my 32-bit laptop and it is working fine there.
Do you have a 64-bit machine?

Comment 3 Hans de Goede 2008-03-11 20:46:50 UTC
(In reply to comment #2)
> Do you have a 64-bit machine?

Yes, but its running an fully up2date rawhide. So it might still be an 64 bit
bug in F-8 + updates, which is fixed in rawhide.


Comment 4 Sammy 2008-03-12 14:24:05 UTC
I presume it is. What seems to be happening is that the mouse clicks no longer
function on xfig window. Also, if you start xfig from a terminal window 
(konsole) in that window ctrl-C does not work and you cannot kill the window
by clicking on the close button. Mouse functions work fine in all the other
windows.
 
This is what I tried yesterday:

1.  I found all the debian/ubuntu patches for Xaw3d and rebuilt the libraries
    and recompiled xfig. This did not help with anything although there are
    a lot of patches for Xaw3d-1.5E.

2.  The other application that uses Xaw3d - xdvi is working fine.

Comment 5 Sammy 2008-03-13 17:36:32 UTC
OK.....I pinned it down. If one has

xfig*customization: -color
xfig*beNiceToColormap: True

Than it does not crash. The culprit is the second line. If I make this
xfig*beNiceToColormap: False
than it freezes.

Comment 6 Hans de Goede 2008-03-14 18:06:12 UTC
(In reply to comment #5)
> OK.....I pinned it down. If one has
> 
> xfig*customization: -color
> xfig*beNiceToColormap: True
> 
> Than it does not crash. The culprit is the second line. If I make this
> xfig*beNiceToColormap: False
> than it freezes.

Hmm,

I still can not reproduce this on a rawhide Fedora x86_64 install, so I'm
inclined to close this as works for me. Even if it _really_ is generally broken
on F-8 x86_64 (which I doubt as I've been using it there for quite a while too),
we simply don't have the time to fix it taking into account the fact that:
1) It is already fixed in rawhide
2) The default xfig version in F-8 is the plain version, that is
   "yum install xfig" will get you the plain xfig not the Xaw3d version.

But before I'm closing this lets take one more stab at reproducing it, so some
more questions:
1) How do you start xfig, "xfig" or "xfig-Xaw3d" ?
2) Do you have any other custom Xresources settings which might affect xfig
3) Do you pass any cmdline options while starting xfig?


Comment 7 Sammy 2008-03-17 13:34:57 UTC
You have to have:

xfig*customization: -color
xfig*beNiceToColormap: False

to have the problem.

1) Either way it has the problem.
2) No. Those are the only custom resources in .Xdefaults
3) No cmd line options.


Comment 8 Hans de Goede 2008-03-17 16:05:35 UTC
(In reply to comment #7)
> You have to have:
> 
> xfig*customization: -color
> xfig*beNiceToColormap: False
> 
> to have the problem.
> 

I already understood as much and even with those present I cannot reproduce
this, so I guess there is something specific to your setup (hardware, X
colordepth, ?) which triggers this.


Comment 9 Konrad Karl 2008-10-05 19:44:02 UTC
Happens here as well (current rawhide, xfig-3.2.5-11.fc10.i386).
this is on fbdev (1280x1024*32) X-server, since the intel
server refuses to start on my machine (BZ 461829)

it loops in XtQueryGeometry (). (height stays at 0.... but I dont
understand the code at a quick glance)

#0  0x001504b4 in DoLayout (bbw=0x95004c0, width=330, height=0, reply_width=0xbfe2a2de, reply_height=0xbfe2a2dc,
    position=0 '\0') at Box.c:191
#1  0x0015091a in PreferredSize (widget=0x95004c0, constraint=0xbfe2a3bc, preferred=0xbfe2a3a4) at Box.c:358
#2  0x0201eb5c in XtQueryGeometry () from /usr/lib/libXt.so.6
#3  0x00177d27 in ComputeLayout (widget=0x94ffc68, query=1 '\001', destroy_scrollbars=1 '\001') at Viewport.c:589
#4  0x001781d1 in Resize (widget=0x94ffc68) at Viewport.c:856
#5  0x0203434a in XtSetValues () from /usr/lib/libXt.so.6
#6  0x080e5291 in sel_mode_but (widget=0x94e9c60, closure=0x8165ea0, event=0xbfe2c124,
    continue_to_dispatch=0xbfe2adf7 "\001���") at w_modepanel.c:639
#7  0x0201bd5e in XtDispatchEventToWidget () from /usr/lib/libXt.so.6
#8  0x0201c596 in ?? () from /usr/lib/libXt.so.6
#9  0x0201b3b7 in XtDispatchEvent () from /usr/lib/libXt.so.6
#10 0x08087435 in main (argc=Cannot access memory at address 0x14a

Comment 10 Konrad Karl 2008-10-05 22:31:42 UTC
..forgot to tell that this is inside Xaw3d-1.5E-11.1.i386

Comment 11 Hans de Goede 2008-10-06 07:08:35 UTC
What windowmanager are you guys using ?

Comment 12 Konrad Karl 2008-10-06 08:55:37 UTC
KDE4. same problem on F9 here at work. Forgot to mention that
the above xfig*beNiceToColormap hack does not help here.

Just tried launching xfig in Xephyr (xnest-like) and it works OK.
Tried twm and kwin windowmanagers and it works.

Thanks for trying to help.

Greetings,
Konrad

Comment 13 Hans de Goede 2008-10-06 09:00:35 UTC
Konrad,

I think I have a fix for this, the Debian Xaw3d package has a patch which fixes a bug which sounds like it is what you are hitting. I'll have a scratch build to test for you soon.

Comment 14 Konrad Karl 2008-10-06 09:13:20 UTC
Good news! thks again. I am really curious about the nature of this bug.

Comment 15 Konrad Karl 2008-10-06 09:42:02 UTC
this patch (taken from debian) fixes it for me. good catch!
Konrad

diff -up Xaw3d-1.5E/xc/lib/Xaw3d/Box.c.ki Xaw3d-1.5E/xc/lib/Xaw3d/Box.c
--- Xaw3d-1.5E/xc/lib/Xaw3d/Box.c.ki    2008-10-06 11:33:11.000000000 +0200
+++ Xaw3d-1.5E/xc/lib/Xaw3d/Box.c       2008-10-06 11:35:32.000000000 +0200
@@ -353,8 +353,16 @@ static XtGeometryResult PreferredSize(wi
        else {
            width = preferred_width;
            do { /* find some width big enough to stay within this height */
+#if 0
                width *= 2;
                if (width > constraint->width) width = constraint->width;
+#endif
+                if (width > constraint->width/2) {  /* avoid short int overflow */
+                  width = constraint->width;
+               }
+                else {
+                  width *= 2;
+                }
                DoLayout(w, width, 0, &preferred_width, &preferred_height, FALSE);
            } while (preferred_height > constraint->height &&
                     width < constraint->width);

Comment 16 Hans de Goede 2008-10-06 10:18:47 UTC
Yes that is the patch, and I managed to reproduce your problem with kde and can confirm too that this patch fixes it, so things are looking good!

While looking into Xaw3d I noticed that the package needed some love in general, so that is what I've given it:

* Tue Oct  6 2008 Hans de Goede <hdegoede> 1.5E-12
- Remove obsolete PreReq and Prefix stuff from specfile
- Fix BuildRoot to match the guidelines
- Require base package by full EVR from devel package
- Drop non relevant Patches and Sources
- Rebase the still relevant patches
- Actually apply the still relevant patches
- Add a patch from Debian fixing an infinite loop (rh436998)
- Add patches from Debian fixes various potential bufferoverflows

Here is a scratch build, please give this a thorough testing, as quite a few fixes went in:
http://koji.fedoraproject.org/koji/taskinfo?taskID=863235

Comment 17 Hans de Goede 2008-10-06 10:25:15 UTC
*** Bug 464418 has been marked as a duplicate of this bug. ***

Comment 18 Konrad Karl 2008-10-06 11:09:30 UTC
tested on F9, runs just fine. Many thanks, Hans!

Where can I find the src.rpm?

Konrad

Comment 19 Hans de Goede 2008-10-06 11:18:24 UTC
srpm is here:
http://people.atrpms.net/~hdegoede/Xaw3d-1.5E-12.fc10.src.rpm

I'll commit the changes and do F-8 and F-9 updates of Xaw3d when I get the necessary rights in CVS (for which I have applied).

Comment 20 Konrad Karl 2008-10-06 19:00:46 UTC
Just being curious, what was so special in my environment to trigger this bug?
Konrad

Comment 21 Hans de Goede 2008-10-06 21:01:46 UTC
Logging into KDE instead of gnome made me able to reproduce it, so I guess that KDE plays a role, probably kwm.

Comment 22 Fedora Update System 2008-10-07 21:22:22 UTC
Xaw3d-1.5E-12.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/Xaw3d-1.5E-12.fc8

Comment 23 Fedora Update System 2008-10-07 21:23:36 UTC
Xaw3d-1.5E-12.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/Xaw3d-1.5E-12.fc9

Comment 24 jonne 2008-10-08 18:19:23 UTC
Thanks Hans! I tested with the above update for Fedora 9 and confirm that it solved my problem.

Comment 25 Fedora Update System 2008-10-09 21:27:33 UTC
Xaw3d-1.5E-12.fc9 has been pushed to the Fedora 9 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 Xaw3d'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8754

Comment 26 Fedora Update System 2008-10-09 21:34:14 UTC
Xaw3d-1.5E-12.fc8 has been pushed to the Fedora 8 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 Xaw3d'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-8746

Comment 27 Fedora Update System 2008-10-24 23:52:30 UTC
Xaw3d-1.5E-12.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2008-10-24 23:52:45 UTC
Xaw3d-1.5E-12.fc8 has been pushed to the Fedora 8 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.