A working machine comprising: an engine; a permanent-magnet synchronous generator driven by the engine; a travel motor driven by electric power generated by the synchronous generator to rotationally drive travel wheels; an inverter having a current detection unit for detecting electric current flowing through the synchronous generator and switching elements (5a, 5b); a controller for detecting an electric abnormality in the synchronous generator; a rotational speed detection device for detecting the rotational speed of the synchronous generator; and a voltage detection unit for detecting an input voltage inputted to the inverter, characterized in that the controller is adapted to: input thereto a rotational speed signal from the rotational speed detection device and a voltage signal from the voltage detection unit and judge that an electric abnormality occurs in the synchronous generator, when the input voltage detected by the voltage detection unit is equal to or less than a predetermined voltage value and when the rotational speed of the synchronous generator detected by the rotational speed detection device is equal to or greater than a predetermined rotational speed that corresponds to the predetermined voltage value at a normal time; when detecting the electric abnormality in the synchronous generator, turn off gates of the switching elements (5a, 5b) of the inverter; and where in this state an electric current equal to or greater than a predetermined value is continuously detected by the current detection unit for a predetermined period of time or more, judge that the inverter is in a short-circuited state. an engine; a permanent-magnet synchronous generator driven by the engine; a travel motor driven by electric power generated by the synchronous generator to rotationally drive travel wheels; an inverter having a current detection unit for detecting electric current flowing through the synchronous generator and switching elements (5a, 5b); a controller for detecting an electric abnormality in the synchronous generator; a rotational speed detection device for detecting the rotational speed of the synchronous generator; and a voltage detection unit for detecting an input voltage inputted to the inverter, characterized in that the controller is adapted to: input thereto a rotational speed signal from the rotational speed detection device and a voltage signal from the voltage detection unit and judge that an electric abnormality occurs in the synchronous generator, when the input voltage detected by the voltage detection unit is equal to or less than a predetermined voltage value and when the rotational speed of the synchronous generator detected by the rotational speed detection device is equal to or greater than a predetermined rotational speed that corresponds to the predetermined voltage value at a normal time; when detecting the electric abnormality in the synchronous generator, turn off gates of the switching elements (5a, 5b) of the inverter; and where in this state an electric current equal to or greater than a predetermined value is continuously detected by the current detection unit for a predetermined period of time or more, judge that the inverter is in a short-circuited state. input thereto a rotational speed signal from the rotational speed detection device and a voltage signal from the voltage detection unit and judge that an electric abnormality occurs in the synchronous generator, when the input voltage detected by the voltage detection unit is equal to or less than a predetermined voltage value and when the rotational speed of the synchronous generator detected by the rotational speed detection device is equal to or greater than a predetermined rotational speed that corresponds to the predetermined voltage value at a normal time; when detecting the electric abnormality in the synchronous generator, turn off gates of the switching elements (5a, 5b) of the inverter; and where in this state an electric current equal to or greater than a predetermined value is continuously detected by the current detection unit for a predetermined period of time or more, judge that the inverter is in a short-circuited state.