Difference between revisions of "User:Andy1978"

From Octave
Jump to navigation Jump to search
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
* Add swisdom (single prec.) to /libinterp/dldfcn/fftw.cc documentation
* Add swisdom (single prec.) to /libinterp/dldfcn/fftw.cc documentation
* linguist-qt4: octave-src/libgui$ lupdate -recursive src qterminal graphics -ts languages/de_DE.ts
* linguist-qt4: octave-src/libgui$ "lupdate -recursive -no-obsolete -locations relative src qterminal graphics -ts languages/*ts"
* Torsten uses lupdate -no-obsolete -locations relative $SEARCH_PATH -ts $file
=== GUI ===
=== GUI ===
Line 60: Line 59:
=== commands from which I regularly doesn't find the name ===
=== commands from which I regularly doesn't find the name ===
* octave_config_info ()
* octave_config_info ()
* merge (C's (a)? b: c); syntax
=== libgraphicsmagick++3 quantum-depth ===
=== libgraphicsmagick++3 quantum-depth ===
Line 209: Line 209:
  hg log -r "bisect(good) or bisect(bad)" --template "{rev}:{node|short} {bisect}\n"
  hg log -r "bisect(good) or bisect(bad)" --template "{rev}:{node|short} {bisect}\n"
== octave-image-acquisition on forge ==
== Links ==
This are just some snippets and links.
* [http://hg.code.sf.net/p/octave/image hgweb on sourceforge]
* still mentiones SVN but the idea is the same http://octave.sourceforge.net/developers.html
* [http://mywiki.wooledge.org/BashFAQ/073 bash parameter expansion]
* you can use if you want but basically boils down to, hg archive, remove the hg hiden files, run the bootstrap file in src/ (if you have one), tarball the repository, install the package, generate the html, upload them to the release tracker

Latest revision as of 13:09, 5 October 2016



  • Add swisdom (single prec.) to /libinterp/dldfcn/fftw.cc documentation
  • linguist-qt4: octave-src/libgui$ "lupdate -recursive -no-obsolete -locations relative src qterminal graphics -ts languages/*ts"


When opening and closing the GUI HDF5: infinite loop closing library [1]

No icons in qt4 GUI?

 gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
 gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true


signal or fltk plotting?[edit]

 pkg load signal
 graphics_toolkit fltk

-> r300: Implementation error: Render targets are too big in r300_set_framebuffer_state, refusing to bind framebuffer state!


fix build, see http://octave.1599824.n4.nabble.com/quot-package-video-is-empty-quot-td4656346.html


  • findpeaks.m, print error if data is not a column vector (error: vertical dimensions mismatch (1x10000 vs 1x1)


corner/cornermetric, harris[edit]

First post on mailing list in 12.01.2013 http://octave.1599824.n4.nabble.com/corner-cornermetric-equivalent-in-octave-td4648802.html


chain matrix multiplication[edit]

a=[1 2; 3 4];
b=[4 2; 8 1];
c=[2 3; 1 -1];
s{1}=a;s{2}=b; s{3}=c;

commands from which I regularly doesn't find the name[edit]

  • octave_config_info ()
  • merge (C's (a)? b: c); syntax

libgraphicsmagick++3 quantum-depth[edit]

in debian wheezy

sudo apt-get build-dep libgraphicsmagick++3
apt-get source libgraphicsmagick++3

edit debian/rules

--with-quantum-depth=16 \

works without problems

--with-quantum-depth=32 \

shows one error:

UYVY format ...
mean-error=0.0209018218321559, maximum-error=0.816509137487552
not ok 77
Failed 1/77 subtests 
debuild -i -us -uc -b
dpkg -i ....

Tracking octave bugs with hg bisect[edit]

I had a strange problem when loading gzip compressed ascii files in octave. It failed dependent on the integer values. After some stripping I made a minimalistic test script (min_testcase_fails.m) which always fails in a current dev (88616c872933):

fid = fopen (fn,"w");
fprintf(fid, "%i %i %i %i\n",639, 25, 160, 978160);
fprintf(fid, "%i %i %i %i\n",687, 25, 171, 978160);
fprintf(fid, "%i %i %i %i\n",663, 31, 173, 978161);
fprintf(fid, "%i %i %i %i\n",663, 15, 154, 978161);
fprintf(fid, "%i %i %i %i\n",655, 21, 151, 978161);
## gzip it!
fn_gz=strcat(fn, ".gz");
cmd=cstrcat("gzip ",fn," -c > ",fn_gz)
c=load("file2.txt.gz")  #this fails in newer versions

When run:

$ octave -q min_testcase_fails.m 
fn = file2.txt
cmd = gzip file2.txt -c > file2.txt.gz
error: value on right hand side of assignment is undefined
error: called from:
error:   /home/andy/src/octave-bugs/min_testcase_fails.m at line 17, column 2

If line 4 with "663, 15, 154, 978161" is changed to ""663, 16, 154, 978161", load works as expected. Strange, isn't it? I also had an old build (dev ab1c6e6d1be6 from Sun Oct 28 21:48:02 2012) and "load" worked in this version.

Running bisect[edit]

I decided to make a fresh clone in a separate directory:

cd ~/src
hg clone http://www.octave.org/hg/octave octave-src
cd octave-src
hg bisect -b 88616c872933
hg bisect -g ab1c6e6d1be6

After this hg bisect uses a binary search strategy to test revisions:

Teste Änderungssatz 16428:f016a5342e19 (1380 Änderungssätze verbleiben, ~10 Tests)

So after checkout I had to compile the source tree (used ccache in the hope of faster checkout-compile cycles).

cd .. && mkdir octave-build && cd octave-build
export CXX="ccache g++"
export CC="ccache gcc"
make -j 7

After compilation I tried my test min_testcase_fails.m:

~/src/octave-build$ ./run-octave -q ../min_testcase_fails.m
fn = file2.txt
cmd = gzip file2.txt -c > file2.txt.gz
c =

      639       25      160   978160
      687       25      171   978160
      663       31      173   978161
      663       15      154   978161
      655       21      151   978161

So this is apparently a good one. Tell it hg bisect!

cd ../octave-src && hg bisect -g

After this you try make again, bootstrap && configure if make fails, rerun the testscript, tell hg bisect if it's good or bad and repeat this until the revision which introduced the problem is found. Or you can use "hg bisect --command", see next point.

hg bisect --command[edit]

I used Jordis bisect script for bug 32818 and modified it to my needs:

~/src$ cat bisect-loadsave.sh 
## Try a simple build first
if  ! make -j 7
   cd $SRCDIR
   ./bootstrap || exit 127
   #rm -rf $BUILDDIR
   #mkdir $BUILDDIR
   $SRCDIR/configure || exit 127
   make -j 7|| exit 127
$BUILDDIR/run-octave -q ~/src/min_testcase_fails.m || exit 1
exit 0

After making it executable, let hg bisect use it

~/src/octave-src$ hg bisect -c ../bisect-loadsave.sh

Now sit back and relax, this could last some hours... Finally:

Änderungssatz 16554:03a28487fa9d: good
Die erste fehlerhafte Revision ist:
Änderung:        16555:04fb96f4bea1
Nutzer:          John W. Eaton <jwe@octave.org>
Datum:           Tue Apr 23 12:57:16 2013 -0400
Zusammenfassung: allow double-click in file browser to load data files

bisect bug 42612[edit]

For bug #42612 I created a minimal script which fails: clf_fails_42612.m

subplot (2,1,1);
plot (1:5);
legend ('hello', 'location', 'northwestoutside');

And the script which runs it, bisect_clf.sh:

## Try a simple build first
if  ! make -j 6
  # make failed, run bootstrap and configure
  cd $SRCDIR
  ./bootstrap || exit 127
  $SRCDIR/configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-bounds-check --disable-java --disable-gui --disable-docs|| exit 127
  make -j 7|| exit 127
$BUILDDIR/run-octave -q clf_fails_42612.m
echo $(hg id) $ret >> clf_fails_42612.log
exit $ret

show bisect history[edit]

hg log -r "bisect(good) or bisect(bad)" --template "{rev}:{node|short} {bisect}\n"