The causes of weld cracking in the welding repair process of railway freight cars are analyzed. The brittle structure,welding restraint stress,weld structure design,welding material structure selection,and diffusion hydrogen content in the weld metal are obtained from the welding arc. The corrosion of the surface of the base material in the near seam area and the influence of oxide on the welding quality were analyzed. The process and method of welding and repairing the railway freight car compartment were put forward. It has a good guiding significance for improving the repair quality of truck compartments.