Grown-in stress and subsequent fracture in AlxGa1-xN/GaN heterostructures w
ith or without impurity doping were studied in situ. It was found that the
critical thickness of AlxGa1-xN depends not only on its composition but als
o on the concentration of impurities such as Si or Mg. Increase in tensile
stress during growth at a constant AIN molar fraction can be explained by t
he increase in the biaxial modulus of AlxGa1-xN due to impurity doping.