Do not give bounds and linear inequality constraints as a nonlinear constraint function. Your first two nonlinear constraints should be represented in A and b arguments as
A = [1 1;-1 1];
b = [1;0];
(I assume that your variable x is 2-D.) The other constraints should be represented by bounds:
lb = [0 0];
ub = [Inf 1/2];
So you should not use that constraint function at all.
As to why you are getting your current error, I don't know. I suggest that you evaluate the following and see if it leads to an error:
[ctest,ceqtest] = constraint(x0)
where x0 is the same value you use in your fmincon call.
MATLAB mathematical toolbox documentation