#12215: Memleak in UniqueRepresentation, @cached_method
-------------------------+--------------------------------------------------
Reporter: vbraun | Owner: rlm
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: memleak | Keywords: UniqueRepresentation cached_method
caching
Work_issues: fix it... | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #11115 #11900
-------------------------+--------------------------------------------------
Changes (by SimonKing):
* cc: mhansen (added)
Comment:
Something else is interesting: The error changes when repeating it.
{{{
sage: P = JackPolynomialsP(QQ,1)
sage: p = P([2,1])
sage: p^2
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (56, 0))
ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
...
/home/simon/SAGE/sage-5.0.prealpha0/local/lib/python2.7/site-
packages/sage/combinat/sf/sf.pyc in register_isomorphism(self, morphism)
324 mathematically wrong, as above. Use with care!
325 """
--> 326 morphism.codomain().register_coercion(morphism)
327
328 _shorthands = set(['e', 'h', 'm', 'p', 's'])
/home/simon/SAGE/sage-5.0.prealpha0/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.register_coercion
(sage/structure/parent.c:11955)()
/home/simon/SAGE/sage-5.0.prealpha0/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.register_coercion
(sage/structure/parent.c:11889)()
AssertionError: coercion from Symmetric Function Algebra over Rational
Field, Monomial symmetric functions as basis to Symmetric Function Algebra
over Rational Field, Elementary symmetric functions as basis already
registered or discovered
sage: p^2
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (56, 0))
---------------------------------------------------------------------------
KeyError Traceback (most recent call
last)
...
/home/simon/SAGE/sage-5.0.prealpha0/local/lib/python2.7/site-
packages/sage/combinat/sf/sfa.pyc in _from_cache(self, element,
cache_function, cache_dict, **subs_dict)
631 if sum(part) not in cache_dict:
632 cache_function(sum(part))
--> 633 for part2, c2 in
cache_dict[sum(part)][part].iteritems():
634 c3 = c*c2
635 if hasattr(c3,'subs'): # c3 may be in the base
ring
KeyError: [2, 1]
}}}
Cc to the author of sage/combinat/sf/jack.py.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12215#comment:46>
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.