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

Windows 7: ESS hangs when starting julia on "Cannot read history file c:/.../.juliahistory" #162

Closed
bwbell opened this issue Apr 20, 2015 · 19 comments

Comments

@bwbell
Copy link

commented Apr 20, 2015

Emacs version: 24.4.1
ESS version: 15.03
Julia version: 0.3.7

As described in issue #27, upon typing "M-x julia RET", emacs prints the message "Cannot read history file c:/.../.juliahistory" and hangs.

Typing "C-g" unhangs emacs, and then one can type "C-x b julia RET" to switch to the now running Julia buffer. However, that buffer does not display the julia prompt. (there is no cursor, no ">" sign, nothing to indicate when julia has finished running a command, or indeed that julia is actually running.
screenshot 2015-04-20 10 59 57-c

@revereche

This comment has been minimized.

Copy link

commented May 25, 2015

Also experiencing this issue. The REPL ostensibly works, despite the lack of a prompt -- basic code evaluates appropriately -- but I can't use C-c C-l because I'm told there is "no history." Importing Gadfly also fails.

@ajsteven130

This comment has been minimized.

Copy link

commented Jun 1, 2015

I can confirm this as well on Windows 7 with Emacs 24.5.1 and ESS 14.1.1

@vspinu

This comment has been minimized.

Copy link
Member

commented Jun 1, 2015

ESS cannot work without prompt. If this is configurable you should configure julia to send prompt, otherwise it sounds like a julia bug on windows. Does the prompt appear when you invoke julia from emacs shell?

@ajsteven130

This comment has been minimized.

Copy link

commented Jun 2, 2015

There is no prompt (however the repl works) when Julia 0.3.8 is invoked in eshell on Emacs 24.5.1 on Windows 7. When powershell is used in emacs, it gives ERROR: prompt not defined.

In both cmd and powershell using the native windows applications, the prompt works just fine.

For ESS, the prompt issue is, to me, a minor problem compared to the fact the Emacs hangs when julia is invoked from ESS.

Please let me know if there is any other information you could use. Alternatively, if you could provide some information about how the prompt should work, I can see about opening up an issue in the Julia Repo

@vspinu

This comment has been minimized.

Copy link
Member

commented Jun 2, 2015

For ESS, the prompt issue is, to me, a minor problem compared to the fact the Emacs hangs when julia is invoked from ESS.

Missing prompt is the cause of the hang. Fixing the prompt will fix the cause. It's julia bug. If you can reproduce it in emacs shell, please go ahead and report to julia folks.

Alternatively, if you could provide some information about how the prompt should work,

The prompt just should be there as it is on non-Windows platforms and in Windows' cmd.

@adouzzy

This comment has been minimized.

Copy link

commented Jun 11, 2015

I think it looked for the wrong file. Mine history file is called .julia_history not .juliahistory

@lionel- lionel- added the lang:julia label Mar 17, 2018

@mmaechler

This comment has been minimized.

Copy link
Member

commented Mar 21, 2018

I propose to close this soon:

  • it seems a julia bug (but julia will have advanced considerably since 2015)
  • it is on a old version of Windows almost surely none of the maintainers can reproduce.
@nikoltoll

This comment has been minimized.

Copy link

commented Aug 29, 2018

I still experience a variant of the bug with julia 1.0.0 on windows 7.

Running julia from an eshell results in an empty buffer (no prompt). It does however allow input of commands and sending commands from a .jl file resultin in output (still without prompt).

input
x = [1,2,3,4];
output
x = [1,2,3,4]; 4-element Array{Int32,1}: 1 2 3 4

Starting julia with M-x julia will hang, but C-g will interupt resulting in a working julia described as above.

@habamax

This comment has been minimized.

Copy link

commented Aug 29, 2018

The same is on win10 and julia 1.0.0

jabranham added a commit to jabranham/ESS that referenced this issue Aug 29, 2018

jabranham added a commit to jabranham/ESS that referenced this issue Aug 29, 2018

@jabranham

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2018

Can someone who experiences this check if #651 fixes the issue for you?

@vspinu vspinu closed this in #651 Aug 29, 2018

vspinu added a commit that referenced this issue Aug 29, 2018

@jabranham

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2018

Since that was merged, if you get ESS from MELPA it should (hopefully) be fixed in the next MELPA update, which usually takes between 1 and 6 hours.

@habamax

This comment has been minimized.

Copy link

commented Aug 30, 2018

So the history file issue was solved (for me) but I still have to press C-g:

image

@habamax

This comment has been minimized.

Copy link

commented Aug 30, 2018

I have try to bisect the issue with debug messages and found out that it is ess-wait-for-process function hangs in the loop:

  (while (or (accept-process-output proc wait)
             (unless (and sec-prompt (process-get proc 'sec-prompt))
               (process-get proc 'busy)))
    (when force-redisplay
      (redisplay 'force))
    (when (> (- (float-time) start-time) .5)
      (setq wait .5)))

For me this part:

                 (unless (and sec-prompt (process-get proc 'sec-prompt))
                   (process-get proc 'busy))

is alway True.

@habamax

This comment has been minimized.

Copy link

commented Aug 30, 2018

Looks like process-get proc 'busy never returns nil.

The only place I found it could be set up as nil is inferior-ess-output-filter. Which is never called when I start M-x julia.

I presume it should be called by a "callback" from within
(set-process-filter proc 'inferior-ess-output-filter) but my knowledge is quite limited.

@vspinu

This comment has been minimized.

Copy link
Member

commented Aug 30, 2018

If you press C-g, do you see the end promt from julia?

The busy state is reset once first prompt is detected. Looks like there is none in your case.

I think there should be timeout there and the buffer should be shown immediately to the user. I will fix this before the release.

@habamax

This comment has been minimized.

Copy link

commented Aug 30, 2018

If I press C-g, emacs just unhangs. Nothing happens in terms of prompts etc. Just the same window as before calling M-x julia.

But the julia process is running -- I can see it with list-processes.
image

@vspinu

This comment has been minimized.

Copy link
Member

commented Aug 30, 2018

There is a *julia* buffer somewhere in the background. You can switch to it and check for issues.

@chrchr

This comment has been minimized.

Copy link

commented Feb 24, 2019

I am still experiencing this issue with ess 20190209.1549, Windows 10, Emacs 27.0.50. Can anyone confirm that it's working for them?

@jabranham

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2019

There's a bug in julia on Windows that prevents ESS from working. Long story short, julia on windows doesn't seem to print the prompt. #715 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.