Bug 201992 - xfig crashes in the edit function
Summary: xfig crashes in the edit function
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xfig
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 226557 F8Target
TreeView+ depends on / blocked
 
Reported: 2006-08-10 08:26 UTC by Saku Suuriniemi
Modified: 2018-04-11 15:43 UTC (History)
4 users (show)

Fixed In Version: 3.2.5-5.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-26 18:44:20 UTC
Type: ---
Embargoed:


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

Description Saku Suuriniemi 2006-08-10 08:26:29 UTC
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 08:26:29 UTC
Created attachment 133909 [details]
xfig .fix file with one circle.

Comment 2 Patrice Dumas 2006-10-22 17:28:44 UTC
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 17:31:54 UTC
Created attachment 139085 [details]
resullt after editing the circle (fill and set fill level to 10%)

Comment 4 Saku Suuriniemi 2006-10-23 14:26:46 UTC
(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 14:46:58 UTC
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 23:04:44 UTC
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 17:00:51 UTC
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 Than Ngo 2006-11-20 16:03:16 UTC
it seems an compiler issue here. Built with -O0(1) seems to workaround the 
problem.

Comment 9 Than Ngo 2006-11-20 16:29:12 UTC
the crash happens in XtCallCallbacks from libXt

Comment 10 Matěj Cepl 2006-12-22 18:01:33 UTC
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 10:22:01 UTC
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 08:52:47 UTC
(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 13:36:00 UTC
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 13:37:14 UTC
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 13:19:40 UTC
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 22:28:33 UTC
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 Than Ngo 2007-11-15 15:38:43 UTC
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 15:58:32 UTC
Done, please goto:
https://admin.fedoraproject.org/pkgdb/packages/name/xfig

Login, and approve, Thanks!


Comment 19 Than Ngo 2007-11-15 16:46:15 UTC
it's now fixed in rawhide, thanks.

Comment 20 Fedora Update System 2007-11-17 05:31:07 UTC
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 05:36:13 UTC
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 18:44:17 UTC
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-29 01:45:37 UTC
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.