#9089: Graphics3dGroup __add__ modifies its arguments
---------------------------------------------------+------------------------
Reporter: jason | Owner: jason, was
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.6
Component: graphics | Keywords:
Author: Jason Grout | Upstream: N/A
Reviewer: Karl-Dieter Crisman, David Loeffler | Merged:
Work_issues: Infinite recursion in doctest |
---------------------------------------------------+------------------------
Changes (by davidloeffler):
* status: positive_review => needs_work
* work_issues: => Infinite recursion in doctest
Comment:
Hang on a minute. I was lazy and ran long doctests on graphics and only
short doctests on everything else, so I missed a weird side-effect of this
patch: if you install the two patches above on vanilla 4.6.alpha1 and do
{{{
sage -t -long sage/combinat/root_system/weyl_group.py
}}}
then you get an infinite loop:
{{{
File "/storage/masiao/sage-4.6.alpha1/devel/sage-
hacking/sage/combinat/root_system/weyl_group.py", line 27:
sage: d.show3d(color_by_label=True, edge_size=0.01, vertex_size=0.03)
#long time (less than one minute)
Exception raised:
Traceback (most recent call last):
File "/storage/masiao/sage-4.6.alpha1/local/bin/ncadoctest.py", line
1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/storage/masiao/sage-4.6.alpha1/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/storage/masiao/sage-4.6.alpha1/local/bin/ncadoctest.py", line
1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[7]>", line 1, in <module>
d.show3d(color_by_label=True, edge_size=RealNumber('0.01'),
vertex_size=RealNumber('0.03')) #long time (less than one minute)###line
27:
sage: d.show3d(color_by_label=True, edge_size=0.01, vertex_size=0.03)
#long time (less than one minute)
File "/storage/masiao/sage-4.6.alpha1/local/lib/python/site-
packages/sage/graphs/generic_graph.py", line 12407, in show3d
color_by_label=color_by_label, **kwds).show()
File "base.pyx", line 1048, in sage.plot.plot3d.base.Graphics3d.show
(sage/plot/plot3d/base.c:9726)
File "base.pyx", line 953, in
sage.plot.plot3d.base.Graphics3d._process_viewing_options
(sage/plot/plot3d/base.c:9519)
File "base.pyx", line 198, in
sage.plot.plot3d.base.Graphics3d._determine_frame_aspect_ratio
(sage/plot/plot3d/base.c:3307)
File "base.pyx", line 214, in
sage.plot.plot3d.base.Graphics3d._safe_bounding_box
(sage/plot/plot3d/base.c:3460)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
[ ... ]
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12236)
File "base.pyx", line 1271, in
sage.plot.plot3d.base.Graphics3dGroup.bounding_box
(sage/plot/plot3d/base.c:12234)
RuntimeError: maximum recursion depth exceeded in __subclasscheck__
**********************************************************************
1 items had failures:
1 of 8 in __main__.example_0
***Test Failed*** 1 failures.
For whitespace errors, see the file
/home/masiao/.sage//tmp/.doctest_weyl_group.py
[41.9 s]
----------------------------------------------------------------------
The following tests failed:
sage -t -long "devel/sage-
hacking/sage/combinat/root_system/weyl_group.py"
Total time for all tests: 41.9 seconds
}}}
Apologies for my sloppiness in not having caught this bug earlier.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9089#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.