sandbox/bugs/svgSave.c

qcc -autolink -O2 -DMTRACE=3 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o svgSave/svgSave svgSave.c -lm
svgSave: /home/popinet/basilisk/src/view.h:438: redraw_feedback: Assertion ‘p->history’ failed.
../nptl/sysdeps/unix/sysv/linux/raise.c:64:error: [Thread debugging using libthread_db enabled]
../nptl/sysdeps/unix/sysv/linux/raise.c:64:error: Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
../nptl/sysdeps/unix/sysv/linux/raise.c:64:error: Program received signal SIGABRT, Aborted.
make: * [svgSave.tst] Error 1

The save function is not working for svg file format.

#include "utils.h"
#include "view.h"

int main(int argc, char const *argv[]){

Initialisation of the grid

  init_grid(1<<6);

Definition of a scalar f to have something to plot

  scalar f[]; 

  foreach()
    f[] = sq(x)+sq(y)-1;

We can dump the results, to see what the domain looks like.

  // dump("initial");

  clear();

We will represent the scalar f with the squares command

  squares("f", min = -1, max = 1);

We save the results in a svg file. This line is not working and give the following error:

basilisk/src/view.h:438: redraw_feedback: Assertion `p->history’ failed.

We did get an svg file, but it is empty

  save(file = "test.svg", format = "svg");

  return 0;
}