-
Notifications
You must be signed in to change notification settings - Fork 88
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
plot causes weird error "invalid numeric constant" #13
Comments
I can't reproduce your error. Can you try updating your Julia build in case this was some bug briefly in git |
I already checked it again on this version:
I'll check an even newer build too. Is there any other info that would be helpful? |
@loladiro, do you have any idea how this could happen? It is very mysterious to me, and unfortunately I cannot reproduce the problem. |
Some more info. Using the Agg backend doesn't have this problem:
But using the default backend has the same error:
Could it be to do with GUI usage? I'm am accesing julia on linux over a ssh connection from a mac. The GUI plots show fine, except for this bug. |
I can confirm this error:
Julia version Version 0.2.0-prerelease+3627, PyPlot commit 7c59b3e, PyCall commit 4f4f9c3. Calling a function from PyPlot somehow seems to break all numeric constants that contain a '.'. |
Still can't reproduce. I tried it on OSX and on Debian GNU/Linux with the latest versions of everything. Which GUI toolkit are you using? ( |
I can't reproduce that with Ubuntu 13.04 (Matplotlib 1.2.1) either. I think it is a problem with the version of matplotlib. Are there any known requirements? Tomorrow I could look up which version I was using when the error occured. |
Both matplotlib 0.99.3 and matplotlib 1.2 work for me. |
I can confirm this. I also get julia> using PyPlot
julia> figure()
Figure(PyObject <matplotlib.figure.Figure object at 0x109835950>)
julia> 1.0
ERROR: syntax: invalid numeric constant "1.0" I have julia> versioninfo()
Julia Version 0.3.0-prerelease+92
Commit 8879168 (2013-11-21 03:42 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.0.0)
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm and python 2.7.6 with matplotlib 1.3.1 and Qt4. |
Please let me know, If I can provide any further information that might 2013/11/21 Steven G. Johnson notifications@github.com
Med venlig hilsen Andreas Noack Jensen |
Looks like I need to try matplotlib 1.3.1. (I don't suppose you can run it through valgrind or something? This really sounds like some kind of memory bug where something in the Python C API is stomping on Julia memory.) |
For what it's worth, I have the same problem.
Julia and PyPlot are brand new from Git. The OS is Ubuntu 13.10, which comes with Matplotlib 1.2.1. I just installed Matplot 1.3.1 from source to see if that make any difference, but I can't figure out where it is installed or how to get PyPlot to see it. If you happen to know, let me know and I'll test it. |
The "TkAgg" backend seems to work.
So, adding support for TkAgg might be a work-around for PyPlot until better information becomes available. I tried to do this myself, but I got stuck when trying to add an event loop for Tkinter in PyCall.jl. (1) In PyPlot/src/PyPlot.jl
(2) In PyCall/src/gui.jl
|
Incidentally, I tested every GUI backend I could find (Gtk, Wx, Qt) and Tkinter was the only one that did not mess up floating point. |
I have a hypothesis: The bug may be restricted to 32-bit systems. I have tested three computers all running Ubuntu (but not all the same version). Two computers are 64-bit and one computer is 32-bit. The two 64-bit computers work fine. The bug with floats is only observed the 32-bit computer. Considering the very small sample, it is difficult to make any strong assertions. It would be helpful if other people who experienced this bug could confirm whether they are running 32-bit machines or 64-bit machines. If this is indeed the cause, it would explain why it is so hard to reproduce, as 32-bit computers are now rare. This would also be indicative of a real memory bug in Matplotlib which may still come back later. This is all speculation, but I think it is worth examining. |
I am 90% sure that I used two Ubuntus with 64 bit to reproduce this error. But it is too long ago to be sure. To verify this, someone who can reproduce this error should try the exact same version of matplotlib, python, julia and pyplot on a 32 bit system and a 64 bit system. |
Incidentally, because the problem is restricted to the GUI, you can still use PyPlot with the IJulia notebook. |
I just found a possible source of this problem. @alanedelman was experiencing segfaults with
Can one of you who is seeing this problem compile Julia with
to see if that fixes the problem for you? (It fixed the crash for Alan.) |
See also JuliaLang/julia#4923 |
I have just tried your fix but unfortunately it doesn't help. I still get the same error. Unfortunately Valgrind from brew doesn't work with newer OS Xs and I don't get the error on my Ubuntu machine. |
I just tried it too. The error remains. :-( |
I have switched Linux distribution and now I can reproduce this on Linux. I have posted the output from Valgrind here |
Same problem here. Ubuntu 12.04 64 bit. I already deleted openblas, that I used for NumPy before and downgraded numpy to 1.7.1, but the problem persists. |
I tried it in a virtual machine (VirtualBox) with the same OS and it works. When I start Julia or load numpy I get the message: Can this be related to this bug? |
I discovered something strange when using plot from PyPlot:
Any ideas?
Version info:
The text was updated successfully, but these errors were encountered: