  This paper reports certain ambiguities in the calculation of the ensemble
average $\left<T_\mu{}_\nu\right>$ of the stress-energy-momentum tensor of an
arbitrarily coupled massless scalar field in one-dimensional boxes in flat
spacetime. The study addresses a box with periodic boundary condition (a
circle) and boxes with reflecting edges (with Dirichlet's or Neumann's boundary
conditions at the endpoints). The expressions for $\left<T^\mu{}^\nu\right>$
are obtained from finite-temperature Green functions. In an appendix, in order
to control divergences typical of two dimensions, these Green functions are
calculated for related backgrounds with arbitrary number of dimensions and for
scalar fields of arbitrary mass, and specialized in the text to two dimensions
and for massless fields. The ambiguities arise due to the presence in
$\left<T^\mu{}^\nu\right>$ of double series that are not absolutely convergent.
The order in which the two associated summations are evaluated matters, leading
to two different thermodynamics for each type of box. In the case of a circle,
it is shown that the ambiguity corresponds to the classic controversy in the
literature whether or not zero mode contributions should be taken into account
in computations of partition functions. In the case of boxes with reflecting
edges, it results that one of the thermodynamics corresponds to a total energy
(obtained by integrating the non homogeneous energy density over space) that
does not depend on the curvature coupling parameter $\xi$ as expected; whereas
the other thermodynamics curiously corresponds to a total energy that does
depend on $\xi$. Thermodynamic requirements (such as local and global
stability) and their restrictions to the values of $\xi$ are considered.
