This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 201992 - xfig crashes in the edit function
xfig crashes in the edit function
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xfig (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
: Reopened
Depends On:
Blocks: 226557 F8Target
  Show dependency treegraph
 
Reported: 2006-08-10 04:26 EDT by Saku Suuriniemi
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version: 3.2.5-5.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-26 13:44:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
xfig .fix file with one circle. (142 bytes, image/x-xfig)
2006-08-10 04:26 EDT, Saku Suuriniemi
no flags Details
resullt after editing the circle (fill and set fill level to 10%) (141 bytes, text/plain)
2006-10-22 13:31 EDT, Patrice Dumas
no flags Details

  None (edit)
Description Saku Suuriniemi 2006-08-10 04:26:29 EDT
Description of problem:
I start editing the circle in the file below, fill it with black color.
Everything goes OK this far. Then I try to edit the fill level from 100% to 10%
by deleting the final zero. The program dies immediately. 

Version-Release number of selected component (if applicable):
xfig-3.2.4-17.3.fc5

How reproducible:
Repeats always. 

Steps to Reproduce:
1. Open the file below in xfig.
2. Fill the circle with black
3. Try to edit the fill level by keyboard (delete the final 0). 
  
Actual results:
Crashes.

Expected results:
Successful edit to number 10. 

Additional info: Output during run:

Warning: Missing charsets in String to FontSet conversion
Warning: Missing charsets in String to FontSet conversion
Warning: Missing charsets in String to FontSet conversion

xfig3.2.4: SIGSEGV signal trapped
xfig: figure empty or not modified - exiting
Comment 1 Saku Suuriniemi 2006-08-10 04:26:29 EDT
Created attachment 133909 [details]
xfig .fix file with one circle.
Comment 2 Patrice Dumas 2006-10-22 13:28:44 EDT
I tried to reproduce, but it didn't crash (xfig-3.2.4-21.1).

I attach the file I obtained, could youplease verify that I 
tested te right thing?
Comment 3 Patrice Dumas 2006-10-22 13:31:54 EDT
Created attachment 139085 [details]
resullt after editing the circle (fill and set fill level to 10%)
Comment 4 Saku Suuriniemi 2006-10-23 10:26:46 EDT
(In reply to comment #3)
> Created an attachment (id=139085) [edit]
> resullt after editing the circle (fill and set fill level to 10%)

Looks very similar to my SAVE.fig after the crash. I don't understand the
significance of all the numbers, though. I'm not even sure that the edits get
visible in the file - only the results. 

Are you testing this on a 64-bit system? My work computer (HP nx6325) runs the
64-bit (AMD) fc5 and the crash repeats systematically. My home computer
(self-assembled) runs the 32-bit x86 Linux and does not crash. Both have the
xfig-3.2.4-17.3.fc5 version. I'm sorry and puzzled if this problem is not
reproduceable: I'm afraid that I cannot do much more beyond reporting. 

Please note that I can use the arrow up and arrow down buttons in the edit mode
to successfully adjust the filling percentage. It is only the direct edit
(delete final zero) from the keyboard that causes the crash. 
Comment 5 Patrice Dumas 2006-10-23 10:46:58 EDT
I guess the file only shows the results. I have a 32 bit computer,
so it may be a 64 bit issue. I did a direct edit, but as you 
said it cannot be reproduced on a 32 bit computer.

To know if it is reproduceable it should be retested on a 64 bit
computer.
Comment 6 Hans de Goede 2006-11-16 18:04:44 EST
Yes this is definetly a 64 bit bug I can reproduce it on my 64 bit system too,
I'll take a look to see if I can fix it (as time permits).
Comment 7 Hans de Goede 2006-11-17 12:00:51 EST
Hmm, funny. The current xfig rpms in development/rawhide cannot be debugged
because they have a useless -debuginfo package.

I've fixed this by changing:
make XFIGDOCDIR=%{_docdir}/%{name}-%{version}
into:
make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
  CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing"

And then rebuilding, notice that the "-fno-strength-reduce -fno-strict-aliasing"
come from the original CFLAGS and I've kept them to be safe. After rebuilding
this way I not only got a good debuginfo package, but the problem is gone too.

So it looks like rebuilding with "$RPM_OPT_FLAGS -fno-strength-reduce
-fno-strict-aliasing" fixes this. Don't ask why though :)
Comment 8 Ngo Than 2006-11-20 11:03:16 EST
it seems an compiler issue here. Built with -O0(1) seems to workaround the 
problem.
Comment 9 Ngo Than 2006-11-20 11:29:12 EST
the crash happens in XtCallCallbacks from libXt
Comment 10 Matěj Cepl 2006-12-22 13:01:33 EST
Thanks for the bug report.  We have reviewed the information you have provided
above, and there is some additional information we require that will be helpful
in our diagnosis of this issue.

Please attach your X server config file (/etc/X11/xorg.conf) and X server log
file (/var/log/Xorg.*.log) to the bug report as individual uncompressed file
attachments using the bugzilla file attachment link below.

Could you please also try to run without any /etc/X11/xorg.conf whatsoever and
let X11 autodetect your display and video card? Attach to this bug
/var/log/Xorg.0.log from this attempt as well, please.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.
Comment 11 Saku Suuriniemi 2007-01-02 05:22:01 EST
I'm sorry, but the computer with the 64 bit OS suffered from slight BIOS-ACPI
problems since the beginning, and had to be replaced altogether after the latest
BIOS & OS update some weeks ago. Since the computer was not my own but my
university's, I could not keep it for further testing, and I received a
different computer instead. Regrettably, I am therefore not able to provide the
requested information. Anyway, I want to express my warm thanks to you for
working on this bug. 
Comment 12 Hans de Goede 2007-01-08 03:52:47 EST
(In reply to comment #10)
> Thanks for the bug report.  We have reviewed the information you have provided
> above, and there is some additional information we require that will be helpful
> in our diagnosis of this issue.
> 
> Please attach your X server config file (/etc/X11/xorg.conf) and X server log
> file (/var/log/Xorg.*.log) to the bug report as individual uncompressed file
> attachments using the bugzilla file attachment link below.
> 
> Could you please also try to run without any /etc/X11/xorg.conf whatsoever and
> let X11 autodetect your display and video card? Attach to this bug
> /var/log/Xorg.0.log from this attempt as well, please.
> 
> We will review this issue again once you've had a chance to attach this
information.
> 
> Thanks in advance.

Erm, how is this relevant for this bug? Both Than and I have already explained
and proofed by reproducing this that this is a compiler bug, triggered by the
unusual CFLAGS used during the build of xfig, using standard RPM_OPT_FLAGS,
fixes this bug and as a bonus also leads to a usuable debuginfo package.

See comment #7 for howto invoke make to fix this.
Comment 13 Hans de Goede 2007-08-17 09:36:00 EDT
WTF was this closed as invalid info, this _really_ pisses me off. The reporter
took the time to explain in detail how to reproduce, I took the time to
reproduce and come up with a fix, yet this is still broken in rawhide and F-7
GRRRRR!

I don't know who closed this as insufficient info, but that was completely
ridiculous I've explained howto fix this in comment 7 and explained in comment
12 that the requested info was completely irrelevant.

Reopening, reassigning to Than who is the xfig owner, changing component back to
xfig.

Than,

Currently:
-xfig doesn't honor RPM_OPT_FLAGS
-doesn't have a usable debuginfo
-crashes on 64 bit as explained here

Changing the make line in %build from:
make XFIGDOCDIR=%{_docdir}/%{name}-%{version}
into:
make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
  CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing"

Fixes all 3 of these! While you are at please also fix the License tag according
to the new guidelines. Or add me to the ACL and I'll do this all for you.
Comment 14 Hans de Goede 2007-08-17 09:37:14 EDT
WTF was this closed as invalid info, this _really_ pisses me off. The reporter
took the time to explain in detail how to reproduce, I took the time to
reproduce and come up with a fix, yet this is still broken in rawhide and F-7
GRRRRR!

I don't know who closed this as insufficient info, but that was completely
ridiculous I've explained howto fix this in comment 7 and explained in comment
12 that the requested info was completely irrelevant.

Reopening, reassigning to Than who is the xfig owner, changing component back to
xfig.

Than,

Currently:
-xfig doesn't honor RPM_OPT_FLAGS
-doesn't have a usable debuginfo
-crashes on 64 bit as explained here

Changing the make line in %build from:
make XFIGDOCDIR=%{_docdir}/%{name}-%{version}
into:
make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
  CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing"

Fixes all 3 of these! While you are at please also fix the License tag according
to the new guidelines. Or add me to the ACL and I'll do this all for you.
Comment 15 Hans de Goede 2007-11-04 08:19:40 EST
Than,

I understand that xfig is a low priority package, still it would be nice to get
this bug and a slew of other bugs open against it fixed, so I'm offering myself
as co-maintainer, or if you want even as owner.

I'll be requesting the necessary rights in the packagedb in the next couple of
minutes.
Comment 16 Hans de Goede 2007-11-14 17:28:33 EST
Than,

A reply, any reply to this bug and my request for co-maintainership would be
nice. Consider this my third contact attempt in the light of the AWOL maintainer
procedure:
http://fedoraproject.org/wiki/PackageMaintainers/Policy/AWOL_Maintainers
Comment 17 Ngo Than 2007-11-15 10:38:43 EST
Hans, it's great to have you as co-maintainer. Could you please request for 
the xfig co-maintainer, so i can approve it? Thanks
Comment 18 Hans de Goede 2007-11-15 10:58:32 EST
Done, please goto:
https://admin.fedoraproject.org/pkgdb/packages/name/xfig

Login, and approve, Thanks!
Comment 19 Ngo Than 2007-11-15 11:46:15 EST
it's now fixed in rawhide, thanks.
Comment 20 Fedora Update System 2007-11-17 00:31:07 EST
xfig-3.2.5-5.fc7 has been pushed to the Fedora 7 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 xfig'
Comment 21 Fedora Update System 2007-11-17 00:36:13 EST
xfig-3.2.5-5.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 xfig'
Comment 22 Fedora Update System 2007-11-26 13:44:17 EST
xfig-3.2.5-5.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2007-11-28 20:45:37 EST
xfig-3.2.5-5.fc7 has been pushed to the Fedora 7 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.