Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cog-prt-atomspace doesn't work in union of two atomspaces #20

Closed
sikefield3 opened this issue May 11, 2023 · 4 comments
Closed

cog-prt-atomspace doesn't work in union of two atomspaces #20

sikefield3 opened this issue May 11, 2023 · 4 comments

Comments

@sikefield3
Copy link

In the context of #15 , while testing the Multiframe-Example
following happened:
When I tried to connect the union atomspace to a RocksDB and then try cog-prt-atomspace, I got a segfault.:

(cog-set-atomspace! c)
(define rsn (RocksStorageNode "rocks:///home/opcwdir/repodock/ForTestingStuff/foo.rdb"))
(cog-open rsn)
(store-atomspace)
(cog-prt-atomspace)

This happens also, if I use cog-rocks-open.
Printing the content with cog-rocks-print works fine.

Not sure, if this is a realistic use case.

@linas
Copy link
Member

linas commented May 11, 2023

OK, I can reproduce this with the following

(use-modules (opencog) (opencog exec))
(use-modules (opencog persist))
(use-modules (opencog persist-rocks))

(define a (AtomSpace))
(define b (AtomSpace))
(define c (AtomSpace a b))

(cog-set-atomspace! a)
(Concept "I'm in A")
(cog-prt-atomspace)

(cog-set-atomspace! b)
(Concept "I'm in B")
(cog-prt-atomspace)

(cog-set-atomspace! c)
(define rsn (RocksStorageNode "rocks:///tmp/foo"))
(cog-open rsn)
(store-atomspace)
(cog-prt-atomspace)

@linas
Copy link
Member

linas commented May 11, 2023

Fixed the crash, here:

opencog/atomspace#3037

linas added a commit that referenced this issue May 11, 2023
The crash was reported in
#20

The fix is in
opencog/atomspace#3037
@linas
Copy link
Member

linas commented May 11, 2023

Added unit test in 4499f34

Closing; there's a fix, and a unit test for it. Thanks for the report!

@linas linas closed this as completed May 11, 2023
@linas
Copy link
Member

linas commented May 11, 2023

FWIW, I did NOT test beyond the above! There may still be bugs, weirdness, or unexpected behavior! The frame stuff is relatively new, and hasn't been hit hard by "real world" applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants