Thu 31 Mar 2011 02:29:43 PM UTC, comment #11:
Octave waited too long between the 3.2.4 release and the 3.4.0 release. I believe the intention has been to increase the frequency of releases; certainly it was expected that in a few months we would need to do a 3.4.1 release to catch the inevitable bugs introduced by the major changes from 3.2 to 3.4. However, it still would be a good idea to draft an e-mail to -unavailable- mentioning your desire to see a bug fix release and why. This will help remind us to do it and reinforce the fact that there are users waiting on it.
|
Thu 31 Mar 2011 09:45:44 AM UTC, comment #10:
I can confirm, that the patch fixes the bug. Thanks a lot!
Could we have the patch in a point release, as Octave is not of so much use, if it can't be used to reliably plot something?
|
Wed 30 Mar 2011 11:05:15 AM UTC, comment #9:
The patch also fixes this bug.
|
Tue 29 Mar 2011 03:20:42 PM UTC, comment #8:
Could you verify that the latest development code does not contain the bug? The magform routine was changed Mar. 15th, 2011 to solve another bug and is now much simpler. See the diff results below where the entire clause has been reduced to just two lines. It would be nice if this change has also fixed this bug.
+verbose+
- double l = std::log10 (std::abs (x));
- double r = std::fmod (l, 1.);
- a = std::pow (10.0, r);
- b = static_cast<int> (l-r);
- if (a < 1)
- {
- a *= 10;
- b -= 1;
- }
-
- if (x < 0)
- a = -a;
+ b = static_cast<int> (gnulib::floor (std::log10 (std::abs (x))));
+ a = x / std::pow (10.0, b);
-verbose-
|
Tue 29 Mar 2011 12:54:17 PM UTC, comment #7:
I think the bug is in the function magform() in file graphics.cc:
double l = std::log10 (std::abs (x));
double r = std::fmod (l, 1.);
a = std::pow (10.0, r);
b = static_cast<int> (l-r);
After change the above code to:
double l = std::log10 (std::abs (x));
b = static_cast<int> (l);
double r = l-b;
a = std::pow (10.0, r);
the bug seems disappeared.
|
Mon 28 Feb 2011 05:24:52 PM UTC, comment #6:
Duncan, which graphics toolkit were you using? gnuplot or fltk?
|
Mon 28 Feb 2011 10:59:40 AM UTC, comment #5:
Confirmed with Ubuntu 10.10 32-bit, Octave 3.4.0 compiled with no options.
Can also be reproduced with these data:
octave:17> a=[0.6, 0.8, 1.0, 1.2, 1.4];
octave:18> b=[0.6375, 0.6304, 0.6252, 0.6214, 0.6182];
octave:19> plot(a,b)
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
|
Mon 21 Feb 2011 12:18:43 AM UTC, comment #4:
I can't reproduce this on Kubuntu 9.04 (amd64, gcc-4.4.1).
It is possible that this is a 32-bit issue. The first two posters on both Debian and SUSE were running 32-bit machines.
One important question, which graphics toolkit is being used for plotting (gnuplot or fltk)?
gnuplot should be the more stable plotting interface.
|
Sun 20 Feb 2011 01:52:48 PM UTC, comment #3:
I compiled it with CXXFLAGS="-g -O0"; CFLAGS="-g -O3" and FFLAGS="-g -O3". Simple example plot(0, 0.12) now works.
I used gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)
Something wrong with optimization? I did not investigate how much -O0 instead of -O2 for g++ affects performance. Looks like not much.
|
Fri 18 Feb 2011 02:56:32 PM UTC, comment #2:
An even simpler example:
Bug:
octave:1> plot(0, 0.12);
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
Working:
octave:1> plot(0, 0.13);
Is there anything I can do to help tracing down the bug?
|
Fri 18 Feb 2011 11:56:40 AM UTC, comment #1:
I think I have the same bug on a 32-bit Version of a Debian 6.0 system. It is completely reproducable on my computer, but not reproducable an a second computer (64-bit openSUSE).
octave:1> version
ans = 3.4.0
octave:2> plot([-1 0 1], [0.11774 0.11772 0.11774])
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
Please note:
- Using an older version (3.2.4) does work without error.
- Using Version 3.4.0 and Valgrind does also work without error.
- Using Version 3.4.0 and the following plot commands do not give errors, too:
plot([-1 0 1], [0.11775 0.11772 0.11775]);
plot([-1 0 1], [0.11773 0.11772 0.11773]);
- The error message is probably printed in toplev.cc at line 638 due to an exception std::bad_alloc, but I do not know where the exception is thrown.
|
Fri 18 Feb 2011 03:35:13 AM UTC, original submission:
I am using SuSE 11.3
Below is my session which gives this error while using array of size two
=================
yuvf@mbyfl:~/work/bts/110207-clb_bat> octave
GNU Octave, version 3.4.0
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "i686-pc-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type `news'.
octave:1> load -binary w.oda
octave:2> who
Variables in the current scope:
ans w
octave:3> plot(w)
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
=========================
What is strange that the command
octave:3> plot(single(w))
gives a correct result.
I reinstall octave 3.2.4 - it works fine with the same data
Sincerely,
Yury Fedorenko
|