An injection molding machine , comprising a mold clamping unit and an injection unit , the mold clamping unit including a movable platen attached movably along a tie bar located across a stationary platen and a pressure-receiving platen , the injection molding machine capable of performing automatic operation of repeating a molding cycle by the mold clamping unit closing a mold including a movable mold attached to the movable platen and a fixed mold attached to the stationary platen and applying a mold clamping force to perform mold clamping by extension of a toggle mechanism located between the pressure-receiving platen and the movable platen and the injection unit performing injection filling of a molten resin into the clamped mold , the injection molding machine further comprising a mold gap detection sensor configured to detect mold displacement of the mold , the mold displacement referring to a change occurring in a gap between contact surfaces of the movable mold and the fixed mold along with a change in a length of the tie bar during the injection filling, an injection pressure sensor configured to detect an injection peak pressure, a screw position sensor configured to detect an injection foremost position of a screw of the injection unit , and a control unit configured to be connected with the mold gap detection sensor , the injection pressure sensor , and the screw position sensor , wherein an allowable amount where no flash occurs is set as a threshold for an amount of mold displacement of the mold , and allowable amounts where no flash occurs are set as thresholds for the injection peak pressure and the injection foremost position, and the control unit , if there occurs no such mold displacement change that the amount of mold displacement during the injection filling exceeds its threshold or if there occurs no such injection peak pressure anomaly or injection foremost position anomaly that the injection peak pressure or the injection foremost position during the filling injection exceeds its threshold, continues the automatic operation to repeat the molding cycle, and if the mold displacement change occurs or if the injection peak pressure anomaly and the injection foremost position anomaly occur, stops operation of the injection molding machine . the injection molding machine further comprising a mold gap detection sensor configured to detect mold displacement of the mold , the mold displacement referring to a change occurring in a gap between contact surfaces of the movable mold and the fixed mold along with a change in a length of the tie bar during the injection filling, an injection pressure sensor configured to detect an injection peak pressure, a screw position sensor configured to detect an injection foremost position of a screw of the injection unit , and a control unit configured to be connected with the mold gap detection sensor , the injection pressure sensor , and the screw position sensor , wherein an allowable amount where no flash occurs is set as a threshold for an amount of mold displacement of the mold , and allowable amounts where no flash occurs are set as thresholds for the injection peak pressure and the injection foremost position, and the control unit , if there occurs no such mold displacement change that the amount of mold displacement during the injection filling exceeds its threshold or if there occurs no such injection peak pressure anomaly or injection foremost position anomaly that the injection peak pressure or the injection foremost position during the filling injection exceeds its threshold, continues the automatic operation to repeat the molding cycle, and if the mold displacement change occurs or if the injection peak pressure anomaly and the injection foremost position anomaly occur, stops operation of the injection molding machine . <EOS>