From: Jim T. <jt...@mi...> - 2009-09-01 15:50:33
|
I'm running Ubuntu 9.04 AMD64. I do not get the errors you describe running visual 5.1 built from source. I did have an older version of visual installed from the repositories before that so perhaps there is some dependency that is installed on my system that configure did not catch on yours? However I do remember spending some time satisfying the dependencies to build it. JT Guenter Schneider wrote: > I ran into a number of problems with vpython on Linux which appear to be > all related. The problems do not happen in Windows. My system is ubuntu > 9.04, vpython 5.12 compiled from source (5.11 gives identical results). > > Thee common feature I see on Linux is, whenever vpython raises an > exception, python seg. faults. > > Example 1: > > In [1]: from visual import * > > In [2]: a = vector(1,2,3) > > In [3]: for i in a: > ...: print i > ...: > ...: > 1.0 > 2.0 > 3.0 > Segmentation fault > ~ $ > > but the following works: > > Example 2: > > In [1]: from visual import * > > In [2]: a = vector(1,2,3) > > In [3]: for i in a: > ...: print i > ...: if i>2: > ...: break > ...: > ...: > 1.0 > 2.0 > 3.0 > > This seems to point to the raising a StopIteration exception as the > problem point. > > Example 3: > In [1]: from visual import * > > In [2]: a = [1,2,3] > > In [3]: mag2(a) > Out[3]: 14.0 > > In [4]: a = [1,2,'x'] > > In [5]: mag2(a) > Segmentation fault > ~ $ > > It should have raised a TypeError as in this case > > In [1]: from visual import * > > In [2]: a = [1,2,'x'] > > In [3]: print a[0]*a[0]+a[1]*a[1]+a[2]*a[2] > ------> print(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]) > --------------------------------------------------------------------------- > TypeError Traceback (most recent call last) > > Finally this fails as well: > > Example 5: > In [1]: from visual import * > > In [2]: quit() > Do you really want to exit ([y]/n)? > Segmentation fault > ~ $ > > This error is probably caused by a SystemExit exception. > > Is something wrong with my install? Hard to see how to go wrong there, > it's configure, make, make install and taking care of site-packages in > ubuntu 9.04. > > Thank you for your help and the great work. > > Guenter Schneider > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |