From: Bruce S. <Bru...@nc...> - 2009-08-31 22:38:00
|
I too am running Ubuntu 9.04, Visual 5.12, and I cannot reproduce any of these errors. I have no idea what could be wrong. What is the statement you used to configure the make? Moreover, your Example 1 is exceptionally strange, as it should not give an error of any kind (nor does it give an error for me). Is it possible that there's a typo in your reporting of Example 1? Bruce Sherwood 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 |