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

set_input from filestream causes panic #2704

Open
jasonhemann opened this issue Dec 13, 2024 · 0 comments
Open

set_input from filestream causes panic #2704

jasonhemann opened this issue Dec 13, 2024 · 0 comments

Comments

@jasonhemann
Copy link
Contributor

I don't believe this is expected behavior.

[jhemann] 14:51:06$ export RUST_BACKTRACE=full; scryer-prolog
?- open("/Users/jhemann/temp.txt", read, S), set_input(S).
   S = '$stream'(0x600000182410).
thread 'main' panicked at src/machine/machine_state.rs:699:9:
internal error: entered unreachable code: Stream must be a Stream::Readline(_)
stack backtrace:
   0:        0x1051df6b6 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h0fd572ca60ee9a4e
   1:        0x104cde6e3 - core::fmt::write::hbc078725bba6692a
   2:        0x1051acfb2 - std::io::Write::write_fmt::h100f2ae009a3df53
   3:        0x1051e3782 - std::sys::backtrace::BacktraceLock::print::hf0d5a155265a9dd5
   4:        0x1051e35d5 - std::panicking::default_hook::{{closure}}::h5499fb85b118791b
   5:        0x1051e3e59 - std::panicking::rust_panic_with_hook::h10014b4a7f4c072b
   6:        0x1051e3825 - std::panicking::begin_panic_handler::{{closure}}::hc871510d12acad65
   7:        0x1051e37b9 - std::sys::backtrace::__rust_end_short_backtrace::hca0d49bc0c1e56d3
   8:        0x1051e37ac - _rust_begin_unwind
   9:        0x10526543f - core::panicking::panic_fmt::haa8e13f18984c8e5
  10:        0x104fae877 - scryer_prolog::machine::machine_state::MachineState::read_term_from_user_input::hba5c1dd14b15da16
  11:        0x104f0a1a9 - scryer_prolog::machine::Machine::run_module_predicate::hc8e99b550e72289e
  12:        0x105147d81 - scryer_prolog::run_binary::h32a5b68e7ed4a990
  13:        0x104ccee06 - std::sys::backtrace::__rust_begin_short_backtrace::hb012d8fe91153c41
  14:        0x104ccf1db - _main
[jhemann] 14:51:08$ scryer-prolog --version
v0.9.4-210-gff034326-modified
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

1 participant