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

Repl Allows One Command to Execute and Subsequent Commands Fail #971

Open
joshglenn opened this issue Oct 15, 2022 · 1 comment
Open

Repl Allows One Command to Execute and Subsequent Commands Fail #971

joshglenn opened this issue Oct 15, 2022 · 1 comment

Comments

@joshglenn
Copy link

Description

When I use the repl, I can run one command and that's it. After that I get an error.

Steps to reproduce the issue:

  1. run repl
  2. run 2 + 2 (works)
  3. run 2 + 1 (error)

Received results:

cayley> 2 + 2

=> 4
-----------
1 Result
Elapsed time: 1.95 ms

cayley> 2+1

Error:  iterator closed at <eval>:1:1(0)
cayley> 

Expected results:

It should allow me to run multiple commands

Output of cayley version or commit hash:

ERROR: logging before flag.Parse: E1014 21:20:53.997357   97410 cayley.go:142] The assets flag is deprecated as assets are provided as part of the binary.
Cayley version: 0.7.7
Git commit hash: dcf764f

Environment details:

Backend database: bolt version unknown

@catundercar
Copy link

I found the problem:

  1. When run a command, the session of gizmo will new a iterator. After the first command done, the iterator will be closed.
  2. The problem occurs at the time of closing iterator:
    image
    image
    It will make the vm be interrupted.
    3.Then run the second command, the vm will check interrupted.
    image
    So, panic.

Temporary Solutions:

it.s.vm.Interrupt(err)

image

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