Closed kim135797531 closed 9 years ago
This is because of a small bug in casting. I've sent a fix.
Thanks Jacek!
On Sat, Jul 4, 2015 at 11:47 PM, Jacek Świergocki notifications@github.com wrote:
This is because of a small bug in casting. I've sent a fix.
— Reply to this email directly or view it on GitHub https://github.com/opencog/atomspace/issues/123#issuecomment-118525296.
Ben Goertzel, PhD http://goertzel.org
"The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." -- George Bernard Shaw
My code passes the unit tests after applying your fix. Thanks for the quick fix!
I found this behavior during writing unit test of my python conceptual blending project.
When I make new node with no name, AtomSpace returns wrong node with name "(".
Furthermore when I try to make new node with new AtomSpace, this problem getting worse, because it prints machine's memory contents.
This code:
makes this problem.
It seems problem was caused by
c_str()
method inNode::toString()
at Node.cc:68 but I'm not sure.My unit test makes new AtomSpace instance for each test case, and my blender has 'blank' ConceptNode to express default prefix name of new blend node.
Now I'm trying to avoid using the 'blank' ConceptNode because now I think it seems little wrong design conceptually. And the method
AtomSpace::atomAsString()
at AtomSpace.h:680, which was deprecated:makes this problem because it calls
toString()
method. But since python users use this method very often because python binding of Atom uses it in__str__
, so I think I have to report this problem to community.