Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18436 - Scigraphica 0.80 segfaults on start
Summary: Scigraphica 0.80 segfaults on start
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: George Shapovalov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 35863
Blocks: 20853
  Show dependency tree
 
Reported: 2003-03-29 13:31 UTC by James Casbon
Modified: 2004-01-25 09:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of strace scigraphica (strace_report,268.83 KB, text/plain)
2003-04-06 15:04 UTC, James Casbon
Details
strace of scigraphica startup segfault (scigraphicrash,225.40 KB, text/plain)
2003-05-08 04:56 UTC, Rick Egeland
Details
my stack trace (strace-scigraphica.txt,329.87 KB, text/plain)
2003-12-02 20:53 UTC, Pablo De Nápoli
Details
here is my environment info (environment,52.04 KB, text/plain)
2003-12-02 20:54 UTC, Pablo De Nápoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Casbon 2003-03-29 13:31:05 UTC
Scigraphica segfaults straight away after being run.  It manages to open a
window and report the segfault (and save the project) but then just dies.

Reproducible: Always
Steps to Reproduce:
1. type scigraphica


Actual Results:  
james $ scigraphica
Segmentation fault


Expected Results:  
run.

james $ emerge info
Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20-gentoo-r2 i686 Pentium III (Coppermine)
GENTOO_MIRRORS=" http://194.83.57.7/sites/www.ibiblio.org/gentoo/
http://194.83.57.11/sites/www.ibiblio.org/gentoo/
http://194.83.57.15/sites/www.ibiblio.org/gentoo/
http://194.83.57.2/sites/www.ibiblio.org/gentoo/
http://194.83.57.3/sites/www.ibiblio.org/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config
/usr/X11R6/lib/X11/xkb:/usr/kde/3.1/share/config:/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg gnome libg++ mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml
gdbm berkdb slang readline arts svga java guile X sdl gpm tcpd pam libwww ssl
python esd imlib oggvorbis gtk qt kde motif opengl alsa bonobo doc dvd gtk2 imap
jikes junit ldap leim mozilla mysql pcmcia perl plotutils samba slp sse tcltk
tetex usb"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-31 15:14:41 UTC
please run it with strace and attach the output
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2003-04-05 23:03:13 UTC
Hi James.

Thanks for the report. Though I could not reproduce the problem.
Did you try doing what semant suggested?

George
Comment 3 James Casbon 2003-04-06 15:04:49 UTC
Created attachment 10297 [details]
output of strace scigraphica

output of strace scigraphica - looks like it can't find various files and dies
because of it.
Comment 4 Rick Egeland 2003-05-08 04:56:39 UTC
Created attachment 11672 [details]
strace of scigraphica startup segfault

I get segfaults with scigraphica at startup too.  Here is my strace.
Comment 5 George Shapovalov (RETIRED) gentoo-dev 2003-05-11 22:14:42 UTC
Hi guys.

Just an idea:
James I see you have Pentium-III, but your USE flags contain 3dnow. Could this be what's causing the problem by chance? May be even idirectly, but via some library perheaps?
Note, that 3dnow belongs to make.defaults, so if you don't want this flag, you have to specifically set -2dnow in make.conf...


>output of strace scigraphica - looks like it can't find various files and dies
>because of it.
Um, if you mean stuff like this:

stat64("/etc/gnome/config-override//Gnome", 0xbfffccc0) = -1 ENOENT (No such file or directory)
stat64("./gnome/config-override//Gnome", 0xbfffccc0) = -1 ENOENT (No such file or directory)
stat64("/etc/gnome/config//Gnome", 0xbfffccc0) = -1 ENOENT (No such file or directory)
stat64("./gnome/config//Gnome", 0xbfffccc0) = -1 ENOENT (No such file or directory)

then I doubt it - I have bunch of such lines myself and that does not prevent scigraphica from functioning properly. Strace output is quite noisy - it reports every single action app and os try to do, including searching for that apps everywhere in $PATH and for configs in all possible places...

However comparing my strace with yours I see that you are getting quite a bit more complaints about gnome-related stuff. Any possibility something is screwed there?

There are also few complaints about python stuff, but these are approcimately matched in both straces I compared, even at the end, right before it segfaults.
However I noticed you have quite a bit more complaints about:
>gtk-2.0/gtk/encodings.py - gtk-2 and encodings in many variations, which I don't seem to see here.. I know sometimes gtk-based apps segfault because of some fonts. I was able to segfault mozilla and phoenix here in this way and only  made them work by removing "offending" fonts. Are you using xfree-4.3.0? If yes, this is another area to look into...

George
Comment 6 James Casbon 2003-05-12 12:19:44 UTC
I also have gentoo on my work pc, a pentium4.  When I emerge scigraphica on this, it gets a little bit further 
before dying. 
 
It opens a window saying 'couldn't import module gtk'.  If I click view error log, I get a python window saying 
ImportError: No module named gtk 
>>>  
 
So it looks like a pyhton error??  Where does python look for its modules? How do I check the gtk module is 
installed? 
Comment 7 George Shapovalov (RETIRED) gentoo-dev 2003-05-13 05:41:27 UTC
Hi James.

Well, now I seem to have this complaint (no such module) as well, however this does not segfault scigraphics - it starts up and works seemingly ok.
However I was able to segfault it by typing the following sequence in that python window:
import pygtk
pygtk.require("2.0")
import gtk

This requires pygtk-1.99.x installed.
Apparently gtk module is provided by pygtk, which is not in DEPEND. However it seems to be optional and what's more seems to break scigraphics. Thus I don't think its wise to add it to DEPEND, at least until this issue is sorted out.
I'll try to look more into this soon.

George
Comment 8 katerina 2003-10-21 14:03:29 UTC
Exact same problem as James.  Here's my emerge info.

Portage 2.0.49-r13 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22)
=================================================================
System uname: 2.4.22 i686 AMD Athlon(TM) XP 2500+
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share
/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/ge
neric/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ ftp://gent
oo.inode.at/source/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apm avi gif jpeg libg++ mad mikmod mpeg ncurses pdflib png xml2
xmms zl
ib gdbm berkdb slang readline tetex bonobo X sdl gpm tcpd pam libwww ssl
perl im
lib oggvorbis gtk qt mozilla 3dnow acl alsa -arts canna cdr cjk crypt csope
cups
 dvd encode -esd foomaticdb freewnn gatos -gnome guile ipv6 java jikes junit
-kd
e -motif nls opengl -oss python quicktime ruby scanner -svga spell tcltk
truetyp
e usb videos xinerama xv video_cards_radeon"
Comment 9 Pablo De Nápoli 2003-12-02 20:53:38 UTC
Created attachment 21617 [details]
my stack trace

I'm having the same problem here you have my stack trace
Comment 10 Pablo De Nápoli 2003-12-02 20:54:46 UTC
Created attachment 21618 [details]
here is my environment info
Comment 11 Pablo De Nápoli 2003-12-02 20:57:54 UTC
I've got the message "Could not load module pysga" (but I cannot see the
error log, it segfaults first)
Comment 12 Pablo De Nápoli 2003-12-03 08:37:23 UTC
In my opinion this bug is related to the fact that pygtk-2.0.0 is linked
to gtk+-2.2.4-r1, but scigraphica is linked to gtk+-1.2.10-r10 and
gtk+-extra-0.99.17, this seems not to be consistent. 
(shouldn't be a gtk-1.2 version of pygtk?)

On the other hand, scigraphica seems to depend on pygtk but 

emerge -pe scigraphica

does not inform about this!





  
Comment 13 Felix Riemann 2003-12-04 10:29:33 UTC
Adding pygkt-0.6.11 to DEPEND and a routine to reemerge 2.0 should fix it. Emerging 0.6.11 fixed scigraphica on my machine. 
It's still in portage and emerges nicely. I had to reemerge pygtk-2.0 afterwards though. For example the Python-Fu-Filters of Gimp-1.3 stopped working with the pygtk.py file from 0.6.11. Reemerging 2.0 afterwards helps and doesn't affect scigraphica.
Comment 14 Felix Riemann 2003-12-05 13:53:42 UTC
A short addition:
It looks like you have to start scigraphica once after emerging pygtk-0.6.11 before reemerging pygtk-2.0 or scigraphica will keep crashing. (Noticed it today while updating Python to 2.3)
Comment 15 Patrick Kursawe (RETIRED) gentoo-dev 2003-12-15 02:54:45 UTC
I think comment #13 could be interesting for the python herd since SLOTted packages should co-exist peacefully.
Comment 16 Patrick Kursawe (RETIRED) gentoo-dev 2003-12-15 03:18:56 UTC
Just tried emerging pygtk-0.6.11 after pygtk-2.0.0 and got:

epm -V pygtk-2.0.0
..5....T   /usr/lib/python2.2/site-packages/pygtk.py
..5....T   /usr/lib/python2.2/site-packages/pygtk.pth
..5....T   /usr/lib/python2.2/site-packages/pygtk.pyc
..5....T   /usr/lib/python2.2/site-packages/pygtk.pyo

So indeed old pygtk conflicts with the new one.

Felix, about your comment #14 - looks like the right paths are written into the config file once it was started successfully.

I managed to get it running even after installing pygtk-2 by calling it
PYTHONPATH="/usr/lib/python2.2/site-packages/gtk-1.2" scigraphica.
Comment 17 Patrick Kursawe (RETIRED) gentoo-dev 2003-12-15 06:54:01 UTC
I'd say: As soon as the python guys have brought an improved pygtk-0.6.11, we can make scigraphica DEPEND on this and provide a wrapper that sets PYTHONPATH right.
Comment 18 Alastair Tse (RETIRED) gentoo-dev 2003-12-16 09:11:34 UTC
scigraphica doesn't have pygtk in its deps. 

anyway the correct way to use pygtk-0.6.11 is by doing:

import pygtk
pygtk.require("1.2")
import gtk

and not by using the PYTHONPATH hack. the author of scigraphica should actually be informed that the scripts need to follow that convention, as for the pygtk 0.6.11 overwriting files with pygtk-2, i need to look at that seperately, but not in this bug
Comment 19 Patrick Kursawe (RETIRED) gentoo-dev 2003-12-30 04:58:04 UTC
George, what's the current status? Don't want to annoy the author by sending a note if you maybe already did.
Comment 20 Barry Voeten 2004-01-01 16:10:04 UTC
Well maybe more of a question, 

How come that an application is marked stable, when it segfaults every time it's being run after a emerge ? 
Comment 21 George Shapovalov (RETIRED) gentoo-dev 2004-01-04 12:49:59 UTC
Hi guys.

Thanks for doing more problem tracing. Since I could not reliably reproduce the segfaulting this was essential!

I have issued the -r2 ebuild which should fix things. Unfortunately, because of the way scigraphica wants to set itself up and because of some still non-resolved overlap in pygtk 1.2 and 2.0 slots the process has to be somewhat manual. 

I created pkg_setup and (a reminder) pkg_postinst functions. pkg_setup wil check for installed version of pygtk and if it detects >=1.99, it will ask user to do this unmerge run remerge dance.. (see ebuild for details). 
I could not come up with something more automated but as reliable (stuff cannot be emerged from within the ebuild, plus we need to run the program as user once..), but if anybody has any ideas they are definitely wellcome.

The ebuild is in portage (~x86 for now), please test. If this works we probably need to unmask it and remove (first hardmask) previous versions.

Barry:
>How come that an application is marked stable, when it segfaults every time it's >being run after a emerge ? 
Well, if you will look at the history, you will see that the app was running fine in the beginning. Apaprently it developed these issues when gtk2+ started to be used more widely, and even then not everybody could reproduce the problem..
Give us just a bit of faith ;).

George
Comment 22 George Shapovalov (RETIRED) gentoo-dev 2004-01-04 12:53:27 UTC
Just an additional note.
When #35863 gets resolved we may be able to do a "real" and more automated fix.

George
Comment 23 Pablo De Nápoli 2004-01-05 05:46:12 UTC
scigraphica-0.8.0-r2 didn't work for me. I'm using 

python-2.2.3-r5
gtk+extra-0.99.17
pygtk-2.0.0 
(shouldn't scigraphica depend on pygtk?)

Isn't there a clean solution to this problem? Multiple versions 
of pygtk should coexist peacefully (in different SLOTs)
Comment 24 George Shapovalov (RETIRED) gentoo-dev 2004-01-05 19:48:22 UTC
Hi Pablo.

Did you test the -r2, that I just releeased? If so then strange:
didn't the emerge stop and weren't you asked to unmerge pygtk before proceeding? If yes, did you follow? (it shoulod have automatically pulled the right pygtk version then).
If you did all the above, did you remove your stale ~/.scigraphica/config as you were reminded by the ebuild? (you need to do it for the intended user that will be routinely running it).
Did you then run scigraphica once as that user, before emerging pygtk (-2.0) again (if you need that)?

I am afraid, untill the #35863 is resolved there is not easier way around if you want to get it working :(.

>(shouldn't scigraphica depend on pygtk?)
Well, the -r2 does. As a matter of fact I was able to run it without pygtk, so it seems to be optional (but on top of that I have difficulty reproducing segfault over here in general :)). Still I put it in, in order to resolve this until said bug above gets fixed.

Sorry for the obvious, but are you absolutely sure you tested the -r2? It is keymasked, so if you are running stable you need to ACCEPT_KEYWORDS=~arch emerge scigraphica to pick it up..
 
George
Comment 25 Pablo De Nápoli 2004-01-06 04:49:06 UTC
>didn't the emerge stop and weren't you asked to unmerge pygtk before >proceeding? 

that didn't happened

>Sorry for the obvious, but are you absolutely sure you tested the -r2?

I've run 

emerge -b scigraphica-0.8.0-r2.ebuild

from /usr/portage/app-sci/scigraphica directory.
Comment 26 George Shapovalov (RETIRED) gentoo-dev 2004-01-18 23:49:15 UTC
Sorry for the delay.

>>didn't the emerge stop and weren't you asked to unmerge pygtk before proceeding? 
>that didn't happened
That's strange, try upgrading portage (to latest testing)? Although this shouldn't matter - has_version has been supported for a while now.. And I just retested the ebuild - all complained fine.

In any case, you can still do the part it asks you to do. Unmerge pygtk (all versions, that's the simplest) and then emerge scigraphica. login as a user who will be using it, remove (or rename) ~/.scigraphica/config and then run scigraphica once (as that user). After that you can emerge pygtk-2* if necessary..
This should fix it for you. More automated fix has to waint for #35863

George
Comment 27 Pablo De Nápoli 2004-01-24 10:17:12 UTC
Bug #35863 is fixed now, may be we can find a real fix for this bug 
now. I'll try to test it.
Comment 28 Pablo De Nápoli 2004-01-25 09:59:01 UTC
In fact, I finally succed in running scigraphica-0.8.0-r2 using
pygtk-0.6.11 (I also have pygtk-2.0.0 installed) and python-2.3.3