In your setup function you use assign malloc(size * sizeof(Cell)) on a Cell** type, if you wanted to make an array of Cell pointers you should use sizeof(Cell*) or sizeof(*field).
malloc(size * sizeof(Cell))
Cell**
sizeof(Cell*)
sizeof(*field)