-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Web REPL frozen by single token expressions. #416
Comments
@boyers would you be able to look into this? |
Would this have anything to do with the firewall on OS X, in case it is enabled? |
I'm running the latest Git source(3c3e0ae) on a Kubuntu machine. julia> 1+2 #works correctly
julia> 1 #freezes
julia> +1 #works correctly
julia> 2b #works correctly(assuming b is defined)
julia> b #freezes(regardless of whether b is defined)
julia> Array #freezes It appears that if there is only a single "token", the web interface will freeze. Reloading the page fixes it(after about 5 seconds of ). |
Yes, just putting the single token makes it freeze for me too. |
That's what I'm experiencing too, actually. Since the most simple test didn't work, I didn't investigate more complex ones. |
The more complex stuff works. Sigh. -viral On 21-Feb-2012, at 5:14 PM, pygy wrote:
|
Hm, the bug seems to be quite obvious after a few debugging statements added... Single-token expr gets parsed to this token, not to a full Expr structure, so 1.head leads to an error. |
--- ui/webserver/julia_web_base.jl 2012-04-11 13:49:40.840746107 +0400
+++ ui/webserver/julia_web_base.jl 2012-04-11 13:49:41.840746107 +0400
@@ -127,13 +127,15 @@
end
__all_nothing = false
+ __expr_multitoken = isa(__expr, Expr)
+
# stop now if there was a parsing error
- if __expr.head == :error
+ if __expr_multitoken && __expr.head == :error
return __write_message(__Message(__MSG_OUTPUT_PARSE_ERROR, {__expr.args[1]}))
end
# if the expression was incomplete, just keep going
- if __expr.head == :continue
+ if __expr_multitoken && __expr.head == :continue
continue
end |
Ah, nice catch. Can you make a pull request? |
I know Git exactly enough to hate it... Isn't it quicker to just apply the patch in this case? Looks like a trivial typo-fix, not worth a review or pull request or attribution or anything. |
I guess, but in general that makes me do more work so that you can do less work, which doesn't scale very well since there are more contributors to open source projects than there are maintainers. |
Also, this isn't even a valid patch fragment because the first line of the diff is missing, meaning that git and patch won't accept it. This makes it even more work for me: I either have to try to reconstruct the missing diff line in such a manner that git/patch will accept it, or I have to make the edit by hand, which although not terribly difficult in this case is tedious and error-prone. |
It was a correct "patch" patch, just not a "git patch" patch. Created a fork, I guess I will do a few things where creating pull request is less work than the code itself sooner or later. |
Git's not so bad, even after just a little experience using it. And having a powerful distributed version control system completely changes the way you work after you get used to it. Your patch is much appreciated in any case. |
I have used Bazaar, Mercurial, Monotone, Subversion and Git. I am keeping an eye on Veracity (just in case) and Fossil. Of all those, I hate only Git. |
Ah, well, in that case, I'm sure you have your reasons. I've tried all of those too — and Git is by far my favorite. |
Nice! This bug randomly cropped up a few months ago -- I'm guessing that parse_input_line used to return an expression or nothing, and it was modified to also return single tokens. |
This reverts commit 5ab47d1 due to method ambiguities. add at-compat for finalizer instead at-compat finalizer
Fix a couple of new breakages on nightly
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 4e6776a New commit: 0f8bbda Julia version: 1.11.0-DEV SparseArrays version: 1.11.0 Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@4e6776a...0f8bbda ``` $ git log --oneline 4e6776a..0f8bbda 0f8bbda Interpolate SparseVector in display test (#455) d884072 Merge pull request #427 from JuliaSparse/jishnub/sparsevecshow 9e68b7e Merge branch 'main' into jishnub/sparsevecshow 12a1c30 remove unnecessary inequality change 4217641 don't set Documenter compat e86b148 Adapt to Documenter v1 (#444) 8c72535 Merge branch 'main' into jishnub/sparsevecshow 8c20ba1 Test for truncation 8f925f8 Interpolate Int in expected string c53e1f2 interpolate struct in display test 33d4bf5 Undef show with MIME text/plain 034d234 Hook into new factorization dispatch mechanisms (#437) 248d0e6 Merge branch 'main' into jishnub/sparsevecshow 713ab9b Fix documentation of `findall` behaviour (#452) cb9b31f rowvals instead of nonzeroinds 05ac950 Add example for UMFPACK control vector (#449) 605237e Add JL_UMFPACK_PIVOT_TOLERANCE to umfpack.jl (#447) 5dac134 Use a single header wrapper for all platforms. (#446) 47e26dd Explicit types in test RHS c123952 Interpolate vectors in show test b309da7 Explicit types d21fc79 Add test for showing a vector of sparsevec 3e918e4 Restore unfilled sparsevec display b533818 Don't add SparseArrays to docs/Project.toml 4449100 Remove commented out method 728e116 ignore docs/build 99a0db2 Merge show methods ac5c8ed Switch from internal 5-arg `searchsorted*` methods to views (#440) ada9edd sparse vector views remain sparse (#416) c93065c Improved the dot product between two vectors and a sparse matrix (#410) 2fae1a1 Correctly set zeros with `fill!(::SubArray)` and fix its return value (#433) 03ed9e3 Code quality cleanup (#438) 559a74e Merge branch 'main' into jishnub/sparsevecshow 8944160 fix empty show e72223d One-line show for SparseVector ``` Co-authored-by: Dilum Aluthge <[email protected]>
On OS X 10.6.8, 32-bi CPU.
After launching
launch-server
, the web UI works fine and you get thejulia>
prompt. However, if you try to evaluate an expression, you don't get any answer. If you reload the page, or try to open another one, it takes ages to get past the<initializing>
stage. You can still change the color theme.The activity of julia-server shoots even higher than reportred in #300 (~ one full core).
I get the following error at the console:
2012-02-20 15:37:20: (network_writev.c.115) writev failed: Socket is not connected 6
The text was updated successfully, but these errors were encountered: