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 locks up on OS X 10.7 #644

Closed
fonnesbeck opened this issue Mar 28, 2012 · 10 comments
Closed

REPL locks up on OS X 10.7 #644

fonnesbeck opened this issue Mar 28, 2012 · 10 comments

Comments

@fonnesbeck
Copy link

I get intermittent, unrecoverable REPL lockup when routinely using Julia on my OS X 10.7.3 machine (2011 MacBook Air). Most recently, just playing with various matrix calculations. Julia returned the value, but then accepted no further input. I was able to exit with ctrl-D.

@Keno
Copy link
Member

Keno commented Mar 28, 2012

Since you were able to quit with C-d, readline must be getting back control. It is probably an issue of it not being displayed properly, while the actual processing of the input is still being done.

@fonnesbeck
Copy link
Author

I have had a recurrence of this problem just now, where I was unable to quit with ctrl-d. It appears to happen most reliably when switching to the terminal running Julia from another application. I am usually able to type a few characters, then it locks up. It happens a few times a day.

@JeffBezanson
Copy link
Member

I think I can reproduce a variation of this on linux by hitting ctrl-z, then fg. From that point it doesn't work. Only happens with the readline frontend. See if you get the same problem with julia-release-basic.

@fonnesbeck
Copy link
Author

Here's what happens when I restore a Julia process using fg on OS X:

fg

Will try the basic release version.

@Keno
Copy link
Member

Keno commented Mar 29, 2012

@JeffBezanson Readline needs to be reinitialized after signals have been received (since the default readline signal handlers are disabled in repl-readline.c) - http://www.delorie.com/gnu/docs/readline/rlman_43.html

@JeffBezanson
Copy link
Member

I think I have a fix in for the suspend and resume problem. Can people try it?

@pao
Copy link
Member

pao commented Mar 29, 2012

It does work for the suspend/resume case, though it picks up exactly where it left off, so if you suspend in mid-expression and resume some time later you might have junk still hanging around you can't see. A more complete solution might be to reprint the julia> prompt and any text entered up to the point of suspend when it is resumed.

@fonnesbeck
Copy link
Author

Works for me, thanks.

@Keno
Copy link
Member

Keno commented Mar 29, 2012

a call to rl_redisplay after rl_reset_after_signal is probably the best here (though only if were not in the middle of a computation). Looks like @JeffBezanson may have to bring the callback_en flag back ;)

P.S. sorry for not testing any of this. I'm currently testing something else that I can't interrupt by recompiling

@JeffBezanson
Copy link
Member

Ok, done. Readline is just full of magic isn't it :)

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

4 participants