[Abridged] We present a comparison between weak-lensing (WL) and X-ray mass estimates of a sample of numerically simulated clusters. The sample consists on the 20 most massive objects at redshift z=0.25 and Mvir > 5 x 10^{14} Msun h^{-1}. They were found in a cosmological simulation of volume 1 h^{-3} Gpc^3, evolved in the framework of a WMAP-7 normalized cosmology. Each cluster has been resimulated at higher resolution and with more complex gas physics. We processed it thought Skylens and X-MAS to generate optical and X-ray mock observations along three orthogonal projections. The optical simulations include lensing effects on background sources. Standard observational tools and methods of analysis are used to recover the mass profiles of each cluster projection from the mock catalogues. Given the size of our sample, we could also investigate the dependence of the results on cluster morphology, environment, temperature inhomogeneity, and mass. We confirm previous results showing that WL masses obtained from the fit of the cluster tangential shear profiles with NFW functionals are biased low by ~ 5-10% with a large scatter (~10-25%). We show that scatter could be reduced by optimally selecting clusters either having regular morphology or living in substructure-poor environment. The X-ray masses are biased low by a large amount (~25-35%), evidencing the presence of both non-thermal sources of pressure in the ICM and temperature inhomogeneity, but they show a significantly lower scatter than weak-lensing-derived masses. The X-ray mass bias grows from the inner to the outer regions of the clusters. We find that both biases are weakly correlated with the third-order power ratio, while a stronger correlation exists with the centroid shift. Finally, the X-ray bias is strongly connected with temperature inhomogeneities.